Repository Analysis

sqlfluff/sqlfluff

A modular SQL linter and auto-formatter with support for multiple dialects and templated code.

10.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of sqlfluff/sqlfluff, a Python project with 9,805 GitHub stars. SynthScan v2.0 examined 228,607 lines of code across 635 source files, recording 1719 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 10.7 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

10.7
Adjusted Score
10.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.8K
Stars
Python
Language
228.6K
Lines of Code
635
Files
1.7K
Pattern Hits
2026-07-14
Scan Date
0.22
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 141MEDIUM 78LOW 1500

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1719 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers779 hits · 726 pts
SeverityFileLineSnippetContext
LOWutil.py21def _extract_whats_changed_section(release_body: str) -> str:CODE
LOWtest/conftest.py46def config_overrides_for_fixture(CODE
LOWtest/conftest.py187def _generate_test_segments_func(elems):CODE
LOWtest/conftest.py269def raise_critical_errors_after_fix(monkeypatch):CODE
LOWtest/conftest.py284def fail_on_parse_error_after_fix(monkeypatch):CODE
LOWtest/conftest.py295 def raise_error_apply_fixes_check_issue(message, *args): # pragma: no coverCODE
LOWtest/conftest.py299 def raise_error_conflicting_fixes_same_anchor(message: str): # pragma: no coverCODE
LOWtest/generate_parse_fixture_yml.py79def _is_matching_new_criteria(example: ParseExample):CODE
LOWtest/generate_parse_fixture_yml.py95def generate_one_parse_fixture(CODE
LOWtest/testing_test.py13def test_assert_rule_fail_in_sql_handle_parse_error():CODE
LOWtest/testing_test.py20def test_assert_rule_fail_in_sql_should_fail_queries_that_unexpectedly_pass():CODE
LOWtest/testing_test.py27def test_assert_rule_pass_in_sql_should_handle_parse_error():CODE
LOWtest/testing_test.py34def test_assert_rule_pass_in_sql_should_fail_when_there_are_violations():CODE
LOWtest/testing_test.py41def test_rules_test_case_skipped_when_test_case_skipped():CODE
LOWtest/testing_test.py49def test_rules_test_case_has_variable_introspection(test_verbosity_level):CODE
LOWtest/AGENTS.md288 def test_implicit_alias_detected(self):CODE
LOWtest/core/plugin_test.py20def test__plugin_manager_registers_example_plugin():CODE
LOWtest/core/plugin_test.py77def test__plugin_example_rules_returned(rule_ref):CODE
LOWtest/core/plugin_test.py93def test__plugin_default_config_read(rule_ref, config_option):CODE
LOWtest/core/plugin_test.py110def test__plugin_handle_bad_load():CODE
LOWtest/core/config/fluffconfig_test.py40def test__config__from_strings():CODE
LOWtest/core/config/fluffconfig_test.py53def test__config__nested_config_tests():CODE
LOWtest/core/config/fluffconfig_test.py100def test__config__templater_selection(templater_name, templater_class, raises_error):CODE
LOWtest/core/config/fluffconfig_test.py111def test__config__glob_exclude_config_tests():CODE
LOWtest/core/config/fluffconfig_test.py128def test__config__glob_include_config_tests():CODE
LOWtest/core/config/fluffconfig_test.py145def test__config__rules_set_to_none():CODE
LOWtest/core/config/fluffconfig_test.py161def test__config__rules_group_with_exclude():CODE
LOWtest/core/config/fluffconfig_test.py173def test__config__get_section():CODE
LOWtest/core/config/fluffconfig_test.py202def test__config__from_kwargs():CODE
LOWtest/core/config/fluffconfig_test.py217def test__config__from_string():CODE
LOWtest/core/config/fluffconfig_test.py229def test__config_missing_dialect():CODE
LOWtest/core/config/fluffconfig_test.py236def test__config__validate_configs_indirect():CODE
LOWtest/core/config/fluffconfig_test.py249def test__config__invalid_prefer_quoted_keyword_style():CODE
LOWtest/core/config/fluffconfig_test.py294def test__config__validate_configs_inline_layout(raw_sql):CODE
LOWtest/core/config/fluffconfig_test.py308def test__config__warn_unknown_rule():CODE
LOWtest/core/config/fluffconfig_test.py336def test__process_inline_config():CODE
LOWtest/core/config/fluffconfig_test.py371def test__process_inline_config__malformed_equals_syntax():CODE
LOWtest/core/config/fluffconfig_test.py391def test__process_raw_file_for_config(raw_sql):CODE
LOWtest/core/config/fluffconfig_test.py416def test__api__immutable_config():CODE
LOWtest/core/config/fluffconfig_test.py428def test_resolve_path_glob_patterns(tmp_path):CODE
LOWtest/core/config/fluffconfig_test.py463def test_resolve_path_exact_files(tmp_path):CODE
LOWtest/core/config/fluffconfig_test.py481def test_resolve_path_no_matches(tmp_path):CODE
LOWtest/core/config/fluffconfig_test.py497def test_resolve_paths_in_config_comma_separated(tmp_path):CODE
LOWtest/core/config/fluffconfig_test.py532def test_resolve_paths_in_config_no_matches_fallback(tmp_path):CODE
LOWtest/core/config/ini_test.py6def test__config__ini_dotted_keys_nested_structure():CODE
LOWtest/core/config/ini_test.py42def test__config__ini_dotted_keys_type_coercion():STRING
LOWtest/core/config/ini_test.py72def test__config__ini_simple_keys_without_dots():STRING
LOWtest/core/config/ini_test.py96def test__config__ini_dotted_keys_all_sections():STRING
LOWtest/core/config/validate_test.py22def test__validate_configs_direct():CODE
LOWtest/core/config/validate_test.py48def test__validate_configs_precedence_same_file():CODE
LOWtest/core/config/validate_test.py127def test__validate_indentation_invalid(config_dict, config_warning):CODE
LOWtest/core/config/validate_test.py145def test__validate_indentation_valid(config_dict):CODE
LOWtest/core/config/validate_test.py160def test__validate_max_parse_depth_valid(config_dict, expected):CODE
LOWtest/core/config/validate_test.py183def test__validate_max_parse_depth_invalid(config_dict, config_warning):CODE
LOWtest/core/config/validate_test.py199def test__validate_max_parse_nodes_valid(config_dict, expected):CODE
LOWtest/core/config/validate_test.py222def test__validate_max_parse_nodes_invalid(config_dict, config_warning):CODE
LOWtest/core/config/loader_test.py44def test__config__load_file_dir():CODE
LOWtest/core/config/loader_test.py52def test__config__load_from_string():CODE
LOWtest/core/config/loader_test.py63def test__config__load_file_f():CODE
LOWtest/core/config/loader_test.py71def test__config__load_file_missing_extra():CODE
719 more matches not shown…
Cross-File Repetition129 hits · 645 pts
SeverityFileLineSnippetContext
HIGHtest/dialects/conftest.py0test that specific segments parse as expected. nb: we're testing the parse function not the match function although thisSTRING
HIGHtest/dialects/postgres_test.py0test that specific segments parse as expected. nb: we're testing the parse function not the match function although thisSTRING
HIGHtest/dialects/ansi_test.py0test that specific segments parse as expected. nb: we're testing the parse function not the match function although thisSTRING
HIGHsrc/sqlfluff/core/parser/segments/file.py0a segment representing a whole file or script. this is also the default "root" segment of the dialect, and so is usuallySTRING
HIGHsrc/sqlfluff/dialects/dialect_ansi.py0a segment representing a whole file or script. this is also the default "root" segment of the dialect, and so is usuallySTRING
HIGHsrc/sqlfluff/dialects/dialect_bigquery.py0a segment representing a whole file or script. this is also the default "root" segment of the dialect, and so is usuallySTRING
HIGHsrc/sqlfluff/core/templaters/placeholder.py0process a string and return one or more variant renderings. note that the arguments are enforced as keywords because temSTRING
HIGHsrc/sqlfluff/core/templaters/python.py0process a string and return one or more variant renderings. note that the arguments are enforced as keywords because temSTRING
HIGHsrc/sqlfluff/core/templaters/jinja.py0process a string and return one or more variant renderings. note that the arguments are enforced as keywords because temSTRING
HIGHsrc/sqlfluff/utils/functional/segment_predicates.py0defines commonly used raw file slice predicates for rule writers. for consistency, all the predicates in this module areSTRING
HIGH…ff/utils/functional/templated_file_slice_predicates.py0defines commonly used raw file slice predicates for rule writers. for consistency, all the predicates in this module areSTRING
HIGH…sqlfluff/utils/functional/raw_file_slice_predicates.py0defines commonly used raw file slice predicates for rule writers. for consistency, all the predicates in this module areSTRING
HIGHsrc/sqlfluff/utils/functional/segment_predicates.py0returns a function that determines if segment is one the types.STRING
HIGH…sqlfluff/utils/functional/raw_file_slice_predicates.py0returns a function that determines if segment is one the types.STRING
HIGH…ff/utils/functional/templated_file_slice_predicates.py0returns a function that determines if segment is one the types.STRING
HIGHsrc/sqlfluff/dialects/dialect_teradata.py0a column definition, e.g. for create table or alter table.STRING
HIGHsrc/sqlfluff/dialects/dialect_oracle.py0a column definition, e.g. for create table or alter table.STRING
HIGHsrc/sqlfluff/dialects/dialect_mysql.py0a column definition, e.g. for create table or alter table.STRING
HIGHsrc/sqlfluff/dialects/dialect_ansi.py0a column definition, e.g. for create table or alter table.STRING
HIGHsrc/sqlfluff/dialects/dialect_trino.py0a column definition, e.g. for create table or alter table.STRING
HIGHsrc/sqlfluff/dialects/dialect_teradata.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_impala.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_postgres.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_exasol.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_vertica.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_ansi.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_snowflake.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_trino.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_flink.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_materialize.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_greenplum.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_redshift.py0a generic segment, to any of its child subsegments.STRING
HIGHsrc/sqlfluff/dialects/dialect_doris.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_tsql.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_mariadb.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_exasol.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_mysql.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_ansi.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_starrocks.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_postgres.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_vertica.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_snowflake.py0a column option; each create table column can have 0 or more. https://docs.snowflake.com/en/sql-reference/sql/create-tabSTRING
HIGHsrc/sqlfluff/dialects/dialect_tsql.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_hive.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_athena.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_databricks.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_sparksql.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_mysql.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_bigquery.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_clickhouse.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_sqlite.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_starrocks.py0overriding statementsegment to allow for additional segment parsing.STRING
HIGHsrc/sqlfluff/dialects/dialect_tsql.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_postgres.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_mysql.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_ansi.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_bigquery.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_redshift.py0things that come after select but before the columns.STRING
HIGHsrc/sqlfluff/dialects/dialect_tsql.py0a series of bracketed arguments. e.g. the bracketed part of numeric(1, 3)STRING
HIGHsrc/sqlfluff/dialects/dialect_exasol.py0a series of bracketed arguments. e.g. the bracketed part of numeric(1, 3)STRING
69 more matches not shown…
Unused Imports210 hits · 191 pts
SeverityFileLineSnippetContext
LOWtest/rules/std_LT01_jinja_alignment_test.py7CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py40CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py42CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py43CODE
LOWplugins/sqlfluff-templater-dbt/test/templater_test.py27CODE
LOWdocsv/scripts/assemble-site.py4CODE
LOWutils/rust_to_python_grammar.py17CODE
LOWsrc/sqlfluff/__init__.py12CODE
LOWsrc/sqlfluff/__init__.py12CODE
LOWsrc/sqlfluff/__init__.py12CODE
LOWsrc/sqlfluff/__init__.py12CODE
LOWsrc/sqlfluff/__init__.py12CODE
LOWsrc/sqlfluff/core/formatter.py19CODE
LOWsrc/sqlfluff/core/formatter.py20CODE
LOWsrc/sqlfluff/core/__init__.py6CODE
LOWsrc/sqlfluff/core/__init__.py9CODE
LOWsrc/sqlfluff/core/__init__.py9CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py12CODE
LOWsrc/sqlfluff/core/__init__.py22CODE
LOWsrc/sqlfluff/core/__init__.py23CODE
LOWsrc/sqlfluff/core/__init__.py23CODE
LOWsrc/sqlfluff/core/__init__.py26CODE
LOWsrc/sqlfluff/core/errors.py17CODE
LOWsrc/sqlfluff/core/errors.py17CODE
LOWsrc/sqlfluff/core/errors.py18CODE
LOWsrc/sqlfluff/core/errors.py18CODE
LOWsrc/sqlfluff/core/errors.py21CODE
LOWsrc/sqlfluff/core/errors.py21CODE
LOWsrc/sqlfluff/core/config/__init__.py12CODE
LOWsrc/sqlfluff/core/config/__init__.py13CODE
LOWsrc/sqlfluff/core/config/__init__.py13CODE
LOWsrc/sqlfluff/core/config/__init__.py13CODE
LOWsrc/sqlfluff/core/config/__init__.py13CODE
LOWsrc/sqlfluff/core/config/__init__.py13CODE
LOWsrc/sqlfluff/core/config/fluffconfig.py3CODE
LOWsrc/sqlfluff/core/config/loader.py9CODE
LOWsrc/sqlfluff/core/linter/__init__.py3CODE
LOWsrc/sqlfluff/core/linter/__init__.py4CODE
LOWsrc/sqlfluff/core/linter/__init__.py4CODE
LOWsrc/sqlfluff/core/linter/__init__.py4CODE
LOWsrc/sqlfluff/core/linter/__init__.py5CODE
LOWsrc/sqlfluff/core/linter/__init__.py6CODE
LOWsrc/sqlfluff/core/linter/__init__.py7CODE
LOWsrc/sqlfluff/core/linter/fix.py12CODE
LOWsrc/sqlfluff/core/linter/linting_result.py14CODE
LOWsrc/sqlfluff/core/linter/linter.py41CODE
LOWsrc/sqlfluff/core/linter/linter.py47CODE
LOWsrc/sqlfluff/core/linter/linter.py48CODE
LOWsrc/sqlfluff/core/linter/linter.py49CODE
LOWsrc/sqlfluff/core/plugin/hookspecs.py13CODE
LOWsrc/sqlfluff/core/parser/match_result.py15CODE
LOWsrc/sqlfluff/core/parser/match_result.py16CODE
LOWsrc/sqlfluff/core/parser/match_result.py16CODE
LOWsrc/sqlfluff/core/parser/__init__.py3CODE
LOWsrc/sqlfluff/core/parser/__init__.py3CODE
150 more matches not shown…
Deep Nesting161 hits · 155 pts
SeverityFileLineSnippetContext
LOWutil.py112CODE
LOWtest/conftest.py61CODE
LOWtest/conftest.py112CODE
LOWtest/conftest.py187CODE
LOWtest/generate_parse_fixture_yml.py26CODE
LOWtest/cli/commands_test.py1671CODE
LOWtest/cli/commands_test.py1853CODE
LOWtest/cli/test_parse_with_positions.py222CODE
LOWtest/cli/test_parse_with_positions.py256CODE
LOWtest/rules/std_fix_auto_test.py47CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py634CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py654CODE
LOWdocsv/scripts/generate-cli-docs.py89CODE
LOWdocsv/scripts/generate-api-docs.py104CODE
LOWdocsv/scripts/generate-api-docs.py181CODE
LOWdocsv/scripts/generate-api-docs.py293CODE
LOWdocsv/scripts/generate-api-docs.py379CODE
LOWdocsv/scripts/generate-api-docs.py660CODE
LOWdocsv/scripts/generate-rules-docs.py209CODE
LOWdocsv/scripts/generate-rules-docs.py536CODE
LOWutils/build_parsers.py257CODE
LOWutils/build_parsers.py367CODE
LOWutils/build_parsers.py1333CODE
LOWutils/compare_parser_metrics.py104CODE
LOWutils/compare_parser_metrics.py336CODE
LOWutils/benchmark_parsing.py69CODE
LOWexamples/01_basic_api_usage.py48CODE
LOWsrc/sqlfluff/diff_quality_plugin.py54CODE
LOWsrc/sqlfluff/core/config/validate.py22CODE
LOWsrc/sqlfluff/core/config/loader.py51CODE
LOWsrc/sqlfluff/core/config/ini.py12CODE
LOWsrc/sqlfluff/core/config/toml.py31CODE
LOWsrc/sqlfluff/core/linter/patch.py58CODE
LOWsrc/sqlfluff/core/linter/patch.py271CODE
LOWsrc/sqlfluff/core/linter/runner.py174CODE
LOWsrc/sqlfluff/core/linter/discovery.py177CODE
LOWsrc/sqlfluff/core/linter/fix.py107CODE
LOWsrc/sqlfluff/core/linter/linted_dir.py228CODE
LOWsrc/sqlfluff/core/linter/linting_result.py135CODE
LOWsrc/sqlfluff/core/linter/linter.py170CODE
LOWsrc/sqlfluff/core/linter/linter.py457CODE
LOWsrc/sqlfluff/core/linter/linter.py1141CODE
LOWsrc/sqlfluff/core/parser/match_result.py197CODE
LOWsrc/sqlfluff/core/parser/rust_parser.py179CODE
LOWsrc/sqlfluff/core/parser/context.py165CODE
LOWsrc/sqlfluff/core/parser/lexer.py483CODE
LOWsrc/sqlfluff/core/parser/lexer.py182CODE
LOWsrc/sqlfluff/core/parser/match_algorithms.py140CODE
LOWsrc/sqlfluff/core/parser/match_algorithms.py366CODE
LOWsrc/sqlfluff/core/parser/match_algorithms.py553CODE
LOWsrc/sqlfluff/core/parser/grammar/sequence.py36CODE
LOWsrc/sqlfluff/core/parser/segments/file.py44CODE
LOWsrc/sqlfluff/core/parser/segments/base.py463CODE
LOWsrc/sqlfluff/core/dialects/common.py133CODE
LOWsrc/sqlfluff/core/dialects/base.py185CODE
LOWsrc/sqlfluff/core/rules/fix.py107CODE
LOWsrc/sqlfluff/core/rules/fix.py275CODE
LOWsrc/sqlfluff/core/rules/noqa.py65CODE
LOWsrc/sqlfluff/core/rules/noqa.py168CODE
LOWsrc/sqlfluff/core/rules/noqa.py190CODE
101 more matches not shown…
Over-Commented Block153 hits · 148 pts
SeverityFileLineSnippetContext
LOWpyproject.toml301[tool.uv.workspace]COMMENT
LOWtox.ini41 # consistent results.COMMENT
LOWtest/core/linter/linted_file_test.py121 # which should trigger the logic to ensure that the sourceCOMMENT
LOWtest/utils/reflow/reindent_test.py401 # JOINCOMMENT
LOWtest/utils/reflow/reindent_test.py501 _IndentPoint(7, 1, 0, 1, 5, False, ()),COMMENT
LOWtest/utils/reflow/reindent_test.py541 (COMMENT
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py141 # This one seems to be less of an issue in testing, but I'mCOMMENT
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py741 # The explanation on the undefined macro error is already fairlyCOMMENT
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py801 # 1. Assertion errors in TemplatedFile, when it sanity checks theCOMMENT
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py821 # So for files that have no templated elements in them, render_funcCOMMENT
LOWdocs/source/_partials/starter_config.cfg1[sqlfluff]COMMENT
LOWdocs/source/_partials/starter_config.cfg61COMMENT
LOWexamples/01_basic_api_usage.py21# ...COMMENT
LOWexamples/03_getting_rules_and_dialects.py21# ...COMMENT
LOW.github/FUNDING.yml1# sqlfluff is free to use to improve sql in whatever context youCOMMENT
LOW.github/workflows/ci-tests.yml1#############################COMMENT
LOW.github/workflows/ci-tests.yml481 name: Dialect ${{ matrix.marks }}${{ matrix.with-rust }}COMMENT
LOWsqlfluffrs/pyproject.toml1[build-system]COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_api.rs1//! Ergonomic API for Table-Driven Grammar AccessCOMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs1//! Table-Driven Grammar Instruction FormatCOMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs61// pub enum ParseMode {COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs181///COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs201///COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs221/// - Use `exclude_idx` if HAS_EXCLUDE flag setCOMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_inst.rs241 pub parse_mode: ParseMode,COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/identity.rs1//! Process-global unique identifiers for tokens.COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/parser.rs101COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs1//! Table-Driven Grammar StorageCOMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs21//! Sequence(COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs41COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs61 /// Instructions index into this table via `first_terminator_idx` + `terminator_count`.COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs81 /// - simple_hint indices (optional)COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs101 /// Contains pre-computed simple hints for fast pruning of OneOf alternatives.COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/grammar_tables.rs121COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/token/mod.rs721 // let mut child_results = Vec::new();COMMENT
LOWsqlfluffrs/sqlfluffrs_types/src/token/mod.rs741 // let mut merged_map = HashMap::new();COMMENT
LOWsqlfluffrs/tests/test_delimited_terminator_timing.rs1/// Test cases to verify terminator timing behavior in Delimited grammarCOMMENT
LOWsqlfluffrs/tests/test_delimited_terminator_timing.rs21 fn test_delimited_where_terminator_matches_element() {COMMENT
LOWsqlfluffrs/tests/test_delimited_terminator_timing.rs41COMMENT
LOWsqlfluffrs/tests/test_delimited_terminator_timing.rs61 /// 5. Match "b" ✓COMMENT
LOWsqlfluffrs/sqlfluffrs_benchmarks/build.rs1//! Build script for the TPC benchmark crate.COMMENT
LOWsqlfluffrs/sqlfluffrs_benchmarks/examples/time_tpc.rs1/// time_tpc: timing and parser-stats harness for TPC-H and TPC-DS benchmarks.COMMENT
LOWsqlfluffrs/sqlfluffrs_benchmarks/benches/tpc_bench.rs1/// TPC-H and TPC-DS lex and parse benchmarks.COMMENT
LOWsqlfluffrs/sqlfluffrs_benchmarks/src/lib.rs1//! Shared helpers for the TPC-H / TPC-DS lex and parse benchmarks.COMMENT
LOWsqlfluffrs/sqlfluffrs_python/src/marker.rs101 self.0.source_str()COMMENT
LOWsqlfluffrs/sqlfluffrs_rules/src/lib.rs1//! Rust-native lint rules, run over the parse arena's public read API.COMMENT
LOWsqlfluffrs/sqlfluffrs_rules/src/cp01.rs1//! CP01 (keyword capitalisation) detection over the parse arena.COMMENT
LOWsqlfluffrs/sqlfluffrs_rules/src/python.rs1//! PyO3 bindings for the Rust-native rules.COMMENT
LOWsqlfluffrs/benches/baseline_phase1.rs1/// Phase 1 Baseline Benchmarks for Table-Driven Grammar MigrationCOMMENT
LOWsqlfluffrs/sqlfluffrs_dialects/build.rs1//! Cargo build script for `sqlfluffrs_dialects`.COMMENT
LOWsqlfluffrs/sqlfluffrs_dialects/build.rs21//!COMMENT
LOWsqlfluffrs/sqlfluffrs_dialects/src/block_comment.rs1/// Extract nested block comments from SQL input.COMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/core.rs41 tables.aux_data[start..end]COMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/core.rs81COMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/core.rs161 /// Memoizes a Ref's resolved child grammar (ref grammar_id -> child grammar_id).COMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/core.rs681 class_typesCOMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/cache.rs1/// Parse caching module for performance optimizationCOMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/cache.rs21#[cfg(feature = "verbose-debug")]COMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/cache.rs41/// Cache key for table-driven parser memoizationCOMMENT
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/arena_py.rs1//! PyO3 bindings for the arena tree.COMMENT
93 more matches not shown…
Self-Referential Comments35 hits · 108 pts
SeverityFileLineSnippetContext
MEDIUMtest/core/parser/lexer_test.py474 # Create a mock templated fileCOMMENT
MEDIUMtest/core/parser/lexer_test.py537 # Create a mock token with an unknown typeCOMMENT
MEDIUMtest/core/parser/rust_parser_test.py309 # Create a parserCOMMENT
MEDIUMtest/core/parser/rust_parser_test.py342 # Create a parserCOMMENT
MEDIUMtest/core/parser/rust_parser_test.py376 # Create a parserCOMMENT
MEDIUMtest/core/parser/segments/segments_meta_test.py64 # Create a TemplateSegment with position markerCOMMENT
MEDIUMtest/core/templaters/jinja_test.py1730 # Create a TemplatedFile from the results. This runs some useful sanityCOMMENT
MEDIUMtest/core/templaters/jinja_test.py2027 # Create a config with dotted notation in the context sectionCOMMENT
MEDIUMtest/utils/analysis/query_test.py19 # Create a crawler from the root segment.COMMENT
MEDIUMtest/utils/reflow/reindent_test.py867 # Create a custom reflow config with the specific settingsCOMMENT
MEDIUMtest/utils/reflow/reindent_test.py880 # Create a reflow sequence with the custom configCOMMENT
MEDIUMtest/utils/reflow/reindent_test.py923 # Create a custom reflow config with:COMMENT
MEDIUMtest/utils/reflow/reindent_test.py939 # Create a reflow sequence with the custom configCOMMENT
MEDIUMtest/utils/reflow/reindent_test.py974 # Create a custom reflow config with:COMMENT
MEDIUMtest/utils/reflow/reindent_test.py990 # Create a reflow sequence with the custom configCOMMENT
MEDIUMtest/cli/commands_test.py2673 # Create a SQL file larger than the byte limit.COMMENT
MEDIUMtest/cli/commands_test.py2702 # Create a SQL file larger than the byte limit.COMMENT
MEDIUMtest/cli/test_parse_with_positions.py139 # Create a templated file for position trackingCOMMENT
MEDIUMtest/cli/test_parse_with_positions.py143 # Create an Indent meta segment with position marker at line 2COMMENT
MEDIUMplugins/sqlfluff-templater-dbt/test/templater_test.py420 # Create a real file structure with a symlink mimicking dbt local packages:COMMENT
MEDIUMutils/build_parsers.py775 # Create a synthetic OneOf for the elementsCOMMENT
MEDIUMsrc/sqlfluff/core/parser/types.py20# Define the potential parse modes. These are used in grammarsCOMMENT
MEDIUMsrc/sqlfluff/core/parser/rust_parser.py167 # Create the Rust parserCOMMENT
MEDIUMsrc/sqlfluff/core/parser/grammar/sequence.py567 # Create the final match resultCOMMENT
MEDIUMsrc/sqlfluff/core/parser/grammar/anyof.py45 # Create an unmatched segmentCOMMENT
MEDIUMsrc/sqlfluff/core/parser/segments/base.py142 # Create a cache key on definition.COMMENT
MEDIUMsrc/sqlfluff/core/rules/loader.py20 # Create a rules dictionary for importing inCOMMENT
MEDIUMsrc/sqlfluff/core/rules/base.py706 """This method is monkey patched into a "raise" for certain tests."""STRING
MEDIUMsrc/sqlfluff/core/templaters/jinja.py967 # Create a mapping of the original source slices before modification soCOMMENT
MEDIUMsrc/sqlfluff/core/helpers/dict.py279 # Create an empty dictionary if key not found.COMMENT
MEDIUMsrc/sqlfluff/utils/testing/logging.py58 # Create a placeholder class that will never be instantiatedCOMMENT
MEDIUMsrc/sqlfluff/dialects/dialect_ansi.py324 # The following functions can be called without parentheses per ANSI specificationCOMMENT
MEDIUMsrc/sqlfluff/rules/layout/LT08.py220 # Create a result, anchored on the start of the next content.COMMENT
MEDIUMsrc/sqlfluff/rules/convention/CV06.py419 # Create the final semi-colon if it does not yet exist.COMMENT
MEDIUMsrc/sqlfluff/rules/structure/ST06.py260 # Create a list of all the edit fixesCOMMENT
Decorative Section Separators25 hits · 100 pts
SeverityFileLineSnippetContext
MEDIUMrequirements_dev.txt4# ---------------------------COMMENT
MEDIUMrequirements_dev.txt10# --------------------COMMENT
MEDIUMrequirements_dev.txt15# --------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py16# ============================================================================COMMENT
MEDIUMtest/core/parser/rust_parser_test.py18# ============================================================================COMMENT
MEDIUMtest/core/parser/rust_parser_test.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py69# ============================================================================COMMENT
MEDIUMtest/core/parser/rust_parser_test.py71# ============================================================================COMMENT
MEDIUMtest/core/parser/rust_parser_test.py446# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py448# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py528# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py530# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py666# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py675# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py937# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py948# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py1062# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/core/parser/rust_parser_test.py1071# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/sqlfluff/core/dialects/common.py78# =============================================================================COMMENT
MEDIUMsrc/sqlfluff/core/dialects/common.py87# =============================================================================COMMENT
MEDIUMsrc/sqlfluff/core/dialects/common.py348# =============================================================================COMMENT
MEDIUMsrc/sqlfluff/core/dialects/common.py350# =============================================================================COMMENT
MEDIUMsrc/sqlfluff/utils/reflow/respace.py27# ---------------------------COMMENT
MEDIUMsrc/sqlfluff/utils/reflow/respace.py29# ---------------------------COMMENT
AI Slop Vocabulary38 hits · 76 pts
SeverityFileLineSnippetContext
LOWtest/core/templaters/python_test.py461 # For the render_func we just use a function which just returns theCOMMENT
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py742 # explanatory, so just pass it straight through.COMMENT
MEDIUMplugins/sqlfluff-templater-dbt/test/templater_test.py508 # Log the rendered file to facilitate better debugging of the files.COMMENT
LOWdocsv/scripts/generate-dialects-docs.py60 # If no definition found, just return as plain textCOMMENT
LOW.github/workflows/create-release-pull-request.yaml81 # merged, so we just add "YYYY-MM-DD" for now as a placeholder.COMMENT
LOWsrc/sqlfluff/core/linter/discovery.py96 # to process and just return None.COMMENT
LOWsrc/sqlfluff/core/linter/discovery.py152 # Does it have a relevant extension? If not, just return an empty list.COMMENT
LOWsrc/sqlfluff/core/linter/discovery.py163 # If not ignored, just return the file.COMMENT
MEDIUMsrc/sqlfluff/core/linter/fix.py83 # Definitely valid (i.e. no conflict) if 0 or 1. In practice, thisCOMMENT
MEDIUMsrc/sqlfluff/core/linter/fix.py92 # Definitely bad if > 2.COMMENT
LOWsrc/sqlfluff/core/linter/fix.py163 # No fix matches here, just add the segment and move on.COMMENT
LOWsrc/sqlfluff/core/linter/fix.py328 # Don't any apply fixes from within this region and just return theCOMMENT
LOWsrc/sqlfluff/core/parser/match_result.py129 # If the current match is empty, just return the other.COMMENT
LOWsrc/sqlfluff/core/parser/match_result.py132 # If the same is true of the other, just return self.COMMENT
LOWsrc/sqlfluff/core/parser/match_result.py169 # If it's a failed (empty) match, then just pass straightCOMMENT
MEDIUMsrc/sqlfluff/core/parser/parser.py49 # a unique entry point to facilitate exactly this. All other segmentsCOMMENT
LOWsrc/sqlfluff/core/parser/match_algorithms.py98 # then we should just return immediately. Nothing will match.COMMENT
LOWsrc/sqlfluff/core/parser/match_algorithms.py522 # If there's either no match, or we hit a target, just pass the result.COMMENT
LOWsrc/sqlfluff/core/parser/grammar/sequence.py180 # If it's a raw meta, just add it to our list.COMMENT
LOWsrc/sqlfluff/core/parser/grammar/sequence.py332 # If it did, then just add it as a child match and we're done. Move on.COMMENT
LOWsrc/sqlfluff/core/parser/grammar/anyof.py34 # If we're being strict, just return.COMMENT
MEDIUMsrc/sqlfluff/core/templaters/jinja.py842 # The JinjaTracer slicing algorithm is more robust, but it requiresCOMMENT
LOWsrc/sqlfluff/core/templaters/python.py808 # if we don't have anything to anchor on, then just return (coalescingCOMMENT
MEDIUMsrc/sqlfluff/core/templaters/slicers/tracer.py548 # by keeping tokens as Jinja returns them, the code is more robust.COMMENT
LOWsrc/sqlfluff/core/helpers/dict.py292 # If we don't, then just set the value:COMMENT
LOWsrc/sqlfluff/utils/reflow/reindent.py1420 # If indent compensation is not needed, simply return the desired indent.COMMENT
MEDIUMsrc/sqlfluff/utils/reflow/sequence.py143 # This is to facilitate better evaluation of the ends of files.COMMENT
LOWsrc/sqlfluff/dialects/dialect_ansi.py2993 # than just add optional=True to BracketedColumnReferenceListGrammar).COMMENT
LOWsrc/sqlfluff/dialects/dialect_snowflake.py8464 # we will just use that.COMMENT
MEDIUMsrc/sqlfluff/dialects/dialect_redshift.py1738 # TODO: This logic can be streamlined. However, there are some odd parsing issues.COMMENT
LOWsrc/sqlfluff/rules/references/RF03.py327 # If it's the right kind already, just return.COMMENT
LOWsrc/sqlfluff/rules/convention/CV10.py169 # We can't just set the primary type, but we have to ensure that theSTRING
LOWsrc/sqlfluff/rules/ambiguous/AM07.py80 # set expression, just use the first query. If that first query isn'tCOMMENT
LOWsrc/sqlfluff/rules/ambiguous/AM06.py135 # If there are no column references then just returnCOMMENT
MEDIUMsrc/sqlfluff/rules/aliasing/AL09.py185 # should be done in conjunction with RF06 & CP02 (see docstring).COMMENT
MEDIUMsrc/sqlfluff/rules/structure/ST06.py269 # approach would leverage difflib.SequenceMatcher.get_opcodes(),COMMENT
MEDIUMsrc/sqlfluff/rules/structure/ST06.py273 # final application of patches (in "sqlfluff fix") more robust.COMMENT
LOWsrc/sqlfluff/rules/structure/ST11.py105 # If we can't find a reference, just return an empty stringCOMMENT
Fake / Example Data63 hits · 66 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md5787One of the biggest new features in this release is the support for SQLAlchemy and other "placeholder" templating within CODE
LOWtest/core/config/fluffconfig_test.py95 ("placeholder", PlaceholderTemplater, False),CODE
LOWtest/core/config/loader_test.py240 os.path.join("test", "fixtures", "config", "placeholder"),CODE
LOWtest/core/config/loader_test.py250 "placeholder": {CODE
LOWtest/core/parser/lexer_test.py228 "placeholder",CODE
LOWtest/core/parser/lexer_test.py231 ("", "\n select 1 as test\n", "literal", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py233 ("", "{% endcall %}", "block_end", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py239 "placeholder",CODE
LOWtest/core/parser/lexer_test.py261 ("", "{% macro render_name(title) %}", "block_start", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py263 ("", "\n '", "literal", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py264 ("", "{{ title }}", "templated", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py265 ("", ". foo' as ", "literal", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py266 ("", "{{ caller() }}", "templated", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py267 ("", "\n", "literal", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py269 ("", "{% endmacro %}", "block_end", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py286 ("", "\n bar\n ", "literal", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py288 ("", "{% endcall %}", "block_end", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py373 ("", "{# comment #}", "comment", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py401 ("", "", "special_type", "placeholder"),CODE
LOWtest/core/parser/lexer_test.py598 "templater": "placeholder",CODE
LOWtest/core/parser/lexer_test.py603 "placeholder": {CODE
LOWtest/core/parser/lexer_test.py686 "templater": "placeholder",CODE
LOWtest/core/parser/lexer_test.py691 "placeholder": {CODE
LOWtest/core/parser/segments/segments_meta_test.py78 assert tuple_with_pos[0] == "placeholder"CODE
LOWtest/core/templaters/jinja_test.py746 assert seg_types == ["placeholder", "end_of_file"]CODE
LOWtest/core/templaters/jinja_test.py852 seg.is_type("placeholder")CODE
LOWsqlfluffrs/sqlfluffrs_types/src/token/construction.rs265 token.token_type = Cow::Borrowed("placeholder");CODE
LOWsqlfluffrs/sqlfluffrs_types/src/token/construction.rs331class_types_static!(PLACEHOLDER_CT, "base", "raw", "meta", "placeholder");CODE
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/types.rs228 MetaType::Template { .. } => "placeholder",CODE
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/types.rs447 MetaType::Template { .. } => "placeholder".to_string(),CODE
LOWsqlfluffrs/sqlfluffrs_parser/src/parser/arena.rs697 MetaType::Template { .. } => "placeholder",CODE
LOW…/sqlfluffrs_parser/src/parser/table_driven/sequence.rs872 if tok.is_type(&["placeholder"]) {CODE
LOW…/sqlfluffrs_parser/src/parser/table_driven/sequence.rs897 if tok.is_type(&["placeholder"]) {CODE
LOWsrc/sqlfluff/core/linter/patch.py155 seg.is_type("placeholder")CODE
LOWsrc/sqlfluff/core/parser/grammar/sequence.py60 if segments[_idx - 1].is_type("placeholder"):CODE
LOWsrc/sqlfluff/core/parser/grammar/sequence.py71 if segments[_idx].is_type("placeholder"):CODE
LOWsrc/sqlfluff/core/parser/segments/base.py519 fwd_seg.is_type("placeholder")CODE
LOWsrc/sqlfluff/core/parser/segments/meta.py189 type = "placeholder"CODE
LOWsrc/sqlfluff/core/templaters/placeholder.py78 name = "placeholder"CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py43 if not point.class_types.intersection({"newline", "placeholder"}):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py54 if seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py280 assert segment.is_type("placeholder", "template_loop")CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py347 elif not _element.segments[0].is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py380 if first_segment.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py412 if seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py489 if "placeholder" in elements[ip.idx + 1].class_types:CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py701 if not seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py750 if not seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1028 "placeholder" in elements[idx + 1].class_typesCODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1256 if elements[0].segments[0].is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1278 if indent_seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1372 if init_seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1624 if elements[ip.idx + 1 :] and "placeholder" in elements[ip.idx + 1].class_types:CODE
LOWsrc/sqlfluff/utils/reflow/reindent.py1629 if seg.is_type("placeholder")CODE
LOWsrc/sqlfluff/utils/reflow/elements.py51 if not segment or not segment.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/elements.py115 "whitespace", "placeholder", "newline", "indent", "template_loop"CODE
LOWsrc/sqlfluff/utils/reflow/elements.py444 if indent_seg and indent_seg.is_type("placeholder"):CODE
LOWsrc/sqlfluff/utils/reflow/elements.py622 if before.is_type("placeholder")CODE
LOWsrc/sqlfluff/utils/reflow/elements.py635 if after.is_type("placeholder")CODE
LOWsrc/sqlfluff/rules/layout/LT12.py139 if _trailing_segment.is_type("placeholder"):CODE
3 more matches not shown…
Redundant / Tautological Comments36 hits · 54 pts
SeverityFileLineSnippetContext
LOWtest/core/errors_test.py42 # Set ignore to true if configured.COMMENT
LOWtest/core/errors_test.py57 # Set ignore to true if configured.COMMENT
LOWtest/core/errors_test.py72 # Set ignore to true if configured.COMMENT
LOWtest/dialects/conftest.py113 # Check if all child segments are the correct typeCOMMENT
LOWdocsv/scripts/generate-api-docs.py138 # Check if this line is a section headerCOMMENT
LOWutils/build_parsers.py1206 # Check if this is an implicit indentCOMMENT
LOWutils/build_parsers.py1246 # Check if this is an implicit indentCOMMENT
LOWutils/build_parsers.py1719 # Check if this is a Segment class (has a 'type' attribute)COMMENT
LOWutils/micro_benchmark_small.py83 # Check if lexing dominatesCOMMENT
LOWdocs/generate-auto-docs.py67 # Check if "core" is in the rule's groupsSTRING
LOWdocs/source/conf.py96 # Set branch to main (used by Codecov button)COMMENT
LOWexamples/02_timing_api_steps.py16 # Output the resultCOMMENT
LOWsrc/sqlfluff/diff_quality_plugin.py56 # Check if SQLFluff is installed.COMMENT
LOWsrc/sqlfluff/core/default_config.cfg62# Set either to 0 to disable.COMMENT
LOWsrc/sqlfluff/core/parser/rust_parser.py692 # Check if segment has _rstoken attribute (cached original token)COMMENT
LOWsrc/sqlfluff/core/parser/grammar/sequence.py541 # Check if we've run out of segmentsCOMMENT
LOWsrc/sqlfluff/core/parser/grammar/anyof.py226 # Check if we have matched an option too many times.COMMENT
LOWsrc/sqlfluff/utils/reflow/respace.py254 # Check if we've just passed whitespace. If we have, remove itCOMMENT
LOWsrc/sqlfluff/cli/commands.py751 # Output the results as we goCOMMENT
LOWsrc/sqlfluff/rules/layout/LT08.py109 # Check if the next code segment is CYCLE or SEARCHCOMMENT
LOWsrc/sqlfluff/rules/layout/LT09.py325 # Check if the modifier is one we care aboutCOMMENT
LOWsrc/sqlfluff/rules/layout/LT15.py60 # Check if we're inside a statement first (highest priority)COMMENT
LOWsrc/sqlfluff/rules/layout/LT15.py71 # Check if we're inside a batch but not in a statementCOMMENT
LOWsrc/sqlfluff/rules/oracle/OR01.py60 # Check if batch contains only slash_buffer_executor statementCOMMENT
LOWsrc/sqlfluff/rules/tsql/TQ03.py66 # Check if batch contains only GO statementCOMMENT
LOWsrc/sqlfluff/rules/tsql/TQ02.py93 # Check if the first statement is already a begin_end_blockCOMMENT
LOWsrc/sqlfluff/rules/tsql/TQ02.py159 # Check if there's a statement_terminator after the last statementCOMMENT
LOWsrc/sqlfluff/rules/convention/CV06.py354 # Check if this code segment contains the last statementCOMMENT
LOWsrc/sqlfluff/rules/convention/CV06.py372 # Check if there's a semicolon terminator after the last statementCOMMENT
LOWsrc/sqlfluff/rules/aliasing/AL10.py49 # Check if this FROM expression contains a derived table.COMMENT
LOWsrc/sqlfluff/rules/structure/ST02.py221 # Check if the comparison is to NULL or NOT NULL.COMMENT
LOWsrc/sqlfluff/rules/structure/ST02.py252 # Check if we can reduce the CASE expression to a single coalesceCOMMENT
LOWsrc/sqlfluff/rules/structure/ST06.py65 # Check if the view has an explicit column listCOMMENT
LOWsrc/sqlfluff/rules/structure/ST06.py69 # Check if this bracketed segment contains column referencesCOMMENT
LOWsrc/sqlfluff/rules/structure/ST06.py88 # Check if we've seen a more complex select target element alreadyCOMMENT
LOWsrc/sqlfluff/rules/structure/ST09.py332 # Check if list is made up of a qualified column_reference segment,COMMENT
Cross-Language Confusion7 hits · 38 pts
SeverityFileLineSnippetContext
HIGHsrc/sqlfluff/core/linter/linter.py278 "cd sqlfluffrs && maturin develop --features python"CODE
HIGHsrc/sqlfluff/core/parser/match_result.py58 # NOTE: If this is null, it means we've matched a sequence of segmentsCOMMENT
HIGHsrc/sqlfluff/cli/commands.py1015 # If some failed then return falseCOMMENT
HIGHsrc/sqlfluff/dialects/dialect_tsql_keywords.py12 null,CODE
HIGHsrc/sqlfluff/rules/aliasing/AL09.py164 # We *should* expect all of these to be non-null, but some bugCOMMENT
HIGHsrc/sqlfluff/rules/capitalisation/CP04.py19 null,STRING
HIGHsrc/sqlfluff/rules/capitalisation/CP04.py42 null,STRING
Excessive Try-Catch Wrapping29 hits · 33 pts
SeverityFileLineSnippetContext
LOWtest/generate_parse_fixture_yml.py104 except Exception as err:CODE
LOWtest/core/linter/linted_file_test.py263 except Exception:CODE
LOWtest/api/simple_test.py493 except Exception as err:CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py131 except Exception as err:CODE
LOW…luff-templater-dbt/sqlfluff_templater_dbt/templater.py744 except Exception as err:CODE
LOWplugins/sqlfluff-templater-dbt/test/templater_test.py568 except Exception as e:CODE
LOWdocsv/scripts/generate-api-docs.py200 except Exception:CODE
LOWdocsv/scripts/generate-api-docs.py364 except Exception:CODE
LOWutils/build_parsers.py336 except Exception:CODE
LOWutils/build_parsers.py361 except Exception:CODE
MEDIUMutils/benchmark_parser.py198 print(f"Error: File not found: {args.file}", file=sys.stderr)CODE
MEDIUMutils/benchmark_parsing.py56 print(f"Error: Dialect '{dialect}' not found in fixtures")CODE
LOWutils/benchmark_parsing.py94 except Exception as e:CODE
LOWutils/benchmark_parsing.py126 except Exception:CODE
LOWutils/benchmark_parsing.py164 except Exception as e:CODE
MEDIUMutils/benchmark_parsing.py638 print("Error: Specify --dialect <name> or --all-dialects")CODE
MEDIUMsrc/sqlfluff/diff_quality_plugin.py69 print(f"Error parsing JSON output ({e}): {repr(o)}")CODE
LOWsrc/sqlfluff/core/linter/runner.py134 except Exception as e:CODE
LOWsrc/sqlfluff/core/linter/runner.py207 except Exception as e:CODE
LOWsrc/sqlfluff/core/linter/runner.py255 except Exception as e:CODE
LOWsrc/sqlfluff/core/linter/discovery.py60 except Exception:CODE
LOWsrc/sqlfluff/core/plugin/host.py70 except Exception as err:CODE
LOWsrc/sqlfluff/core/parser/rust_parser.py368 except Exception: # pragma: no coverCODE
LOWsrc/sqlfluff/core/rules/base.py562 except Exception as e:CODE
LOWsrc/sqlfluff/core/rules/base.py624 except Exception as e:CODE
LOWsrc/sqlfluff/core/templaters/jinja.py766 except Exception as err:CODE
LOWsrc/sqlfluff/core/templaters/jinja.py1023 except Exception:CODE
LOWsrc/sqlfluff/cli/commands.py82 except Exception as e:CODE
LOWsrc/sqlfluff/cli/commands.py103 except Exception: # pragma: no coverCODE
Structural Annotation Overuse17 hits · 28 pts
SeverityFileLineSnippetContext
LOWtest/core/parser/grammar/grammar_sequence_test.py486 # NOTE: This functionality doesn't get used much.COMMENT
LOWplugins/sqlfluff-templater-dbt/test/linter_test.py48 # NOTE: This method is called within the config readout.COMMENT
LOWdocsv/scripts/generate-all-docs.py53 # Step 1: Generate rule documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py62 # Step 2: Generate dialect documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py71 # Step 3: Generate CLI documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py80 # Step 4: Generate API documentationCOMMENT
LOWsrc/sqlfluff/core/parser/match_algorithms.py523 # NOTE: This method returns the same as `next_match` in a "no match"COMMENT
LOWsrc/sqlfluff/core/dialects/__init__.py105 # NOTE: The result of .expand() is a new class.COMMENT
LOWsrc/sqlfluff/utils/reflow/reindent.py898 # NOTE: The following line should never lead to an index errorCOMMENT
LOWsrc/sqlfluff/utils/reflow/elements.py818 # NOTE: This method operates on the existing fix buffer.COMMENT
LOWsrc/sqlfluff/cli/commands.py798 # NOTE: The output format is designed for this GitHub action:COMMENT
LOWsrc/sqlfluff/cli/commands.py842 # NOTE: The output format is designed for GitHub action:COMMENT
LOWsrc/sqlfluff/dialects/AGENTS.md185### Step 1: Create Test SQL FilesCOMMENT
LOWsrc/sqlfluff/dialects/AGENTS.md209### Step 2: Generate Expected Parse TreesCOMMENT
LOWsrc/sqlfluff/dialects/AGENTS.md224### Step 3: Implement GrammarCOMMENT
LOWsrc/sqlfluff/dialects/AGENTS.md250### Step 4: Regenerate and VerifyCOMMENT
LOWsrc/sqlfluff/dialects/AGENTS.md273### Step 5: Run Full Test SuiteCOMMENT
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/sqlfluff/AGENTS.md61Short one-line description. Longer description explaining the purpose, behavior, and usage. Can span multiple lSTRING
HIGHsrc/sqlfluff/core/templaters/jinja.py173Take a path and extract macros from it. Args: path (list[str]): A list of paths. env (ESTRING
HIGHsrc/sqlfluff/core/templaters/jinja.py720Process a string and return the new string. Note that the arguments are enforced as keywords because TeSTRING
HIGHsrc/sqlfluff/core/templaters/base.py553Process a string and return a TemplatedFile. Note that the arguments are enforced as keywords because TemplaterSTRING
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWsrc/sqlfluff/core/linter/linter.py1141CODE
LOWsrc/sqlfluff/core/parser/grammar/delimited.py38CODE
LOWsrc/sqlfluff/core/parser/grammar/anyof.py67CODE
LOWsrc/sqlfluff/core/parser/grammar/anyof.py311CODE
LOWsrc/sqlfluff/core/parser/segments/raw.py48CODE
LOWsrc/sqlfluff/core/parser/segments/keyword.py20CODE
LOWsrc/sqlfluff/core/templaters/jinja.py1191CODE
LOWsrc/sqlfluff/cli/formatters.py357CODE
LOWsrc/sqlfluff/cli/commands.py688CODE
LOWsrc/sqlfluff/cli/commands.py1330CODE
LOWsrc/sqlfluff/cli/commands.py1447CODE
Verbosity Indicators5 hits · 10 pts
SeverityFileLineSnippetContext
LOWdocsv/scripts/generate-all-docs.py53 # Step 1: Generate rule documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py62 # Step 2: Generate dialect documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py71 # Step 3: Generate CLI documentationCOMMENT
LOWdocsv/scripts/generate-all-docs.py80 # Step 4: Generate API documentationCOMMENT
LOWsrc/sqlfluff/rules/tsql/TQ02.py156 # so we need to check if there's a terminator after the last statementCOMMENT
Modern Structural Boilerplate10 hits · 10 pts
SeverityFileLineSnippetContext
LOWsrc/sqlfluff/diff_quality_plugin.py19logger = logging.getLogger(__name__)CODE
LOWsrc/sqlfluff/core/config/fluffconfig.py622 def set_value(self, config_path: Iterable[str], val: Any) -> None:CODE
LOWsrc/sqlfluff/core/parser/rust_parser.py56def set_profiling(enabled: bool) -> None:CODE
LOWsrc/sqlfluff/core/parser/rust_parser.py101def set_native_ast(enabled: bool) -> None:CODE
LOWsrc/sqlfluff/core/parser/context.py319 def update_progress(self, char_idx: int) -> None:CODE
LOWsrc/sqlfluff/core/parser/segments/raw.py369__all__ = [CODE
LOWsrc/sqlfluff/core/parser/segments/base.py754 def set_as_parent(self, recurse: bool = True) -> None:CODE
LOWsrc/sqlfluff/core/parser/segments/base.py762 def set_parent(self, parent: BaseSegment, idx: int) -> None:CODE
LOWsrc/sqlfluff/core/dialects/__init__.py109__all__ = [CODE
LOWsrc/sqlfluff/core/dialects/base.py333 def set_lexer_matchers(self, lexer_matchers: list[LexerType]) -> None:CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHsrc/sqlfluff/rules/structure/ST10.py59 # often included in auto-generated code.COMMENT
Slop Phrases4 hits · 6 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml7 # If adding any exceptions here, make sure to add them to .editorconfig as wellCOMMENT
LOW.pre-commit-config.yaml40 # `requirements_dev.txt`. If you update these, make sure to update those too.COMMENT
MEDIUMexamples/06_full_parse_api.py57# siblings of the parent, you can use .recursive_crawl().STRING
LOWsrc/sqlfluff/core/linter/fix.py267 # If we fail to validate a child segment, make sure to validate thisCOMMENT
Modern AI Meta-Vocabulary2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMsqlfluffrs/ENGINE.md121 └── utils/rustify.py build # orchestrates, emits RustCODE
MEDIUMsqlfluffrs/sqlfluffrs_python/src/lib.rs1//! sqlfluffrs_python: scaffold for Python-facing bindingsCOMMENT