$line) { $line_number = $line_num + 1; // Skip comments $trimmed_line = trim($line); if (str_starts_with($trimmed_line, '//') || str_starts_with($trimmed_line, '*')) { continue; } // Check for 'jQuery.' or 'jQuery(' usage if (preg_match('/\bjQuery\s*[\.\(]/', $line)) { $this->add_violation( $file_path, $line_number, "Use '$' instead of 'jQuery' for consistency and brevity.", trim($line), "Replace 'jQuery' with '$'.", 'low' ); } } } }