Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sqlfluff/sqlfluff
/ functions
Functions
2,340 in github.com/sqlfluff/sqlfluff
⨍
Functions
2,340
◇
Types & classes
2,379
↳
Endpoints
59
↓ 1 callers
Method
map_template_slices
Create a tuple of TemplateElement from a tuple of LexedElement. This adds slices in the templated file to the original lexed elements
src/sqlfluff/core/parser/lexer.py:871
↓ 1 callers
Method
match
Match delimited sequences. To achieve this we flip flop between looking for content and looking for delimiters. Individual elements o
src/sqlfluff/core/parser/grammar/delimited.py:88
↓ 1 callers
Method
match
Match when the position is preceded by the configured keywords. Scans backward from ``idx`` through non-code and meta segments, check
src/sqlfluff/core/parser/grammar/lookbehind.py:71
↓ 1 callers
Method
match
Match a list of segments against this segment. Note: Match for segments is done in the ABSTRACT. When dealing with concrete then we'r
src/sqlfluff/core/parser/segments/base.py:673
↓ 1 callers
Method
match_file
Return a truthy match result if the file is ignored.
src/sqlfluff/core/linter/discovery.py:30
↓ 1 callers
Function
nested_dict_get
Perform a lookup in a nested dict object. Lookups are performed by iterating keys. >>> nested_dict_get( ... {"a": {"b": "c"}}, ("a",
src/sqlfluff/core/helpers/dict.py:186
↓ 1 callers
Function
nested_dict_set
Set a value in a nested dict object. Lookups are performed by iterating keys. >>> d = {"a": {"b": "c"}} >>> nested_dict_set(d, ("a", "b")
src/sqlfluff/core/helpers/dict.py:243
↓ 1 callers
Method
num_violations
Count the number of violations. Optionally now with filters.
src/sqlfluff/core/linter/linted_file.py:172
↓ 1 callers
Function
parse_args
Parse command line arguments.
docsv/scripts/assemble-site.py:14
↓ 1 callers
Function
parse_instructions
Parse the INSTRUCTIONS block. Returns a list of instruction dictionaries. Extracts variant, child indices, counts, flags, parse mode, and com
utils/rust_to_python_grammar.py:40
↓ 1 callers
Function
parse_number_array
Parse a Rust array of numbers.
utils/rust_to_python_grammar.py:87
↓ 1 callers
Function
parse_strings
Parse a Rust array of strings.
utils/rust_to_python_grammar.py:94
↓ 1 callers
Function
parse_with_python
Parse SQL with Python parser and collect metrics.
utils/compare_parser_metrics.py:241
↓ 1 callers
Function
parse_with_rust
Parse SQL with Rust parser and collect metrics.
utils/compare_parser_metrics.py:286
↓ 1 callers
Function
parse_with_rust_fallback
Parse with Rust, returning None if not available.
utils/compare_parser_metrics.py:325
↓ 1 callers
Function
parse_with_sqlfluff
Parse a SQL file using sqlfluff and measure timing. Args: sql_file: Path to SQL file use_rust: Whether to use Rust parser
utils/benchmark_parsing.py:56
↓ 1 callers
Function
print_comparison
Print side-by-side comparison of metrics.
utils/compare_parser_metrics.py:336
↓ 1 callers
Method
print_out_residual_error_counts
Output the residual error totals for the file. Args: total_errors (int): The total number of templating & parsing errors.
src/sqlfluff/cli/formatters.py:623
↓ 1 callers
Method
print_out_violations_and_timing
Used by human formatting during the `sqlfluff parse` command.
src/sqlfluff/cli/formatters.py:681
↓ 1 callers
Method
print_statistics
Print table statistics.
utils/build_parsers.py:1557
↓ 1 callers
Function
print_stats
Print Rust parser statistics.
utils/benchmark_parser.py:146
↓ 1 callers
Function
process_spacing
Given the existing spacing, extract information and do basic pruning.
src/sqlfluff/utils/reflow/respace.py:216
↓ 1 callers
Method
process_with_variants
Extended version of `process` which returns multiple variants. Unless explicitly defined, this simply yields the result of .process().
src/sqlfluff/core/templaters/base.py:583
↓ 1 callers
Method
process_with_variants
Process a string and return one or more variant renderings. Note that the arguments are enforced as keywords because Templaters can h
src/sqlfluff/core/templaters/jinja.py:1050
↓ 1 callers
Method
progress_bar
Set up the progress bar (if it's not already set up). Args: last_char (:obj:`int`): The templated character position of the
src/sqlfluff/core/parser/context.py:292
↓ 1 callers
Method
put_parse_cache
Store a match in the cache for later retrieval.
src/sqlfluff/core/parser/context.py:346
↓ 1 callers
Method
raw_normalized
Iterate raw segments, return normalized value.
src/sqlfluff/core/parser/segments/base.py:997
↓ 1 callers
Function
raw_upper_is
Returns a function that determines if segment matches one of the raw inputs.
src/sqlfluff/utils/functional/segment_predicates.py:29
↓ 1 callers
Function
rebreak_keywords_sequence
Reflow line breaks within a sequence. Initially this only _moves_ existing segments around line breaks (e.g. for operators and commas), b
src/sqlfluff/utils/reflow/rebreak.py:751
↓ 1 callers
Function
rebreak_sequence
Reflow line breaks within a sequence. Initially this only _moves_ existing segments around line breaks (e.g. for operators and commas), b
src/sqlfluff/utils/reflow/rebreak.py:376
↓ 1 callers
Method
remove_templated_errors
Filter a list of lint errors, removing those from the templated slices.
src/sqlfluff/core/linter/linter.py:339
↓ 1 callers
Method
replace_with_clone
(self, segment, clone_map)
src/sqlfluff/rules/structure/ST05.py:509
↓ 1 callers
Function
rst_code_block_to_markdown
Convert RST code-block directive to Markdown code fence. Args: rst_text: Text potentially containing RST code-block directives Retur
docsv/scripts/generate-cli-docs.py:49
↓ 1 callers
Function
rst_to_markdown
Convert RST docstring to Markdown. Args: rst_text: RST-formatted text Returns: Markdown-formatted text
docsv/scripts/generate-dialects-docs.py:20
↓ 1 callers
Function
rst_to_markdown
Convert RST docstring to Markdown. Args: rst_text: RST-formatted text Returns: Markdown-formatted text
docsv/scripts/generate-rules-docs.py:22
↓ 1 callers
Method
rule_code
Fetch the code of the rule which cause this error.
src/sqlfluff/core/errors.py:384
↓ 1 callers
Method
rule_name
Fetch the name of the rule which cause this error.
src/sqlfluff/core/errors.py:100
↓ 1 callers
Method
rule_reference_map
Generate a rule reference map for looking up rules. Generate the master reference map. The priority order is: codes > names > groups
src/sqlfluff/core/rules/base.py:1031
↓ 1 callers
Function
rules__test_helper
Test that a rule passes/fails on a set of test_cases. Optionally, also test the fixed string if provided in the test case.
src/sqlfluff/utils/testing/rules.py:310
↓ 1 callers
Method
run
Run linting on the specified list of files.
src/sqlfluff/core/linter/runner.py:86
↓ 1 callers
Function
segment_to_token_name
Convert a segment class name to a token name.
utils/build_lexers.py:21
↓ 1 callers
Method
sequence_files
Reorder fnames to process dependent files first. This avoids errors when an ephemeral model is processed before use.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:458
↓ 1 callers
Function
should_split_on_colon
Heuristic for legit values containing comma.
src/sqlfluff/core/helpers/string.py:66
↓ 1 callers
Method
simple
Check if the matcher supports uppercase hash matching route. The TypedParser segment does not support matching against raw strings, b
src/sqlfluff/core/parser/parsers.py:141
↓ 1 callers
Method
simple
Return simple options for this matcher. Because string matchers are not case sensitive we can just return the template here.
src/sqlfluff/core/parser/parsers.py:198
↓ 1 callers
Method
simple
Return simple options for this matcher. Because string matchers are not case sensitive we can just return the templates here.
src/sqlfluff/core/parser/parsers.py:250
↓ 1 callers
Method
simple
Does this matcher support a uppercase hash matching route? Regex segment does NOT for now. We might need to later for efficiency.
src/sqlfluff/core/parser/parsers.py:310
↓ 1 callers
Method
simple
Does this matcher support a uppercase hash matching route? Sequence does provide this, as long as the *first* non-optional element do
src/sqlfluff/core/parser/grammar/sequence.py:94
↓ 1 callers
Method
slice_file
Slice the file to determine regions where we can fix.
src/sqlfluff/core/templaters/python.py:367
↓ 1 callers
Method
source_signature
Return hashable source signature for deduplication.
src/sqlfluff/core/errors.py:133
↓ 1 callers
Function
split_colon_separated_string
r"""Converts a colon separated string. The final value in the string is handled separately the other others. >>> split_colon_separated_string
src/sqlfluff/core/helpers/string.py:29
↓ 1 callers
Function
split_string_on_spaces
Split a string into lines based on whitespace. For short strings the functionality is trivial. >>> split_string_on_spaces("abc") ['abc']
src/sqlfluff/cli/formatters.py:25
↓ 1 callers
Method
stringify
Pretty print a match for debugging.
src/sqlfluff/core/parser/match_result.py:96
↓ 1 callers
Method
summary
Generate a summary for display.
src/sqlfluff/core/timing.py:54
↓ 1 callers
Method
terminate
(self)
test/core/linter/linter_test.py:345
↓ 1 callers
Function
time_python_parser
Time Python parser.
utils/micro_benchmark_small.py:20
↓ 1 callers
Function
time_rust_parser
Time Rust parser.
utils/micro_benchmark_small.py:32
↓ 1 callers
Function
time_rust_with_lex
Time Rust parser including lexing.
utils/micro_benchmark_small.py:48
↓ 1 callers
Method
to_linting_error
Convert a linting result to a :exc:`SQLLintError` if appropriate.
src/sqlfluff/core/rules/base.py:134
↓ 1 callers
Method
to_source_string
Make a formatted string of this position.
src/sqlfluff/core/parser/markers.py:206
↓ 1 callers
Function
to_tuple
Convert a slice into a tuple of (start, stop).
src/sqlfluff/core/helpers/slice.py:4
↓ 1 callers
Method
to_tuple
Return a tuple structure from this segment. Unlike most segments, we return the _source_ content for placeholders if viewing metas is
src/sqlfluff/core/parser/segments/meta.py:240
↓ 1 callers
Method
track_block_end
On ending a 'for' or 'if' block, set up tracking. Args: block_type (str): The type of block ('block_start', 'block_mid',
src/sqlfluff/core/templaters/slicers/tracer.py:789
↓ 1 callers
Method
track_call
Set up tracking for "{% call ... %}". Args: m_open (regex.Match): A regex match object representing the opening tag.
src/sqlfluff/core/templaters/slicers/tracer.py:711
↓ 1 callers
Method
track_literal
Set up tracking for a Jinja literal.
src/sqlfluff/core/templaters/slicers/tracer.py:740
↓ 1 callers
Method
track_templated
Compute tracking info for Jinja templated region, e.g. {{ foo }}. Args: m_open (regex.Match): A regex match object representing t
src/sqlfluff/core/templaters/slicers/tracer.py:682
↓ 1 callers
Method
trim
Return a DepthInfo object with some amount trimmed.
src/sqlfluff/utils/reflow/depthmap.py:93
↓ 1 callers
Method
try_silence_dbt_logs
Attempt to silence dbt logs. During normal operation dbt is likely to log output such as: .. code-block:: 14:13:10 Regi
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:217
↓ 1 callers
Method
update_inside_set_call_macro_or_block
Based on block tag, update whether in a set/call/macro/block section.
src/sqlfluff/core/templaters/slicers/tracer.py:450
↓ 1 callers
Method
update_next_slice_indices
Based on block, update conditional jump info.
src/sqlfluff/core/templaters/slicers/tracer.py:811
↓ 1 callers
Function
upsert_manifest_entry
Insert or update a manifest entry for the published channel.
docsv/scripts/assemble-site.py:105
↓ 1 callers
Method
validate
Run sanity checks on generated tables.
utils/build_parsers.py:1327
↓ 1 callers
Method
violations_batch
Return a dictionary of Violations recorded in `src_paths`.
src/sqlfluff/diff_quality_plugin.py:54
↓ 1 callers
Method
violations_from_segments
Generate any lexing errors for any unlexables.
src/sqlfluff/core/parser/lexer.py:831
↓ 1 callers
Method
with_working_position
Copy this position and replace the working position.
src/sqlfluff/core/parser/markers.py:257
Function
_
(segment: BaseSegment)
src/sqlfluff/utils/functional/segment_predicates.py:23
Function
_
(raw_slice: RawFileSlice)
src/sqlfluff/utils/functional/raw_file_slice_predicates.py:22
Function
_
(raw_slice: TemplatedFileSlice)
src/sqlfluff/utils/functional/templated_file_slice_predicates.py:22
Method
__bool__
A MatchResult is truthy if it has length or inserts.
src/sqlfluff/core/parser/match_result.py:89
Method
__bool__
A LexMatch is truthy if it contains a non-zero number of matched elements.
src/sqlfluff/core/parser/lexer.py:123
Method
__call__
Don't fail when called unlike parent class.
src/sqlfluff/core/templaters/jinja.py:81
Method
__call__
When the wrapper is called, call the internal function.
src/sqlfluff/core/templaters/builtins/common.py:20
Method
__call__
When relation(*) is called return self as another relation.
src/sqlfluff/core/templaters/builtins/dbt.py:23
Method
__call__
Wraps jinja macro calls to handle dbt's `return` jinja function.
src/sqlfluff/core/templaters/builtins/dbt.py:80
Method
__enter__
(self)
test/core/linter/linter_test.py:336
Method
__enter__
(self)
src/sqlfluff/cli/commands.py:232
Method
__eq__
Errors compare equal if they are the same type and same content.
src/sqlfluff/core/errors.py:71
Method
__eq__
(self, other: Any)
src/sqlfluff/core/parser/markers.py:67
Method
__eq__
(self, other: Any)
src/sqlfluff/core/parser/segments/base.py:236
Method
__eq__
Return true if `other` is of the same class as this one. NB: This is useful in comparing configs.
src/sqlfluff/core/templaters/base.py:599
Method
__eq__
Compare equality with another fix. A fix is equal to another if is in the same place (position), with the same type and (if appropria
src/sqlfluff/core/rules/fix.py:179
Method
__exit__
(self, exc_type, exc_val, exc_tb)
test/core/linter/linter_test.py:339
Method
__exit__
(self, exc_type, exc_val, exc_tb)
src/sqlfluff/cli/commands.py:235
Method
__format__
(self, format_spec: str)
src/sqlfluff/core/templaters/python.py:280
Method
__ge__
(self, other: "PositionMarker")
src/sqlfluff/core/parser/markers.py:61
Method
__getattr__
Don't fail when called, remember instead.
src/sqlfluff/core/templaters/jinja.py:71
Method
__getattr__
Intercept any calls to undefined attributes. Args: item (str): The name of the attribute. Returns: object: A
src/sqlfluff/core/templaters/jinja.py:1184
Method
__getattr__
When relation.attribute is called return self as another relation. NOTE: If the attribute begins with `is_`, then return a boolean True.
src/sqlfluff/core/templaters/builtins/dbt.py:27
Method
__getattr__
When var.attribute is called return self as another placeholder.
src/sqlfluff/core/templaters/builtins/dbt.py:47
Method
__getitem__
Individual "getting" returns a single segment. NOTE: Using `SupportsIndex` rather than `int` is to ensure type compatibility with the
src/sqlfluff/utils/functional/segments.py:159
← previous
next →
1,001–1,100 of 2,340, ranked by callers