MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

↓ 1 callersMethod_get_subexpression_chunks
(expr: BaseSegment)
src/sqlfluff/rules/convention/CV12.py:311
↓ 1 callersMethod_get_table_refs
Given ObjectReferenceSegment, determine possible table references.
src/sqlfluff/rules/references/RF01.py:218
↓ 1 callersFunction_get_unpivot_table_aliases
Get standalone aliases introduced by UNPIVOT expressions. Handles: - Redshift ``object_unpivoting``: ``UNPIVOT x.json AS value AT key`` -
src/sqlfluff/utils/analysis/select.py:255
↓ 1 callersMethod_get_whitespace_ends
Remove tag ends and partition off any whitespace ends. This function assumes that we've already trimmed the string to just the tag, a
src/sqlfluff/rules/jinja/JJ01.py:47
↓ 1 callersFunction_group_siblings_by_line
Group sibling segments by line and sort by column within each line.
src/sqlfluff/utils/reflow/respace.py:104
↓ 1 callersMethod_handle_alias
(self, selectable, alias_info, query)
src/sqlfluff/rules/ambiguous/AM04.py:74
↓ 1 callersMethod_handle_anynumberof
Convert AnyNumberOf to GrammarInst.
utils/build_parsers.py:620
↓ 1 callersMethod_handle_anysetof
Convert AnySetOf to GrammarInst. - Same as AnyNumberOf but max_times_per_element=1
utils/build_parsers.py:685
↓ 1 callersMethod_handle_anything
Convert Anything to GrammarInst.
utils/build_parsers.py:1161
↓ 1 callersMethod_handle_bracketed
Convert Bracketed to GrammarInst.
utils/build_parsers.py:818
↓ 1 callersMethod_handle_conditional
Convert Conditional to Meta with conditional configuration. Encodes conditional rules in aux_data: - aux_data[0]: meta_type string ID
utils/build_parsers.py:1187
↓ 1 callersMethod_handle_delimited
Convert Delimited to GrammarInst. When there are multiple elements, wraps them in a OneOf to match Python's behavior where Delimited
utils/build_parsers.py:746
↓ 1 callersMethod_handle_meta
Convert MetaSegment to Meta.
utils/build_parsers.py:1238
↓ 1 callersMethod_handle_missing
Fallback for unhandled grammar types.
utils/build_parsers.py:1311
↓ 1 callersMethod_handle_multistring_parser
Convert MultiStringParser to GrammarInst.
utils/build_parsers.py:1009
↓ 1 callersMethod_handle_nothing
Convert Nothing to GrammarInst.
utils/build_parsers.py:1145
↓ 1 callersMethod_handle_oneof
Convert OneOf to GrammarInst.
utils/build_parsers.py:563
↓ 1 callersMethod_handle_preceded_by
Convert PrecededByMatcher to PrecededBy instruction.
utils/build_parsers.py:1263
↓ 1 callersMethod_handle_ref
Convert Ref to GrammarInst.
utils/build_parsers.py:471
↓ 1 callersMethod_handle_regex_parser
Convert RegexParser to GrammarInst.
utils/build_parsers.py:1079
↓ 1 callersMethod_handle_semicolon
( self, target_segment: RawSegment, parent_segment: BaseSegment )
src/sqlfluff/rules/convention/CV06.py:208
↓ 1 callersMethod_handle_semicolon_newline
( self, target_segment: RawSegment, parent_segment: BaseSegment, info: Segment
src/sqlfluff/rules/convention/CV06.py:250
↓ 1 callersMethod_handle_semicolon_same_line
( self, target_segment: RawSegment, parent_segment: BaseSegment, info: Segment
src/sqlfluff/rules/convention/CV06.py:224
↓ 1 callersMethod_handle_sequence
Convert Sequence to GrammarInst.
utils/build_parsers.py:515
↓ 1 callersMethod_handle_string_parser
Convert StringParser to GrammarInst.
utils/build_parsers.py:882
↓ 1 callersMethod_handle_token
Convert Token (BaseSegment without match_grammar) to GrammarInst.
utils/build_parsers.py:1294
↓ 1 callersMethod_handle_trailing_inline_comments
Adjust anchor_segment to not move trailing inline comment. We don't want to move inline comments that are on the same line as the pre
src/sqlfluff/rules/convention/CV06.py:128
↓ 1 callersMethod_handle_typed_parser
Convert TypedParser to GrammarInst.
utils/build_parsers.py:944
↓ 1 callersMethod_handle_unreached_code
Address uncovered slices by tweaking the template to hit them. Args: in_str (:obj:`str`): The raw source file. render
src/sqlfluff/core/templaters/jinja.py:931
↓ 1 callersMethod_has_final_non_semicolon_terminator
Check if a statement has a non-semicolon terminator at the end.
src/sqlfluff/rules/convention/CV06.py:80
↓ 1 callersFunction_has_templated_content
Check if any participating segments contain templated content. Returns True if any of the participating segments are non-literal (templated)
src/sqlfluff/utils/reflow/respace.py:82
↓ 1 callersFunction_has_value_table_function
( table_expr: BaseSegment, dialect: Optional[Dialect] )
src/sqlfluff/utils/analysis/select.py:216
↓ 1 callersMethod_ignore_masked_violations_line_range
Returns whether to ignore error for line-range directives. The "ignore" list is assumed to ONLY contain NoQaDirectives where action i
src/sqlfluff/core/rules/noqa.py:294
↓ 1 callersMethod_ignore_masked_violations_single_line
Filter a list of violations based on this single line noqa. The "ignore" list is assumed to ONLY contain NoQaDirectives with action=N
src/sqlfluff/core/rules/noqa.py:245
↓ 1 callersMethod_implicit_column_references
Yield any implicit ORDER BY or GROUP BY column references. This function was adapted from similar code in AM06.
src/sqlfluff/rules/structure/ST06.py:292
↓ 1 callersFunction_increment_balance
Logic for stepping through _match_indents. This is the part of that logic which is potentially fragile so is separated here into a more isola
src/sqlfluff/utils/reflow/reindent.py:2060
↓ 1 callersMethod_init_blocked_words
Called first time rule is evaluated to fetch & cache the blocked_words.
src/sqlfluff/rules/convention/CV09.py:105
↓ 1 callersMethod_init_capitalisation_policy
Called first time rule is evaluated to fetch & cache the policy.
src/sqlfluff/rules/capitalisation/CP01.py:277
↓ 1 callersMethod_init_ignore_string
Called first time rule is evaluated to fetch & cache the ignore_words.
src/sqlfluff/rules/references/RF04.py:117
↓ 1 callersMethod_init_ignore_words_list
Called first time rule is evaluated to fetch & cache the policy.
src/sqlfluff/rules/references/RF02.py:160
↓ 1 callersMethod_init_ignore_words_list
Called first time rule is evaluated to fetch & cache the policy.
src/sqlfluff/rules/references/RF05.py:227
↓ 1 callersMethod_init_undefined_tracking
Sets up tracing of undefined template variables. NOTE: This works by mutating the `live_context` which is being used by the environme
src/sqlfluff/core/templaters/jinja.py:680
↓ 1 callersMethod_is_alias_required
Given an alias, is it REQUIRED to be present? There are a few circumstances where an alias is either required by the dialect, or reco
src/sqlfluff/rules/aliasing/AL05.py:213
↓ 1 callersMethod_is_aliased_select_clause_element
(context: RuleContext)
src/sqlfluff/rules/references/RF05.py:240
↓ 1 callersFunction_is_child
Is the child actually between the start and end markers of the parent.
src/sqlfluff/rules/structure/ST05.py:516
↓ 1 callersFunction_is_correlated_subquery
Given nested select and the sources of its parent, determine if correlated. https://en.wikipedia.org/wiki/Correlated_subquery
src/sqlfluff/rules/structure/ST05.py:354
↓ 1 callersFunction_is_data_modifying_cte
(cte_query: Query)
src/sqlfluff/rules/structure/ST03.py:8
↓ 1 callersFunction_is_markdown_structure_line
Return whether a stripped line looks like markdown structure.
docsv/scripts/generate-rules-docs.py:197
↓ 1 callersFunction_is_matching_new_criteria
Is the Yaml doesn't exist or is older than the SQL.
test/generate_parse_fixture_yml.py:79
↓ 1 callersMethod_is_qualified_column_operator_qualified_column_sequence
( segment_list: list[BaseSegment], )
src/sqlfluff/rules/structure/ST09.py:329
↓ 1 callersMethod_is_root_from_clause
This is to determine if a subquery is part of the from clause. Any subqueries in the `from_clause` should be ignore, unless they are a nested
src/sqlfluff/rules/references/RF02.py:145
↓ 1 callersMethod_is_semantically_literal_templated
Whether all non-literal raw slices in the anchor are semantically literal.
src/sqlfluff/core/linter/linter.py:365
↓ 1 callersMethod_is_sequence_pseudocolumn
Whether reference is a dialect-specific pseudocolumn access. Handles two cases: - Oracle/Snowflake: ``sequence.NEXTVAL`` and ``sequen
src/sqlfluff/rules/references/RF01.py:179
↓ 1 callersMethod_is_simple_expression
Return whether an expression child should be treated as simple.
src/sqlfluff/rules/structure/ST06.py:123
↓ 1 callersFunction_is_templated_safe_break
Check if inserting a line break at e_idx is safe for templated files. A break point is unsafe if BOTH adjacent content segments are non-literal
src/sqlfluff/utils/reflow/reindent.py:2403
↓ 1 callersMethod_is_unreached_whitespace_adjacent_to_trim_tag
Return whether an unreached literal is only trim-adjacent whitespace.
src/sqlfluff/core/templaters/jinja.py:112
↓ 1 callersMethod_is_view_with_explicit_columns
Check if SELECT is in a CREATE VIEW with explicit column list. Args: context: The rule context containing parent stack R
src/sqlfluff/rules/structure/ST06.py:53
↓ 1 callersMethod_is_where_clause_simplifable
(where_clause: BaseSegment)
src/sqlfluff/rules/convention/CV12.py:300
↓ 1 callersFunction_iter_base_types
Iterate types for a new segment class. This is a helper method used within in the construction of SegmentMetaclass so that we can construct a
src/sqlfluff/core/parser/segments/base.py:100
↓ 1 callersMethod_iter_bracketed_statements
(cls, file_segment)
src/sqlfluff/rules/convention/CV07.py:67
↓ 1 callersFunction_iter_config_files
Iterate through paths looking for valid config files.
src/sqlfluff/core/linter/discovery.py:114
↓ 1 callersFunction_iter_files_in_path
Handle directory paths being passed to paths_from_path. We're going to walk the path progressively, processing ignore files as we go. Those i
src/sqlfluff/core/linter/discovery.py:177
↓ 1 callersMethod_iter_points_with_constraints
( self, )
src/sqlfluff/utils/reflow/sequence.py:467
↓ 1 callersFunction_iter_segments
( lexed_elements: list[TemplateElement], templated_file: TemplatedFile, add_indents: bool = True,
src/sqlfluff/core/parser/lexer.py:483
↓ 1 callersMethod_iter_statements
Designed to be used on files. Yields only direct children, or children of batches.
src/sqlfluff/rules/convention/CV07.py:53
↓ 1 callersFunction_iter_templated_patches
Iterate through the segments generating fix patches. The patches are generated in TEMPLATED space. This is important so that we defer dealing
src/sqlfluff/core/linter/patch.py:58
↓ 1 callersMethod_lex_templated_file
Lex a templated file.
src/sqlfluff/core/linter/linter.py:170
↓ 1 callersMethod_lint_aliases
Lint all table aliases.
src/sqlfluff/rules/aliasing/AL06.py:67
↓ 1 callersMethod_lint_aliases_in_join
Lint and fix all aliases in joins - except for self-joins.
src/sqlfluff/rules/aliasing/AL07.py:189
↓ 1 callersFunction_lint_line_buffer_indents
Evaluate a single set of indent points on one line. NOTE: This mutates the given `elements` and `forced_indents` input to avoid lots of copyi
src/sqlfluff/utils/reflow/reindent.py:1616
↓ 1 callersFunction_lint_line_starting_indent
Lint the indent at the start of a line. NOTE: This mutates `elements` to avoid lots of copying.
src/sqlfluff/utils/reflow/reindent.py:1259
↓ 1 callersFunction_lint_line_untaken_negative_indents
Check for negative indents which should have been taken.
src/sqlfluff/utils/reflow/reindent.py:1510
↓ 1 callersFunction_lint_line_untaken_positive_indents
Check for positive indents which should have been taken.
src/sqlfluff/utils/reflow/reindent.py:1406
↓ 1 callersMethod_lint_query
Given the root query, compute lint warnings.
src/sqlfluff/rules/structure/ST05.py:279
↓ 1 callersMethod_lint_references_and_aliases
Check whether any aliases are duplicates. NB: Subclasses of this error should override this function.
src/sqlfluff/rules/aliasing/AL04.py:68
↓ 1 callersFunction_linter_with_depth_limit
Linter with max_parse_depth set.
test/core/parser/max_parse_depth_test.py:18
↓ 1 callersFunction_load_raw_file_as_dict
Loads the raw dict object from file without interpolation.
src/sqlfluff/core/config/file.py:35
↓ 1 callersFunction_load_standard_rules
Initialise the standard ruleset. We do this on each call so that dynamic rules changes are possible.
src/sqlfluff/core/rules/__init__.py:17
↓ 1 callersMethod_log_critical_errors
This method is monkey patched into a "raise" for certain tests.
src/sqlfluff/core/rules/base.py:614
↓ 1 callersFunction_log_hints
Log hints for debugging during patch generation.
src/sqlfluff/core/linter/patch.py:248
↓ 1 callersMethod_map
Class-specific map method. NOTE: Must be overridden by an implementation.
src/sqlfluff/core/linter/runner.py:272
↓ 1 callersFunction_map_line_buffers
Map the existing elements, building up a list of _IndentLine. Returns: :obj:`tuple` of a :obj:`list` of :obj:`_IndentLine` and a
src/sqlfluff/utils/reflow/reindent.py:1013
↓ 1 callersMethod_match
The private match function. Just look for a literal string.
src/sqlfluff/core/parser/lexer.py:167
↓ 1 callersFunction_match_indents
Identify indent points, taking into account rebreak_priorities. Expect fractional keys, because of the half values for rebreak points.
src/sqlfluff/utils/reflow/reindent.py:2111
↓ 1 callersMethod_match_preceding_sequence
Return whether a specific preceding sequence matches.
src/sqlfluff/core/parser/grammar/lookbehind.py:95
↓ 1 callersMethod_nested_end_trailing_comment
Prepend newline spacing to comments on the final nested `END` line.
src/sqlfluff/rules/structure/ST04.py:196
↓ 1 callersMethod_nested_subqueries
( self, query: Query, dialect: Dialect )
src/sqlfluff/rules/structure/ST05.py:232
↓ 1 callersFunction_normalize_indented_markdown_blocks
Dedent markdown structure lines that should not remain as code blocks.
docsv/scripts/generate-rules-docs.py:169
↓ 1 callersMethod_normalize_preferred_quoted_literal_style
Prefer `preferred_quote_char` but only if it doesn't cause more escaping. Adds or removes backslashes as appropriate. Source:
src/sqlfluff/rules/convention/CV10.py:212
↓ 1 callersFunction_parse_rst_list_table_rows
Parse dedented rst list-table rows into a row/cell structure.
docsv/scripts/generate-rules-docs.py:370
↓ 1 callersMethod_parse_tokens
( tokens: Sequence[BaseSegment], config: FluffConfig, fname: Optional[str] = None,
src/sqlfluff/core/linter/linter.py:228
↓ 1 callersFunction_patches_conflict
Return whether two source patches cannot be safely applied together.
src/sqlfluff/core/linter/patch.py:348
↓ 1 callersMethod_populate_code_and_description
Extract and validate the rule code & description. We expect that rules are defined as classes with the name `Rule_XXXX` where `XXXX`
src/sqlfluff/core/rules/base.py:176
↓ 1 callersMethod_populate_docstring
Enrich the docstring in the class_dict. This takes the various defined values in the BaseRule class and uses them to populate documen
src/sqlfluff/core/rules/base.py:214
↓ 1 callersFunction_process_exact_path
Handle exact paths being passed to paths_from_path. If it's got the right extension and it's not ignored, then we just return the normalised
src/sqlfluff/core/linter/discovery.py:139
↓ 1 callersFunction_prune_untaken_indents
Update the tracking of untaken indents. This is an internal helper function for `_crawl_indent_points`. We use the `trough` of the given ind
src/sqlfluff/utils/reflow/reindent.py:773
↓ 1 callersFunction_rebreak_priorities
Process rebreak spans into opportunities to split lines. The index to insert a potential indent at depends on the line_position of the span.
src/sqlfluff/utils/reflow/reindent.py:2008
↓ 1 callersMethod_rectify_templated_slices
This method rectifies the source slices of a variant template. :TRICKY: We want to yield variants that _look like_ they were rendered
src/sqlfluff/core/templaters/jinja.py:844
↓ 1 callersFunction_recursive_assert_pos
(segment)
test/core/parser/match_result_test.py:18
↓ 1 callersFunction_recursively_check_is_complex
(select_clause_or_exp_children: Segments)
src/sqlfluff/rules/aliasing/AL03.py:117
← previousnext →701–800 of 2,340, ranked by callers