MCPcopy Index your code

hub / github.com/sqlfluff/sqlfluff / endpoints

Endpoints59 in github.com/sqlfluff/sqlfluff

Routecli
click.group( context_settings={"help_option_names": ["-h", "--help"]}, # NOTE: The code-block directiv
src/sqlfluff/cli/commands.py:None
Routedbt_manifest
handle_dbt_errors( SQLFluffUserError, "dbt failed during project compilation. Consider runnin
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:None
Routefix
click.option( "--check", is_flag=True, help=( "Analyse all files and ask for confirmation
src/sqlfluff/cli/commands.py:None
Routelint
click.option( "--write-output", help=( "Optionally provide a filename to write the results to,
src/sqlfluff/cli/commands.py:None
Routeparse
click.option( "-c", "--code-only", is_flag=True, help="Output only the code elements of the pa
src/sqlfluff/cli/commands.py:None
Routetest__cli__command_format_stdin
pytest.mark.parametrize( "stdin,stdout", [ ("select * from t\n", "select * from t\n"), # no c
test/cli/commands_test.py:None
Routetest__cli__command_lint_nocolor
patch("click.utils.should_strip_ansi")
test/cli/commands_test.py:None
Routetest__cli__command_lint_parse
pytest.mark.parametrize( "command", [ # Test basic linting ( lint,
test/cli/commands_test.py:None
Routetest__cli__command_lint_serialize_github_annotation_native
pytest.mark.parametrize( "filename,expected_output", [ ( "test/fixtures/linter/ide
test/cli/commands_test.py:None
Routetest__cli__command_stdin_filename_config
pytest.mark.parametrize( ("command", "stdin_filepath", "ret_code", "stdout", "stderr"), [ (
test/cli/commands_test.py:None
Routetest__cli__fix_no_corrupt_file_contents
pytest.mark.parametrize( "sql,fix_args,expected", [ ( ( "CREATE TA
test/cli/formatters_test.py:None
Routetest__cli__helpers__plain_output_color_decision
pytest.mark.parametrize( "nocolor,isatty,no_color_env,expected_plain_output", [ (None, True, N
test/cli/formatters_test.py:None
Routetest__config__get_user_config_dir_path
patch("os.path.exists")
test/core/config/loader_test.py:None
Routetest__config__load_user_appdir_config
patch("os.path.exists")
test/core/config/loader_test.py:None
Routetest__fix__generate_source_patches
pytest.mark.parametrize( "tree,templated_file,expected_result", [ # Trivial example (
test/core/linter/fix_test.py:None
Routetest__linted_file__build_up_fixed_source_string
pytest.mark.parametrize( "source_slices,source_patches,raw_source_string,expected_result", # NOTE: For
test/core/linter/linted_file_test.py:None
Routetest__linted_file__slice_source_file_using_patches
pytest.mark.parametrize( "source_patches,source_only_slices,raw_source_string,expected_result", # NOTE
test/core/linter/linted_file_test.py:None
Routetest__linter__get_runner_processes
patch("multiprocessing.cpu_count")
test/core/linter/linter_test.py:None
Routetest__linter__linting_unexpected_error_handled_gracefully
patch("sqlfluff.core.linter.runner.linter_logger")
test/core/linter/linter_test.py:None
Routetest__linter__mask_templated_violations
pytest.mark.parametrize( "path,rules,ignore_templated_areas,check_tuples", [ ( "te
test/core/linter/linter_test.py:None
Routetest__parser__algorithms__greedy_match
pytest.mark.parametrize( "raw_segments,target_words,inc_term,result_slice", [ (["a", "b", " ",
test/core/parser/match_algorithms_test.py:None
Routetest__parser__algorithms__next_ex_bracket_match
pytest.mark.parametrize( "raw_segments,target_word,result_slice", [ ([], "foo", slice(0, 0)),
test/core/parser/match_algorithms_test.py:None
Routetest__parser__algorithms__trim_to_terminator
pytest.mark.parametrize( "raw_segments,target_words,expected_result", [ # Terminators mid sequ
test/core/parser/match_algorithms_test.py:None
Routetest__parser__grammar_anyof_modes
pytest.mark.parametrize( "mode,options,terminators,input_slice,kwargs,output_tuple", [ # #####
test/core/parser/grammar/grammar_anyof_test.py:None
Routetest__parser__grammar_anything_structure
pytest.mark.parametrize( "input_tokens, terminators, output_tuple", [ # No terminators (or non
test/core/parser/grammar/grammar_other_test.py:None
Routetest__parser__grammar_bracketed_error_modes
pytest.mark.parametrize( "input_seed,mode,sequence,kwargs", [ # Unclosed greedy brackets alway
test/core/parser/grammar/grammar_sequence_test.py:None
Routetest__parser__grammar_bracketed_modes
pytest.mark.parametrize( "input_seed,mode,sequence,kwargs,output_tuple", [ # A strict asymmetr
test/core/parser/grammar/grammar_sequence_test.py:None
Routetest__parser__grammar_sequence_modes
pytest.mark.parametrize( "mode,sequence,terminators,input_slice,output_tuple", [ # #####
test/core/parser/grammar/grammar_sequence_test.py:None
Routetest__parser__helper_trim_non_code_segments
pytest.mark.parametrize( "token_list,pre_len,mid_len,post_len", [ (["bar", ".", "bar"], 0, 3,
test/core/parser/helpers_test.py:None
Routetest__rules__std_AL09_CP02_RF06
pytest.mark.parametrize( "rules,dialect,fixed_sql,post_fix_errors", [ # NOTE: The first few ex
test/rules/std_AL09_CP02_RF06_combo_test.py:None
Routetest__rules__std_file
pytest.mark.parametrize( "rule,path,violations", [ ("LT01", "indentation_errors.sql", [(4, 24)
test/rules/std_test.py:None
Routetest__templater_dbt_handle_database_connection_failure
mock.patch("dbt.adapters.postgres.impl.PostgresAdapter.set_relations_cache")
plugins/sqlfluff-templater-dbt/test/templater_test.py:None
Routetest__templater_dbt_handle_exceptions
pytest.mark.parametrize( ("fname", "exception_msg", "dbt_skip_compilation_error", "exception_class"),
plugins/sqlfluff-templater-dbt/test/templater_test.py:None
Routetest__templater_dbt_sequence_files_ephemeral_dependency
pytest.mark.parametrize( "fnames_input, fnames_expected_sequence", [ [ (
plugins/sqlfluff-templater-dbt/test/templater_test.py:None
Routetest__templater_dbt_templating_result
pytest.mark.parametrize( "fname", [ # dbt_utils "use_dbt_utils.sql", # macro c
plugins/sqlfluff-templater-dbt/test/templater_test.py:None
Routetest__templater_jinja_slice_file
pytest.mark.parametrize( "raw_file,override_context,result,templater_class", [ ("", None, [],
test/core/templaters/jinja_test.py:None
Routetest__templater_jinja_slice_template
pytest.mark.parametrize( "test,result,analyzer_class", [ ("", [], JinjaAnalyzer), ("fo
test/core/templaters/jinja_test.py:None
Routetest__templater_jinja_slices
pytest.mark.parametrize( "case", [ RawTemplatedTestCase( name="basic_block",
test/core/templaters/jinja_test.py:None
Routetest__templater_param_style
pytest.mark.parametrize( "instr, param_style, expected_outstr, values", [ ( "SELEC
test/core/templaters/placeholder_test.py:None
Routetest__templater_python_split_uniques_coalesce_rest
pytest.mark.parametrize( "split_file,raw_occurrences,templated_occurrences,templated_str,result", [
test/core/templaters/python_test.py:None
Routetest_dialect_click_type_shell_complete
pytest.mark.parametrize( "incomplete,expected", [ ["an", ["ansi"]], ["d", ["databricks
test/cli/autocomplete_test.py:None
Routetest_dialect_unparsable
pytest.mark.parametrize( "segmentref,dialect,raw,structure", [ ( # The first here
test/dialects/unparsable_test.py:None
Routetest_lint_path_parallel_wrapper_exception
patch("sqlfluff.core.linter.Linter.lint_rendered")
test/core/linter/linter_test.py:None
Routetest_max_parse_nodes_token_gate_skips_parser
pytest.mark.parametrize( ("use_rust_parser", "patch_target"), [ (False, "sqlfluff.core.parser.
test/core/parser/max_parse_nodes_test.py:None
Routetest_object_ref_matches_table
pytest.mark.parametrize( "possible_references, targets, result", [ # Empty list of references
test/core/rules/reference_test.py:None
Routetest_parse_noqa
pytest.mark.parametrize( "input,expected", [ ("", None), ("noqa", NoQaDirective(0, 0,
test/core/rules/noqa_test.py:None
Routetest_reflow__deduce_line_indent
pytest.mark.parametrize( "raw_sql_in,target_raw,indent_out", [ # Trivial case ("select
test/utils/reflow/reindent_test.py:None
Routetest_reflow__lint_indent_points
pytest.mark.parametrize( "raw_sql_in,raw_sql_out", [ # Trivial ( "select 1
test/utils/reflow/reindent_test.py:None
Routetest_reflow__point_respace_point
pytest.mark.parametrize( "raw_sql_in,point_idx,kwargs,raw_point_sql_out,fixes_out", [ # Basic
test/utils/reflow/respace_test.py:None
Routetest_reflow__sequence_rebreak_target
pytest.mark.parametrize( "raw_sql_in,target_idx,seq_sql_in,seq_sql_out", [ ("select 1+\n(2+3)"
test/utils/reflow/rebreak_test.py:None
Routetest_reflow_sequence_from_around_target
pytest.mark.parametrize( "raw_sql,sides,target_idx,target_raw,StartClass,raw_elems", [ (
test/utils/reflow/sequence_test.py:None
Routetest_reflow_sequence_respace_filter
pytest.mark.parametrize( "raw_sql,filter,delete_indices,edit_indices", [ # NOTE: These tests r
test/utils/reflow/sequence_test.py:None
Routetest_rule_st06_shorthand_casted_aggregates_are_complex
pytest.mark.parametrize("dialect", ["postgres", "redshift", "snowflake"])
test/rules/std_LT04_ST06_test.py:None
Routetest_rules_crawlers
pytest.mark.parametrize( "CrawlerType,crawler_kwargs,raw_sql_in,target_raws_out", [ (RootOnlyC
test/core/rules/crawlers_test.py:None
Routetest_segments_all
pytest.mark.parametrize( ["input", "expected"], [ [ segments.Segments(seg1, seg2),
test/core/rules/functional/segments_test.py:None
Routetest_segments_any
pytest.mark.parametrize( ["input", "expected"], [ [ segments.Segments(seg1, seg2),
test/core/rules/functional/segments_test.py:None
Routetest_segments_apply_functions
pytest.mark.parametrize( ["function", "expected"], [ [sp.get_type(), ["raw", "raw"]],
test/core/rules/functional/segments_test.py:None
Routetest_slices_all
pytest.mark.parametrize( ["input", "expected"], [ [ raw_file_slices.RawFileSlices(
test/core/rules/functional/raw_file_slices_test.py:None
Routetest_slices_any
pytest.mark.parametrize( ["input", "expected"], [ [ raw_file_slices.RawFileSlices(
test/core/rules/functional/raw_file_slices_test.py:None