MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

↓ 1 callersMethod_remove_unneeded_brackets
( self, context: RuleContext, bracketed: Segments )
src/sqlfluff/rules/structure/ST08.py:123
↓ 1 callersMethod_report_conflicting_fixes_same_anchor
(message: str)
src/sqlfluff/core/linter/linter.py:382
↓ 1 callersMethod_report_unused_alias
(self, alias: AliasInfo)
src/sqlfluff/rules/aliasing/AL05.py:300
↓ 1 callersMethod_reset_terminators
Reset the terminators attribute of the class. This method is used to reset the terminators attribute of the class. If the clear_termi
src/sqlfluff/core/parser/context.py:207
↓ 1 callersMethod_resolve_and_mark_reference
(self, query: AL05Query, ref: RawSegment)
src/sqlfluff/rules/aliasing/AL05.py:290
↓ 1 callersMethod_resolve_reference
( self, r: ObjectReferenceSegment, tbl_refs: list[ tuple[ObjectReferenceSe
src/sqlfluff/rules/references/RF01.py:261
↓ 1 callersFunction_revise_comment_lines
Given an initial set of individual lines. Revise comment ones. NOTE: This mutates the `lines` argument. We do this to ensure that lines with
src/sqlfluff/utils/reflow/reindent.py:717
↓ 1 callersFunction_revise_skipped_source_lines
Given an initial set of individual lines, revise any with skipped source. NOTE: This mutates the `lines` argument. In the cases of {% if ...
src/sqlfluff/utils/reflow/reindent.py:634
↓ 1 callersFunction_revise_templated_lines
Given an initial set of individual lines. Revise templated ones. NOTE: This mutates the `lines` argument. We do this to ensure that template
src/sqlfluff/utils/reflow/reindent.py:226
↓ 1 callersMethod_run_sqlfluff
(self, src_paths)
src/sqlfluff/diff_quality_plugin.py:81
↓ 1 callersMethod_set_terminators
Set the terminators used in the class. This private method sets the terminators used in the class. If `clear_terminators` is True and
src/sqlfluff/core/parser/context.py:165
↓ 1 callersMethod_should_ignore_reference
( self, reference: ObjectReferenceSegment, selectable: Selectable )
src/sqlfluff/rules/references/RF01.py:160
↓ 1 callersMethod_should_ignore_violation_line_range
Returns whether to ignore a violation at line_no. Loop through the NoQaDirectives to find the state of things at line_no. Assumptions
src/sqlfluff/core/rules/noqa.py:258
↓ 1 callersFunction_should_terminate_rst_code_block
Return whether an indented line should terminate a converted code block.
docsv/scripts/generate-rules-docs.py:148
↓ 1 callersMethod_skip_non_code_and_meta_backward
Move ``idx`` backward past any non-code or meta segments.
src/sqlfluff/core/parser/grammar/lookbehind.py:62
↓ 1 callersFunction_source_char_len
Calculate length in the source file. NOTE: This relies heavily on the sequence already being split appropriately. It will raise errors if not
src/sqlfluff/utils/reflow/reindent.py:1940
↓ 1 callersMethod_split_list_by_segment_type
( segment_list: list[BaseSegment], delimiter_type: str, delimiters: list[str] )
src/sqlfluff/rules/structure/ST09.py:306
↓ 1 callersMethod_stack_pos_interpreter
Interpret a path step for stack_positions.
src/sqlfluff/utils/reflow/depthmap.py:23
↓ 1 callersMethod_subdivide
Given a string, subdivide if we area allowed to. Returns: :obj:`tuple` of segments
src/sqlfluff/core/parser/lexer.py:234
↓ 1 callersMethod_suffix
Return any extra output required at the end when logging. NB Override this for specific subclasses if we want extra output.
src/sqlfluff/core/parser/segments/base.py:442
↓ 1 callersMethod_template_segment_to_rstoken
Convert a Python TemplateSegment to a Rust RsToken. Creates a template placeholder token with the segment's metadata. This al
src/sqlfluff/core/parser/rust_parser.py:418
↓ 1 callersMethod_unsafe_process
(self, fname, in_str=None, config=None, dbt_dir=os.getcwd())
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:630
↓ 1 callersFunction_validate_one_reference
( single_table_references: str, ref: ObjectReferenceSegment, this_ref_type: str, standalone_al
src/sqlfluff/rules/references/RF03.py:238
↓ 1 callersMethod_validate_reflow_sequence
(elements: ReflowSequenceType)
src/sqlfluff/utils/reflow/sequence.py:106
↓ 1 callersFunction_validate_structure
Helper function to narrow types for use by SQLFluff. This is a recursive function on any dict keys found.
src/sqlfluff/core/config/toml.py:31
↓ 1 callersMethod_visit_queries
(self, query: Query, visited: set)
src/sqlfluff/rules/references/RF03.py:119
↓ 1 callersMethodadd
Add a set of rule timings.
src/sqlfluff/core/timing.py:49
↓ 1 callersMethodadd_rule
Add a new recipe to the domain.
docs/source/_ext/sqlfluff_domain.py:134
↓ 1 callersMethodadd_update_segments
Scans module dictionary, adding or replacing segment definitions.
src/sqlfluff/core/dialects/base.py:243
↓ 1 callersFunctionand_
Returns a function that computes the functions and-ed together.
src/sqlfluff/utils/functional/segment_predicates.py:117
↓ 1 callersMethodas_str
String representation for logging/testing.
src/sqlfluff/utils/analysis/query.py:64
↓ 1 callersFunctionassemble_site
Merge one built docs channel into the assembled site tree.
docsv/scripts/assemble-site.py:199
↓ 1 callersFunctionassert_structure
Check that a parsed sql file matches the yaml file with the same name.
test/core/templaters/jinja_test.py:700
↓ 1 callersFunctionassert_violations_after_fix
Assert that the given violations are found in the fixed sql.
src/sqlfluff/utils/testing/rules.py:280
↓ 1 callersFunctionassert_violations_before_fix
Assert that the given violations are found in the given sql.
src/sqlfluff/utils/testing/rules.py:260
↓ 1 callersFunctionauto_fix_test
A test for roundtrip testing, take a file buffer, lint, fix and lint. This is explicitly different from the linter version of this, in that i
test/rules/std_fix_auto_test.py:47
↓ 1 callersFunctionbenchmark_python_lexer
Benchmark Python lexer.
utils/benchmark_parser.py:17
↓ 1 callersFunctionbenchmark_python_parser
Benchmark Python parser (lex + parse).
utils/benchmark_parser.py:67
↓ 1 callersFunctionbenchmark_rust_lexer
Benchmark Rust lexer.
utils/benchmark_parser.py:42
↓ 1 callersFunctionbenchmark_rust_parser
Benchmark Rust parser (lex + parse).
utils/benchmark_parser.py:99
↓ 1 callersMethodbreak_long_lines
Rebreak any remaining long lines in a sequence. This assumes that reindent() has already been applied.
src/sqlfluff/utils/reflow/sequence.py:656
↓ 1 callersFunctionbuild_generated_output
Builds rust output from python.
utils/rustify.py:44
↓ 1 callersFunctionbuild_global_headers
Build generic cache-control headers for mutable channels and version assets.
docsv/scripts/assemble-site.py:171
↓ 1 callersFunctionbuild_redirects
Build the Netlify redirects file from the assembled manifest.
docsv/scripts/assemble-site.py:149
↓ 1 callersMethodcache_key
Get the cache key for this parser. For parsers, they're unique per-instance.
src/sqlfluff/core/parser/parsers.py:48
↓ 1 callersFunctionchange_dir
Set the current working directory to `path` for the duration of the context.
test/core/config/loader_test.py:113
↓ 1 callersFunctioncheck_cargo_installed
Check if cargo is installed and available. Returns: bool: True if cargo is installed, False otherwise.
util.py:92
↓ 1 callersFunctioncheck_generated_output
Check output matches file.
utils/rustify.py:13
↓ 1 callersMethodcheck_parse_cache
Check against the parse cache for a pre-existing match. If no match is found in the cache, this returns None.
src/sqlfluff/core/parser/context.py:337
↓ 1 callersFunctioncheck_still_complete
Check that the segments in are the same as the segments out.
src/sqlfluff/core/parser/helpers.py:16
↓ 1 callersMethodchildren
Returns an object with children of the segments in this object.
src/sqlfluff/utils/functional/segments.py:120
↓ 1 callersFunctioncli
Launch the utility cli.
util.py:37
↓ 1 callersFunctioncli
SQLFluff is a modular SQL linter for humans.
src/sqlfluff/cli/commands.py:581
↓ 1 callersMethodcli_table_row
Make a row of a CLI table, using wrapped values.
src/sqlfluff/cli/formatters.py:297
↓ 1 callersMethodclose
(self)
test/core/linter/linter_test.py:589
↓ 1 callersMethodcodes
Returns an iterator through the codes contained in the pack.
src/sqlfluff/core/rules/base.py:896
↓ 1 callersFunctioncompare_results
Compare Python and Rust parser results and show statistics. Args: python_results: Benchmark results from Python parser rust_resul
utils/benchmark_parsing.py:189
↓ 1 callersMethodcompose_select
Compose our final new CTE.
src/sqlfluff/rules/structure/ST05.py:435
↓ 1 callersMethodconfig_pairs
Returns info about the given templater for output by the cli. Returns: list[tuple[str, str]]: A list of tuples containing informa
src/sqlfluff/core/templaters/base.py:606
↓ 1 callersMethodconfig_pairs
Returns info about the given templater for output by the cli.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:190
↓ 1 callersMethodconnection
Context manager that manages a dbt connection, if needed.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:869
↓ 1 callersMethodconstruct_segment
Construct a segment using the given class a properties. Unless an override `type` is provided in the `segment_kwargs`, it is assumed
src/sqlfluff/core/parser/lexer.py:288
↓ 1 callersFunctioncontains_ansi_escape
Does the string contain ANSI escape codes (e.g. color)?
test/cli/commands_test.py:76
↓ 1 callersFunctionconvert_pep440_to_semver
Convert Python PEP 440 version to Rust SemVer format. Maturin automatically converts SemVer back to PEP 440 for Python packages. See: https:/
util.py:63
↓ 1 callersFunctioncore_templaters
Returns the templater tuples for the core templaters.
src/sqlfluff/core/templaters/__init__.py:13
↓ 1 callersMethodcreate_cte_alias
Find or create the name for the next CTE.
src/sqlfluff/rules/structure/ST05.py:411
↓ 1 callersMethoddeduplicate_in_source_space
Removes duplicates in the source space. This is useful for templated files with loops, where we'll get a violation for each pass arou
src/sqlfluff/core/linter/linted_file.py:96
↓ 1 callersFunctiondefault_manifest
Build the default versions manifest for the beta site.
docsv/scripts/assemble-site.py:70
↓ 1 callersFunctiondetermine_constraints
Given the surrounding blocks, determine appropriate constraints.
src/sqlfluff/utils/reflow/respace.py:160
↓ 1 callersFunctiondialect_shell_complete
Shell completion for possible dialect names. We use this over click.Choice as we want to internally handle error messages and codes for incor
src/sqlfluff/cli/autocomplete.py:21
↓ 1 callersFunctiondialect_specific_segment_not_match
Check specific segments of a dialect which will not match to a segment.
test/dialects/conftest.py:125
↓ 1 callersMethoddiff_to
Compare this config to another. This is primarily used in the CLI logs to indicate to the user what values have been changed for each
src/sqlfluff/core/config/fluffconfig.py:502
↓ 1 callersMethoddiscard_fixes_for_lint_errors_in_files_with_tmp_or_prs_errors
Discard lint fixes for files with templating or parse errors.
src/sqlfluff/core/linter/linted_dir.py:228
↓ 1 callersMethoddiscard_unsafe_fixes
Remove (discard) LintResult fixes if they are "unsafe". By removing its fixes, a LintResult will still be reported, but it will be tr
src/sqlfluff/core/rules/base.py:709
↓ 1 callersMethoddispatch_dialect_warning
Dispatch a warning for dialects.
src/sqlfluff/core/formatter.py:48
↓ 1 callersMethoddispatch_lint_header
Dispatch the header displayed before linting.
src/sqlfluff/core/formatter.py:32
↓ 1 callersMethoddispatch_parse_header
Dispatch the header displayed before parsing.
src/sqlfluff/core/formatter.py:63
↓ 1 callersMethoddispatch_path
Dispatch paths for display.
src/sqlfluff/core/formatter.py:73
↓ 1 callersMethoddispatch_persist_filename
Called after a formatted file as been persisted to disk.
src/sqlfluff/core/formatter.py:27
↓ 1 callersMethoddispatch_processing_header
Dispatch the header displayed before linting.
src/sqlfluff/core/formatter.py:68
↓ 1 callersMethoddispatch_template_header
Dispatch the header displayed before templating.
src/sqlfluff/core/formatter.py:53
↓ 1 callersFunctiondistribute_work
Distribute work keep track of progress.
test/generate_parse_fixture_yml.py:26
↓ 1 callersFunctiondo_fixes
Actually do the fixes.
src/sqlfluff/cli/commands.py:1000
↓ 1 callersMethodedit
Stub.
src/sqlfluff/core/parser/segments/base.py:1304
↓ 1 callersMethodelements_to_segments
Convert a tuple of lexed elements into a tuple of segments.
src/sqlfluff/core/parser/lexer.py:806
↓ 1 callersMethodensure_space_after_from
Ensure there's whitespace between "FROM" and the CTE table name.
src/sqlfluff/rules/structure/ST05.py:453
↓ 1 callersFunctionexecute
(command, exit_codes)
test/diff_quality_plugin_test.py:27
↓ 1 callersFunctionextract_command_info
Extract information from a Click command. Args: cmd_name: Name of the command cmd: Click command object Returns: Dic
docsv/scripts/generate-cli-docs.py:151
↓ 1 callersMethodextract_possible_multipart_references
Extract possible multipart references, e.g. schema.table.
src/sqlfluff/dialects/dialect_ansi.py:1159
↓ 1 callersMethodextract_tag_contents
Given Jinja tag info, return the stuff inside the braces. I.e. Trim off the brackets and the whitespace. Args: str_parts
src/sqlfluff/core/templaters/slicers/tracer.py:757
↓ 1 callersFunctionfind_3_element_tuples
(obj, depth=0)
test/cli/test_parse_with_positions.py:256
↓ 1 callersMethodfind_slice_index
Given a slice identifier, return its index. A slice identifier is a string like 00000000000000000000000000000002.
src/sqlfluff/core/templaters/slicers/tracer.py:134
↓ 1 callersFunctionfirst_non_whitespace
Return the upper first non-whitespace segment in the iterable.
src/sqlfluff/core/parser/match_algorithms.py:66
↓ 1 callersFunctionfirst_trimmed_raw
Trim whitespace off a whole element raw. Used as a helper function in BaseGrammar._look_ahead_match. For existing compound segments, we shou
src/sqlfluff/core/parser/match_algorithms.py:44
↓ 1 callersFunctionformat_configuration_section
Convert Configuration section from list format to markdown table. Also removes duplicate metadata (Name, Aliases, Groups) that appears in docstri
docsv/scripts/generate-rules-docs.py:465
↓ 1 callersMethodformat_dialects
Format the dialects yielded by `dialect_readout`.
src/sqlfluff/cli/formatters.py:591
↓ 1 callersFunctionformat_linting_result_header
Format the header of a linting result output.
src/sqlfluff/cli/formatters.py:62
↓ 1 callersMethodformat_linting_stats
Format a set of stats given a `LintingResult`.
src/sqlfluff/cli/formatters.py:503
↓ 1 callersFunctionformat_option_default
Format the default value of a Click parameter for display. Args: param: Click parameter object Returns: Formatted default va
docsv/scripts/generate-cli-docs.py:118
↓ 1 callersFunctionformat_option_type
Format the type of a Click parameter for display. Args: param: Click parameter object Returns: Human-readable type string
docsv/scripts/generate-cli-docs.py:89
← previousnext →801–900 of 2,340, ranked by callers