MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

Functionrender
Render SQL files and just spit out the result. PATH is the path to a sql file. This should be either a single file file ('path/to/file.sql')
src/sqlfluff/cli/commands.py:1773
Methodrender_func
Render the string using the captured live_context. In order to support mocking of template variables containing "." character
src/sqlfluff/core/templaters/python.py:241
Methodrender_func
(in_str)
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:666
Functionreplace_admonition
(match)
docsv/scripts/generate-dialects-docs.py:109
Functionreplace_backtick_ref
(match: re.Match[str])
docsv/scripts/generate-rules-docs.py:438
Functionreplace_code_block
(match)
docsv/scripts/generate-dialects-docs.py:73
Functionreplace_code_block
(match)
docsv/scripts/generate-cli-docs.py:65
Functionreplace_config
(match)
docsv/scripts/generate-rules-docs.py:508
Functionreplace_plain_ref
(match: re.Match[str])
docsv/scripts/generate-rules-docs.py:447
Functionreplace_ref_link
(match)
docsv/scripts/generate-dialects-docs.py:55
Methodresolve_xref
Hook to resolve xrefs. References can be made by code or by name, e.g. - :sqlfluff:ref:`LT01` - :sqlfluff:ref:`layout.spacing
docs/source/_ext/sqlfluff_domain.py:112
Functionroot_equals
Return a string that has col = val.
test/fixtures/templater/jinja_m_libraries_module/libs/__init__.py:4
Methodrule_name
Fetch the name of the rule which cause this error.
src/sqlfluff/core/errors.py:388
Functionrules
Show the current rules in use.
src/sqlfluff/cli/commands.py:602
Methodrun
Sequential implementation.
src/sqlfluff/core/linter/runner.py:115
Methodrun
Parallel implementation. Note that the partials are generated one at a time then passed directly into the pool as they're ready. This
src/sqlfluff/core/linter/runner.py:174
Functionrun_query
(sql)
test/core/templaters/jinja_test.py:548
Functionsafe_load_config_at_path
(path)
test/cli/commands_test.py:1739
Methodsearch
Use string methods to find a substring.
src/sqlfluff/core/parser/lexer.py:174
Methodsegment
Returns a Segments object for context.segment.
src/sqlfluff/utils/functional/context.py:14
Methodselect
Retrieve range/subset. NOTE: Iterates the slices BETWEEN start_slice and stop_slice, i.e. those slices are not included in the loop.
src/sqlfluff/utils/functional/templated_file_slices.py:44
Methodselect
Retrieve range/subset. NOTE: Iterates the slices BETWEEN start_slice and stop_slice, i.e. those slices are not included in the loop.
src/sqlfluff/utils/functional/raw_file_slices.py:38
Methodselect_info
Returns SelectStatementColumnsAndTables on the SELECT.
src/sqlfluff/utils/analysis/query.py:69
Functionsetup
Configures the documentation app.
docs/source/conf.py:190
Functionsetup
Setup the domain.
docs/source/_ext/sqlfluff_domain.py:145
Methodsiblings_post
Returns a Segments object for context.siblings_post.
src/sqlfluff/utils/functional/context.py:35
Methodsiblings_post
Return sibling segments after self.segment.
src/sqlfluff/core/rules/context.py:45
Methodsiblings_pre
Returns a Segments object for context.siblings_pre.
src/sqlfluff/utils/functional/context.py:28
Methodsiblings_pre
Return sibling segments prior to self.segment.
src/sqlfluff/core/rules/context.py:37
Methodsimple
Try to obtain a simple response from the matcher. Returns: None - if not simple. Tuple of two sets of strings if simp
src/sqlfluff/core/parser/matchable.py:28
Methodsimple
Does this matcher support a lowercase hash matching route?
src/sqlfluff/core/parser/grammar/base.py:183
Methodsimple
Check if the matcher supports an uppercase hash matching route. Bracketed does this easily, we just look for the bracket.
src/sqlfluff/core/parser/grammar/sequence.py:435
Methodsimple
Does this matcher support a uppercase hash matching route? AnyNumberOf does provide this, as long as *all* the elements *also* do.
src/sqlfluff/core/parser/grammar/anyof.py:95
Methodsimple
This element doesn't work with simple.
src/sqlfluff/core/parser/grammar/noncode.py:20
Methodsimple
This element doesn't work with simple.
src/sqlfluff/core/parser/grammar/lookbehind.py:49
Methodsimple
Simple methods for bracketed and the persistent brackets.
src/sqlfluff/core/parser/segments/bracketed.py:73
Methodsimple
Does this matcher support an uppercase hash matching route? This should be true if the MATCH grammar is simple. Most more complicated
src/sqlfluff/core/parser/segments/meta.py:75
Methodsimple
Does this matcher support an uppercase hash matching route? This should be true if the MATCH grammar is simple. Most more complicated
src/sqlfluff/core/parser/segments/base.py:568
Methodsource_fixes
Return any source fixes as list.
src/sqlfluff/core/parser/segments/raw.py:137
Methodsource_fixes
Return any source fixes as list.
src/sqlfluff/core/parser/segments/base.py:405
Methodsource_signature
Return hashable source signature for deduplication. For linting errors we need to dedupe on more than just location and description,
src/sqlfluff/core/errors.py:392
Methodstack
Return stacks as a tuples so that it can't be edited.
src/sqlfluff/core/parser/context.py:333
Methodstats
Return a stats dictionary of this result.
src/sqlfluff/core/linter/linting_result.py:98
Methodstringify
Use indentation to render this segment and its children as a string.
src/sqlfluff/core/parser/segments/base.py:835
Functiontable
Return the parameter with foo_ in front of it.
test/fixtures/templater/jinja_r_library_in_macro/libs/foo.py:6
Functiontable
Return the parameter with foo_ in front of it.
test/fixtures/templater/jinja_m_libraries_module/libs/foo/__init__.py:6
Functiontable
Return the parameter with foo_ in front of it.
test/fixtures/templater/jinja_j_libraries/libs/foo.py:6
Functiontemplated_slices
Returns raw slices for a segment.
src/sqlfluff/utils/functional/segment_predicates.py:165
Methodterminate
(self)
test/core/linter/linter_test.py:648
Methodterminator_hit_rate
Return terminator hit rate.
utils/compare_parser_metrics.py:63
Functiontest___main___help
Test that the CLI can be access via __main__.
test/cli/commands_test.py:2169
Functiontest__api__config_override
Test that parameters to lint() override .sqlfluff correctly (or not).
test/api/simple_test.py:643
Functiontest__api__config_path
Test that we can load a specified config file in the Simple API.
test/api/simple_test.py:507
Functiontest__api__fix_dialect_config_path
Test that we can load a dialect from a config file in the Simple API fix.
test/api/simple_test.py:605
Functiontest__api__fix_string
Basic checking of lint functionality.
test/api/simple_test.py:417
Functiontest__api__fix_string_specific
Basic checking of lint functionality with a specific rule.
test/api/simple_test.py:434
Functiontest__api__fix_string_specific_exclude
Basic checking of lint functionality with a specific rule exclusion.
test/api/simple_test.py:441
Functiontest__api__fix_string_unparsable
Test behavior with parse errors.
test/api/simple_test.py:448
Functiontest__api__fix_string_unparsable_fix_even_unparsable
Test behavior with parse errors.
test/api/simple_test.py:458
Functiontest__api__immutable_config
Tests that a config is not mutated when parsing.
test/core/config/fluffconfig_test.py:416
Functiontest__api__info_dialects
Basic linting of dialects.
test/api/info_test.py:7
Functiontest__api__info_rules
Basic linting of dialects.
test/api/info_test.py:29
Functiontest__api__invalid_dialect
Test that SQLFluffUserError is raised for a bad dialect.
test/api/simple_test.py:653
Functiontest__api__lexer
Basic checking of lexing functionality.
test/api/classes_test.py:8
Functiontest__api__lint_dialect_config_path
Test that we can load a dialect from a config file in the Simple API lint.
test/api/simple_test.py:573
Functiontest__api__lint_string
Basic checking of lint functionality.
test/api/simple_test.py:363
Functiontest__api__lint_string_specific
Basic checking of lint functionality.
test/api/simple_test.py:373
Functiontest__api__lint_string_specific_exclude
Basic checking of lint functionality.
test/api/simple_test.py:389
Functiontest__api__lint_string_specific_exclude_all_failed_rules
Basic checking of lint functionality.
test/api/simple_test.py:409
Functiontest__api__lint_string_specific_exclude_single
Basic checking of lint functionality.
test/api/simple_test.py:398
Functiontest__api__lint_string_specific_single
Basic checking of lint functionality.
test/api/simple_test.py:381
Functiontest__api__lint_string_without_violations
Check lint functionality when there is no violation.
test/api/simple_test.py:357
Functiontest__api__linter_fix
Basic checking of parsing functionality.
test/api/classes_test.py:32
Functiontest__api__linter_lint
Basic checking of parsing functionality.
test/api/classes_test.py:24
Functiontest__api__parse_dialect_config_path
Test that we can load a dialect from a config file in the Simple API parse.
test/api/simple_test.py:536
Functiontest__api__parse_exceptions
Test parse behaviour with errors.
test/api/simple_test.py:670
Functiontest__api__parse_fail
Basic failure mode of parse functionality.
test/api/simple_test.py:488
Functiontest__api__parse_string
Basic checking of parse functionality.
test/api/simple_test.py:473
Functiontest__api__parser
Basic checking of parsing functionality.
test/api/classes_test.py:17
Functiontest__attempt_to_change_templater_warning
Test warning when changing templater in .sqlfluff file in subdirectory.
test/core/linter/linter_test.py:1120
Functiontest__cli__command__fix
Test the round trip of detecting, fixing and then not detecting the rule.
test/cli/commands_test.py:1116
Functiontest__cli__command__fix
Test the round trip of detecting, fixing and then not detecting given rule.
test/rules/std_roundtrip_test.py:124
Functiontest__cli__command__fix_check
Round trip test, using the prompts.
test/cli/commands_test.py:1482
Functiontest__cli__command__fix_templated
Roundtrip test, making sure that we don't drop tags while templating.
test/rules/std_roundtrip_test.py:130
Functiontest__cli__command_dialect
Check the script raises the right exception on an unknown dialect.
test/cli/commands_test.py:111
Functiontest__cli__command_dialect_legacy
Check the script raises the right exception on a legacy dialect.
test/cli/commands_test.py:228
Functiontest__cli__command_dialects
Check dialects command for exceptions.
test/cli/commands_test.py:1043
Functiontest__cli__command_directed
Basic checking of lint functionality.
test/cli/commands_test.py:88
Functiontest__cli__command_extra_config_fail
Check the script raises the right exception non-existent extra config path.
test/cli/commands_test.py:245
Functiontest__cli__command_fail_nice_not_found
Check commands fail as expected when then don't find files.
test/cli/commands_test.py:1719
Functiontest__cli__command_fix_large_file_skip_fail
Test that `fix` returns exit code 1 when large_file_skip_fail is set. When a file is skipped due to large_file_skip_byte_limit and the large_
test/cli/commands_test.py:2695
Functiontest__cli__command_fix_skip_ignore_files
Check "ignore file" is skipped when --disregard-sqlfluffignores flag is set.
test/cli/commands_test.py:909
Functiontest__cli__command_fix_stdin
Check stdin input for fix works.
test/cli/commands_test.py:1358
Functiontest__cli__command_fix_stdin_error_exit_code
Check that the CLI fails nicely if fixing a templated stdin.
test/cli/commands_test.py:1463
Functiontest__cli__command_fix_stdin_logging_to_stderr
Check that logging goes to stderr when stdin is passed to fix.
test/cli/commands_test.py:1411
Functiontest__cli__command_fix_stdin_safety
Check edge cases regarding safety when fixing stdin.
test/cli/commands_test.py:1431
Functiontest__cli__command_format_stdin
Check stdin input for fix works.
test/cli/commands_test.py:1399
Functiontest__cli__command_invalid_pyproject_toml_user_error
Invalid pyproject.toml should surface a concise user error.
test/cli/commands_test.py:1731
Functiontest__cli__command_lint_empty_stdin
Check linting an empty file raises no exceptions. https://github.com/sqlfluff/sqlfluff/issues/4807
test/cli/commands_test.py:429
Functiontest__cli__command_lint_ignore_local_config
Test that --ignore-local_config ignores .sqlfluff file as expected.
test/cli/commands_test.py:925
← previousnext →1,601–1,700 of 2,340, ranked by callers