MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

Methodhandle_signature
Handle the initial signature of the node. This formats the header of the section.
docs/source/_ext/sqlfluff_domain.py:32
Methodignore_words_list
Words that the rule should ignore. Cached so that it's only evaluated on the first pass.
src/sqlfluff/rules/references/RF06.py:312
Methodimap_unordered
(self, func, iterable)
test/core/linter/linter_test.py:642
Functionimport_without_pytest
(name, *args, **kwargs)
test/utils/testing/conditional_imports_test.py:72
Functioninstrumented_check
(self, loc_key, matcher_key)
utils/compare_parser_metrics.py:143
Functioninstrumented_longest_match
(segments, matchers, idx, parse_context)
utils/compare_parser_metrics.py:162
Functioninstrumented_prune
(options, segments, parse_context, start_idx=0)
utils/compare_parser_metrics.py:112
Functioninstrumented_put
(self, loc_key, matcher_key, match)
utils/compare_parser_metrics.py:151
Functioninstrumented_trim
(segments, idx, terminators, parse_context)
utils/compare_parser_metrics.py:207
Methodinvalidate_caches
Invalidate the cached properties. This should be called whenever the segments within this segment is mutated.
src/sqlfluff/core/parser/segments/base.py:802
Functionis_code
Returns a function that checks if segment is code.
src/sqlfluff/utils/functional/segment_predicates.py:54
Methodis_code
Return True if this segment contains any code.
src/sqlfluff/core/parser/segments/base.py:314
Functionis_comment
Returns a function that checks if segment is comment.
src/sqlfluff/utils/functional/segment_predicates.py:63
Methodis_comment
Return True if this is entirely made of comments.
src/sqlfluff/core/parser/segments/base.py:327
Methodis_first_linter_pass
()
src/sqlfluff/core/linter/linter.py:520
Functionis_meta
Returns a function that checks if segment is meta.
src/sqlfluff/utils/functional/segment_predicates.py:72
Methodis_optional
Return whether this element is optional.
src/sqlfluff/core/parser/matchable.py:24
Methodis_optional
Return whether this element is optional. This is mostly set in the init method, but also in this case, if min_times is zero then this
src/sqlfluff/core/parser/grammar/anyof.py:118
Methodis_optional
Not optional. NOTE: The NonCodeMatcher is only normally only used as a terminator or other special instance matcher. As such the `.si
src/sqlfluff/core/parser/grammar/noncode.py:26
Methodis_optional
Return whether this element is optional. A lookbehind matcher is never optional — it must always be evaluated.
src/sqlfluff/core/parser/grammar/lookbehind.py:42
Methodis_optional
Returns False because Segments are never optional. This is used _only_ in the `Sequence` & `Bracketed` grammars to indicate optional
src/sqlfluff/core/parser/segments/base.py:593
Functionis_raw
Returns a function that checks if segment is raw.
src/sqlfluff/utils/functional/segment_predicates.py:81
Methodis_self_match
Does this segment match the relevant criteria. We use the _direct_ child set here so that if any of the direct child segments match a
src/sqlfluff/core/rules/crawlers.py:139
Functionis_slice_type
Returns a function that determines if segment is one of the types.
src/sqlfluff/utils/functional/raw_file_slice_predicates.py:17
Functionis_slice_type
Returns a function that determines if segment is one the types.
src/sqlfluff/utils/functional/templated_file_slice_predicates.py:17
Functionis_templated
Returns a function that checks if segment is templated.
src/sqlfluff/utils/functional/segment_predicates.py:99
Methodis_templated
Returns True if the segment includes any templated code. This is a simple, very efficient check that doesn't require looking up the R
src/sqlfluff/core/parser/segments/base.py:419
Methodis_valid
Returns True if valid combination of fixes for anchor. Cases: * 0-1 fixes of any type: Valid * 2 fixes: Valid if and only if
src/sqlfluff/core/linter/fix.py:75
Methodis_whitespace
Return True if this segment is entirely whitespace.
src/sqlfluff/core/parser/segments/base.py:332
Methoditer_raw_references
Generate a list of reference strings and elements. Each element is a tuple of (str, segment). If some are split, then a segment may a
src/sqlfluff/dialects/dialect_ansi.py:1827
Methoditer_unparsables
Iterate through any unparsables. As this is an unparsable, it should yield itself.
src/sqlfluff/core/parser/segments/base.py:1346
Methodjoin
(self)
test/core/linter/linter_test.py:651
Functionlarge_file_check
Raise an exception if the file is over a defined size. Designed to be implemented as a decorator on `.process()` methods. If no config is pr
src/sqlfluff/core/templaters/base.py:38
Methodlate_binding_macro
(macro_name: str)
src/sqlfluff/core/templaters/jinja.py:602
Methodline_no
Return the line number in the source.
src/sqlfluff/core/parser/markers.py:159
Methodline_pos
Return the line position in the source.
src/sqlfluff/core/parser/markers.py:164
Methodlint_fix_parsed
(cls, *args, **kwargs)
test/cli/commands_test.py:1417
Functionlint_options
Add lint operation options to commands via a decorator. These are cli commands that do linting, i.e. `lint` and `fix`.
src/sqlfluff/cli/commands.py:432
Functionlist_rules
Return a list of available rule tuples.
src/sqlfluff/api/info.py:8
Methodload_config_resource
Load a config resource. NOTE: Deprecated classmethod maintained because it was in our example plugin for a long while. Remove once th
src/sqlfluff/core/config/loader.py:365
Functionload_default_config
Loads the default configuration for the plugin.
src/sqlfluff/core/plugin/lib.py:32
Functionload_default_config
Loads the default configuration for the plugin.
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/__init__.py:42
Functionload_yaml
Load a yaml structure and process it into a tuple.
test/conftest.py:162
Functionlogging_cleanup
This gracefully handles logging issues at session teardown. Removes handlers from all loggers. Autouse applies this to all tests in this file
test/cli/commands_test.py:50
Functionmake_result_tuple
Make a comparison tuple for test matching.
test/core/parser/match_algorithms_test.py:53
Methodmatch
Match against this matcher.
src/sqlfluff/core/parser/matchable.py:44
Methodmatch
Matches... Anything. Most useful in match grammars, where a later parse grammar will work out what's inside. NOTE: This gram
src/sqlfluff/core/parser/grammar/base.py:453
Methodmatch
Always return a failed (empty) match.
src/sqlfluff/core/parser/grammar/base.py:495
Methodmatch
Match a bracketed sequence of elements. This implementation matches a bracketed expression without recursion or seeking ahead.
src/sqlfluff/core/parser/grammar/sequence.py:463
Methodmatch
If enabled, return a single insert of the new segment.
src/sqlfluff/core/parser/grammar/conditional.py:96
Methodmatch
Match against any of the elements a relevant number of times. If it matches multiple, it returns the longest, and if any are the same
src/sqlfluff/core/parser/grammar/anyof.py:126
Methodmatch
Match any starting non-code segments.
src/sqlfluff/core/parser/grammar/noncode.py:44
Methodmatch
Only useful as a terminator. NOTE: Coverage of this method is poor, because in typical use as a terminator - the `.simple()` method c
src/sqlfluff/core/parser/segments/bracketed.py:97
Methodmatch_success_rate
Return match success rate.
utils/compare_parser_metrics.py:56
Functionmatchable_to_const_name
Convert a segment class name to a token name.
utils/build_parsers.py:1621
Methodmeasured_lines
Return list of the lines in src_path that were measured.
src/sqlfluff/diff_quality_plugin.py:118
Functionmock_xdg_home
Sets the XDG_CONFIG_HOME variable.
test/core/config/loader_test.py:39
Methodms_per_token
Return parse time per token in ms.
utils/compare_parser_metrics.py:70
Functionnormalise_paths
Test normalising paths. NB Paths on difference platforms might look different, so this makes them comparable.
test/core/linter/linter_test.py:70
Functionnot_
Returns a function that computes: not fn().
src/sqlfluff/utils/functional/segment_predicates.py:135
Methodnum_violations
Count the number of violations in the result.
src/sqlfluff/core/linter/linting_result.py:82
Functionor_
Returns a function that computes the functions or-ed together.
src/sqlfluff/utils/functional/segment_predicates.py:126
Methodparent_stack
Returns a Segments object for context.parent_stack.
src/sqlfluff/utils/functional/context.py:21
Functionparse
Parse SQL files and just spit out the result. PATH is the path to a sql file or directory to lint. This can be either a file ('path/to/file.s
src/sqlfluff/cli/commands.py:1624
Functionparse
Parse a SQL string. Args: sql (:obj:`str`): The SQL to be parsed. dialect (:obj:`Optional[str]`, optional): A reference to the di
src/sqlfluff/api/simple.py:168
Methodparse_reports
Parse report output. Not used by SQLFluff.
src/sqlfluff/diff_quality_plugin.py:36
Functionpath_exists
Patch for os.path.exists which depends on test parameters. Returns: True, unless `default_exists` is `False` and the path passed
test/core/config/loader_test.py:248
Methodpersist_changes
Run all the fixes for all the files and return a dict.
src/sqlfluff/core/linter/linting_result.py:193
Methodpos_marker
Get the first position marker of the element.
src/sqlfluff/utils/reflow/elements.py:83
Methodprocess
Add the code element to the logging message before emit.
src/sqlfluff/core/rules/base.py:72
Methodprocess_with_variants
Yield the same templated file twice with duplicate errors.
test/core/linter/linter_test.py:48
Functionprofiles_dir
Returns the dbt project directory.
plugins/sqlfluff-templater-dbt/test/conftest.py:57
Functionproject_dir
Returns the dbt project directory.
plugins/sqlfluff-templater-dbt/test/conftest.py:51
Methodpruning_rate
Return pruning rate (% of options dropped).
utils/compare_parser_metrics.py:49
Functionpytest_generate_tests
Generate yaml test cases from file. This is a predefined pytest hook which allows us to parametrize all other test cases defined in this modu
test/rules/yaml_test_cases_test.py:14
Functionpytest_report_header
Return a list of strings to be displayed in the header of the report.
plugins/sqlfluff-templater-dbt/test/conftest.py:15
Functionquoted_presenter
Re-presenter which always double quotes string values needing escapes.
src/sqlfluff/cli/commands.py:1550
Functionraise_critical_errors_after_fix
Raises errors that break the Fix process. These errors are otherwise swallowed to allow the lint messages to reach the end user.
test/conftest.py:269
Functionraise_error_apply_fixes_check_issue
(message, *args)
test/conftest.py:295
Functionraise_error_conflicting_fixes_same_anchor
(message: str)
test/conftest.py:299
Methodraw
Get the current raw representation.
src/sqlfluff/utils/reflow/elements.py:78
Methodraw
Returns the raw segment.
src/sqlfluff/core/parser/segments/raw.py:114
Methodraw
Make a string from the segments of this segment.
src/sqlfluff/core/parser/segments/base.py:337
Functionraw_is
Returns a function that determines if segment matches one of the raw inputs.
src/sqlfluff/utils/functional/segment_predicates.py:20
Functionraw_seg
Construct a raw segment as a fixture.
test/core/parser/segments/conftest.py:15
Functionraw_segments
Construct a list of raw segments as a fixture.
test/core/linter/fix_test.py:28
Functionraw_segments
Construct a list of raw segments as a fixture.
test/core/parser/segments/conftest.py:9
Methodraw_segments
Returns a Segments object for all the raw segments in the file.
src/sqlfluff/utils/functional/context.py:49
Methodraw_segments
Get raw segments underlying the segments.
src/sqlfluff/utils/functional/segments.py:97
Methodraw_segments
Returns self to be compatible with calls to its superclass.
src/sqlfluff/core/parser/segments/raw.py:124
Methodraw_segments
Returns a list of raw segments in this segment.
src/sqlfluff/core/parser/segments/base.py:379
Methodraw_segments_with_ancestors
Returns a list of raw segments in this segment with the ancestors.
src/sqlfluff/core/parser/segments/base.py:384
Functionraw_slices
Returns raw slices for a segment.
src/sqlfluff/utils/functional/segment_predicates.py:144
Methodraw_slices
Raw slices of the segments, sorted in source file order.
src/sqlfluff/utils/functional/segments.py:74
Methodraw_stack
Returns a Segments object for context.raw_stack.
src/sqlfluff/utils/functional/context.py:42
Methodraw_upper
Returns the raw segment in uppercase.
src/sqlfluff/core/parser/segments/raw.py:119
Methodraw_upper
Make an uppercase string from the segments of this segment.
src/sqlfluff/core/parser/segments/base.py:374
Methodrecursive_crawl_all
Recursively crawl all descendant segments.
src/sqlfluff/core/parser/segments/base.py:1066
Functionred_log_filter
(record: logging.LogRecord)
src/sqlfluff/cli/commands.py:194
Functionrelease
Change version number in the cfg files. NOTE: For fine grained personal access tokens, this requires _write_ access to the "contents" scope.
util.py:112
← previousnext →1,501–1,600 of 2,340, ranked by callers