Fix spelling (#5729)

This commit is contained in:
MDW
2024-04-01 12:57:53 +02:00
committed by GitHub
parent 50c4dcec76
commit 7197f3fedf
29 changed files with 46 additions and 46 deletions

View File

@@ -191,7 +191,7 @@ contributors whose changes are included in this release. 🎉🎉🏆🎉🎉
* SparkSQL: exclamation mark as logical not [#5500](https://github.com/sqlfluff/sqlfluff/pull/5500) [@reata](https://github.com/reata)
* SparkSQL: allow value in set_statement to be Java class name [#5504](https://github.com/sqlfluff/sqlfluff/pull/5504) [@reata](https://github.com/reata)
* SparkSQL: allow distribute/sort/cluster by at end of set operation [#5502](https://github.com/sqlfluff/sqlfluff/pull/5502) [@reata](https://github.com/reata)
* [CI] Add a few more mypy ckecks [#5505](https://github.com/sqlfluff/sqlfluff/pull/5505) [@Koyaani](https://github.com/Koyaani)
* [CI] Add a few more mypy checks [#5505](https://github.com/sqlfluff/sqlfluff/pull/5505) [@Koyaani](https://github.com/Koyaani)
* Snowflake dialect: Add support for DATABASE ROLE in GRANT/REVOKE [#5490](https://github.com/sqlfluff/sqlfluff/pull/5490) [@sfc-gh-dgupta](https://github.com/sfc-gh-dgupta)
* DuckDB: Qualify and From-First [#5485](https://github.com/sqlfluff/sqlfluff/pull/5485) [@keraion](https://github.com/keraion)
* MySql: create table: allow null/not null in any position [#5473](https://github.com/sqlfluff/sqlfluff/pull/5473) [@archer62](https://github.com/archer62)
@@ -382,7 +382,7 @@ Great to see so many new people getting involved with the project. Thank You
* SparkSQL: exclamation mark as logical not [#5500](https://github.com/sqlfluff/sqlfluff/pull/5500) [@reata](https://github.com/reata)
* SparkSQL: allow value in set_statement to be Java class name [#5504](https://github.com/sqlfluff/sqlfluff/pull/5504) [@reata](https://github.com/reata)
* SparkSQL: allow distribute/sort/cluster by at end of set operation [#5502](https://github.com/sqlfluff/sqlfluff/pull/5502) [@reata](https://github.com/reata)
* [CI] Add a few more mypy ckecks [#5505](https://github.com/sqlfluff/sqlfluff/pull/5505) [@Koyaani](https://github.com/Koyaani)
* [CI] Add a few more mypy checks [#5505](https://github.com/sqlfluff/sqlfluff/pull/5505) [@Koyaani](https://github.com/Koyaani)
* Snowflake dialect: Add support for DATABASE ROLE in GRANT/REVOKE [#5490](https://github.com/sqlfluff/sqlfluff/pull/5490) [@sfc-gh-dgupta](https://github.com/sfc-gh-dgupta)
* DuckDB: Qualify and From-First [#5485](https://github.com/sqlfluff/sqlfluff/pull/5485) [@keraion](https://github.com/keraion)
* MySql: create table: allow null/not null in any position [#5473](https://github.com/sqlfluff/sqlfluff/pull/5473) [@archer62](https://github.com/archer62)
@@ -616,7 +616,7 @@ This release also sees a bumper crop of new contributors, thanks to
[@Kylea650](https://github.com/Kylea650), [@robin-alphasophia](https://github.com/robin-alphasophia),
[@jtbg](https://github.com/jtbg), [@r-petit](https://github.com/r-petit),
[@bpfaust](https://github.com/bpfaust) & [@freewaydev](https://github.com/freewaydev)
who all made the first contibutions in this release! 🎉🎉🎉
who all made the first contributions in this release! 🎉🎉🎉
## Whats Changed
@@ -1103,7 +1103,7 @@ and also contains various dialect improvements.
## Highlights
This releases fixes a compatability issue with the latest version of dbt. It also ships various dialect improvements.
This releases fixes a compatibility issue with the latest version of dbt. It also ships various dialect improvements.
## Whats Changed
@@ -1446,7 +1446,7 @@ many users. 🚀
This is mostly a bugfix release addressing some of the issues from the recent
2.0 release. Notable fixes are:
- Spacing for (as applied by `LT01`) for datatypes, hypenated identifiers and
- Spacing for (as applied by `LT01`) for datatypes, hyphenated identifiers and
casting operators.
- Several bugs in the indentation routines (`LT02`), in particular with implicit
indents.
@@ -3397,7 +3397,7 @@ Major changes include:
* Align line length in Python code to 88 characters [#2264](https://github.com/sqlfluff/sqlfluff/pull/2264) [@chwiese](https://github.com/chwiese)
* Jinja templater: Allow "load_macros_from_path" to be a comma-separated list of paths [#2387](https://github.com/sqlfluff/sqlfluff/pull/2387) [@barrywhart](https://github.com/barrywhart)
* Add "TRANS" keyword for T-SQL [#2399](https://github.com/sqlfluff/sqlfluff/pull/2399) [@fdw](https://github.com/fdw)
* Docstrings: Replace double backtics with single quote for lint results. [#2386](https://github.com/sqlfluff/sqlfluff/pull/2386) [@jpy-git](https://github.com/jpy-git)
* Docstrings: Replace double backticks with single quote for lint results. [#2386](https://github.com/sqlfluff/sqlfluff/pull/2386) [@jpy-git](https://github.com/jpy-git)
* Spark3: Support for `INSERT OVERWRITE DIRECTORY` statements [#2385](https://github.com/sqlfluff/sqlfluff/pull/2385) [@R7L208](https://github.com/R7L208)
* Fix unnecessary white underline in doc site [#2383](https://github.com/sqlfluff/sqlfluff/pull/2383) [@tunetheweb](https://github.com/tunetheweb)
* Rolls back some code cleanup that caused coverage report to show gaps [#2384](https://github.com/sqlfluff/sqlfluff/pull/2384) [@barrywhart](https://github.com/barrywhart)
@@ -3685,7 +3685,7 @@ There have also been many bug fixes and improvements to the CI and development p
* Fix L009 FileSegment child + new create_before/create_after edit types [#1979](https://github.com/sqlfluff/sqlfluff/pull/1979) [@jpy-git](https://github.com/jpy-git)
* Adds extra check to L054 to avoid weird error messages [#1988](https://github.com/sqlfluff/sqlfluff/pull/1988) [@tunetheweb](https://github.com/tunetheweb)
* BigQuery: Allow keywords in column reference components [#1987](https://github.com/sqlfluff/sqlfluff/pull/1987) [@tunetheweb](https://github.com/tunetheweb)
* L027: Remove unnessary crawl in get_select_statement_info [#1974](https://github.com/sqlfluff/sqlfluff/pull/1974) [@jpy-git](https://github.com/jpy-git)
* L027: Remove unnecessary crawl in get_select_statement_info [#1974](https://github.com/sqlfluff/sqlfluff/pull/1974) [@jpy-git](https://github.com/jpy-git)
* Add __all__ attributes to __init__.py files to resolve F401 [#1949](https://github.com/sqlfluff/sqlfluff/pull/1949) [@jpy-git](https://github.com/jpy-git)
* Fix incorrect comment on L055 [#1967](https://github.com/sqlfluff/sqlfluff/pull/1967) [@jpy-git](https://github.com/jpy-git)
* Docs: fix docker hub link to public URL [#1964](https://github.com/sqlfluff/sqlfluff/pull/1964) [@kevinmarsh](https://github.com/kevinmarsh)
@@ -4810,7 +4810,7 @@ Many thanks to all the [contributors](https://github.com/sqlfluff/sqlfluff/graph
### Changed
- Tweek rule L005 to report more sensibly with newlines.
- Tweak rule L005 to report more sensibly with newlines.
- Rework testing of rules to be more modular.
- Fix a config file bug if no root config file was present for some
values. Thanks [@barrywhart](https://github.com/barrywhart).

View File

@@ -6,7 +6,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

View File

@@ -373,7 +373,7 @@ described above.
- [ ] Comment in #contributing slack channel about release candidate.
- [ ] Update the draft PR as more changes get merged.
- [ ] Get another contributor to approve the PR.
- [ ] Merge the PR when looks like we've got all were gonna get for this release.
- [ ] Merge the PR when looks like we've got all were going to get for this release.
- [ ] Go to the [releases page](https://github.com/sqlfluff/sqlfluff/releases), edit
the release to be same as [CHANGELOG.md](CHANGELOG.md) (remember to remove your
release PR which doesnt need to go in this). Add version tag and a title and

View File

@@ -161,7 +161,7 @@ configuration.
To use these, the syntax must start as an *inline sql comment* beginning
with :code:`sqlfluff` (i.e. :code:`-- sqlfluff`). The line is then interpreted
as a colon-seperated address of the configuation value you wish to set.
as a colon-separated address of the configuration value you wish to set.
A few common examples are shown below:
.. code-block:: sql

View File

@@ -39,7 +39,7 @@ tool functions in a secure environment.
#. *Users may have access to change how SQLFluff is invoked*. SQLFluff can
be invoked either as a command line too or via the python API. Typically
the method is fixed for a given application. When thinking about how to
restrict the ability of users to call unsecure code, SQLFluff aims to
restrict the ability of users to call insecure code, SQLFluff aims to
provide options at the point of invocation. In particular, as described
above, the primary risk vector for SQLFluff is the macro environment
as described in :ref:`templateconfig`. To restrict users being able to

View File

@@ -2,7 +2,7 @@
The logos, both as png and svg files are available here for use when referencing the project.
Contributions are welcome to these files in addition to contibutions to the codebase
Contributions are welcome to these files in addition to contributions to the codebase
of the project. This is especially useful if you have graphic design skills, but before
planning any large scale changes, do raise an issue for discussion on GitHub to ensure
that your planned changes are likely to be accepted.

View File

@@ -18,7 +18,7 @@ output_line_length = 80
runaway_limit = 10
# Ignore errors by category (one or more of the following, separated by commas: lexing,linting,parsing,templating)
ignore = None
# Warn only for rule codes (one of more rule codes, seperated by commas: e.g. LT01,LT02)
# Warn only for rule codes (one of more rule codes, separated by commas: e.g. LT01,LT02)
# Also works for templating and parsing errors by using TMP or PRS
warnings = None
# Whether to warn about unneeded '-- noqa:' comments.
@@ -67,7 +67,7 @@ indented_then = True
indented_then_contents = True
allow_implicit_indents = False
template_blocks_indent = True
# This is a comma seperated list of elements to skip
# This is a comma separated list of elements to skip
# indentation edits to.
skip_indentation_in = script_content
# If comments are found at the end of long lines, we default to moving

View File

@@ -148,7 +148,7 @@ class AnyNumberOf(BaseGrammar):
matched_idx = idx
# The working index is to cover non-code elements which aren't
# claimed yet, but we should conditionally claim if the next
# match is succesful.
# match is successful.
working_idx = idx
matched = MatchResult.empty_at(idx)
max_idx = len(segments) # What is the limit

View File

@@ -40,7 +40,7 @@ class Parser:
# instantiation.
ctx = ParseContext.from_config(config=self.config)
# Kick off parsing with the root segment. The BaseFileSegment has
# a unique entry point to facilitate exaclty this. All other segments
# a unique entry point to facilitate exactly this. All other segments
# will use the standard .match() route.
root = self.RootSegment.root_parse(
tuple(segments), fname=fname, parse_context=ctx

View File

@@ -1228,7 +1228,7 @@ class QualifiedNumericLiteralSegment(BaseSegment):
class AggregateOrderByClause(BaseSegment):
"""An order by clause for an aggregate fucntion.
"""An order by clause for an aggregate function.
Defined as a class to allow a specific type for rule AM06
"""

View File

@@ -871,7 +871,7 @@ class FunctionNameSegment(ansi.FunctionNameSegment):
Ref("QuotedIdentifierSegment"),
terminators=[Ref("BracketedSegment")],
),
# BigQuery allows whitespaces between the `.` of a function refrence or
# BigQuery allows whitespaces between the `.` of a function reference or
# SAFE prefix. Keeping the explicit `allow_gaps=True` here to
# make the distinction from `ansi.FunctionNameSegment` clear.
allow_gaps=True,
@@ -2004,7 +2004,7 @@ class MergeNotMatchedBySourceClauseSegment(ansi.MergeMatchedClauseSegment):
It inherits from `ansi.MergeMatchedClauseSegment` because NotMatchedBySource clause
is conceptionally more close to a Matched clause than to NotMatched clause, i.e.
it get's combined with an UPDATE or DELETE, not with an INSERT.
it gets combined with an UPDATE or DELETE, not with an INSERT.
"""
type = "merge_when_matched_clause"

View File

@@ -101,7 +101,7 @@ class CreateTableStatementSegment(postgres.CreateTableStatementSegment):
As specified in
https://docs.vmware.com/en/VMware-Tanzu-Greenplum/6/greenplum-database/GUID-ref_guide-sql_commands-CREATE_TABLE.html
This is overriden from Postgres to add the `DISTRIBUTED` clause.
This is overridden from Postgres to add the `DISTRIBUTED` clause.
"""
match_grammar = Sequence(
@@ -259,7 +259,7 @@ class CreateTableAsStatementSegment(postgres.CreateTableAsStatementSegment):
As specified in
https://docs.vmware.com/en/VMware-Tanzu-Greenplum/6/greenplum-database/GUID-ref_guide-sql_commands-CREATE_TABLE_AS.html
This is overriden from Postgres to add the `DISTRIBUTED` clause.
This is overridden from Postgres to add the `DISTRIBUTED` clause.
"""
match_grammar = Sequence(

View File

@@ -776,7 +776,7 @@ class StartWithClauseSegment(BaseSegment):
class HierarchicalQueryClauseSegment(BaseSegment):
"""Hiearchical Query.
"""Hierarchical Query.
https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/Hierarchical-Queries.html
"""

View File

@@ -2577,7 +2577,7 @@ class PublicationObjectsSegment(BaseSegment):
so requires one to track the previous object type if it's a "continuation object
type", this grammar groups together the continuation objects, e.g.
"TABLE a, b, TABLE c, d" results in two segments: one containing references
"a, b", and the other contianing "c, d".
"a, b", and the other containing "c, d".
https://www.postgresql.org/docs/15/sql-createpublication.html
https://github.com/postgres/postgres/blob/4380c2509d51febad34e1fac0cfaeb98aaa716c5/src/backend/parser/gram.y#L10435-L10530
@@ -4249,7 +4249,7 @@ class DropSequenceStatementSegment(ansi.DropSequenceStatementSegment):
class StatisticsReferenceSegment(ansi.ObjectReferenceSegment):
"""Statics Reference."""
"""Statistics Reference."""
type = "statistics_reference"

View File

@@ -1843,7 +1843,7 @@ class GrantUsageDatashareStatementSegment(BaseSegment):
https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html
section "Granting datashare permissions"
Note: According to docummentation, multiple accounts and namespaces can be
Note: According to documentation, multiple accounts and namespaces can be
specified. However, tests using redshift instance showed this causes a syntax
error.
"""

View File

@@ -3128,7 +3128,7 @@ class ScriptingLetStatementSegment(BaseSegment):
"LET",
Ref("LocalVariableNameSegment"),
OneOf(
# Variable assigment
# Variable assignment
OneOf(
Sequence(
Ref("DatatypeSegment"),

View File

@@ -2239,7 +2239,7 @@ class DatatypeSegment(BaseSegment):
Ref("DatatypeIdentifierSegment"),
Bracketed(Ref("DatatypeIdentifierSegment"), bracket_type="square"),
),
# Stop Gap until explicit Data Types as only relevent for character
# Stop Gap until explicit Data Types as only relevant for character
Ref.keyword("VARYING", optional=True),
Ref("BracketedArguments", optional=True),
Ref("CharCharacterSetGrammar", optional=True),
@@ -5050,7 +5050,7 @@ class CreateTriggerStatementSegment(BaseSegment):
Sequence(
"WITH",
AnySetOf(
# NOTE: Techincally, ENCRYPTION can't be combined with the other two,
# NOTE: Technically, ENCRYPTION can't be combined with the other two,
# but this slightly more generous parsing is ok for SQLFluff.
Ref.keyword("ENCRYPTION"),
Ref.keyword("NATIVE_COMPILATION"),
@@ -5598,7 +5598,7 @@ class SqlcmdCommandSegment(BaseSegment):
Microsoft allows professional CI/CD deployment through so called 'SQL Database
Projects'.
There are propietary `sqlcmd Commands` that can be part of an SQL file.
There are proprietary `sqlcmd Commands` that can be part of an SQL file.
https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-utility?view=sql-server-ver16#sqlcmd-commands
"""

View File

@@ -51,7 +51,7 @@ class Rule_CV01(BaseRule):
return None
memory = context.memory
# If style is consistent, add the style of the first occurence to memory
# If style is consistent, add the style of the first occurrence to memory
if self.preferred_not_equal_style == "consistent":
preferred_not_equal_style = context.memory.get("preferred_not_equal_style")
if not preferred_not_equal_style:

View File

@@ -202,7 +202,7 @@ class RawTemplatedTestCase(NamedTuple):
" ",
"{%- set x = 42 %}",
" 1",
# This whitespace is a seperate from the 1 because it's consumed.
# This whitespace is a separate from the 1 because it's consumed.
" ",
"{%- if true -%}",
" ",

View File

@@ -1,4 +1,4 @@
-- Some tsql specifc sql to test config cli argument.
-- Some tsql specific sql to test config cli argument.
BEGIN
SELECT 'Weekend';
END

View File

@@ -1,5 +1,5 @@
-- This query raises AL02.
-- We exlude this rule in the .sqlfluff file and then test
-- We exclude this rule in the .sqlfluff file and then test
-- ignoring this config file via the --ignore-local-config CLI flag.
SELECT col_a a
FROM foo

View File

@@ -34,7 +34,7 @@ OPTIONS (
hive_partition_uri_prefix='gs://bucket/path'
);
-- Test arbritary ordering of optional arguments
-- Test arbitary ordering of optional arguments
CREATE EXTERNAL TABLE dataset.CustomHivePartitionedTable
OPTIONS (
uris=['gs://bucket/path/*'],

View File

@@ -34,7 +34,7 @@ test_fail_implicit_alias_space:
fix_str: select foo.bar from (select 1 as bar) AS foo
test_fail_implicit_alias_explicit:
# Test when explicitly setting explict
# Test when explicitly setting explicit
fail_str: select foo.bar from (select 1 as bar) foo
fix_str: select foo.bar from (select 1 as bar) AS foo
configs:

View File

@@ -15,7 +15,7 @@ test_fail_column_exp_without_alias:
fail_str: SELECT upper(foo), bar from blah
# Casting (via "::TYPE" syntax) has no effect on column output naming
# and AL03 therefore shouldnt be applied
# and AL03 therefore shouldn't be applied
test_pass_column_exp_without_alias_if_only_cast:
pass_str: SELECT foo_col::VARCHAR(28) , bar from blah

View File

@@ -242,7 +242,7 @@ test_pass_snowflake_values:
dialect: snowflake
test_pass_tsql_values_clause_in_parentheses:
# Tests a fix for issue 3522. In tsql, the parentheses surrouding "values" are
# Tests a fix for issue 3522. In tsql, the parentheses surrounding "values" are
# required (otherwise syntax error). SQLFluff was incorrectly complaining that
# the alias 't' was unused.
pass_str: |

View File

@@ -169,7 +169,7 @@ test_fail_tripple_quoted_strings_dont_remove_escapes_double_quotes:
preferred_quoted_literal_style: double_quotes
test_fail_edge_case_tripple_quoted_string_ending_with_double_quote:
# Test that a trailing preferred quote in tripple quote scenario doesn't break
# Test that a trailing preferred quote in triple quote scenario doesn't break
fail_str: |
SELECT
'''Here's a "''',
@@ -229,7 +229,7 @@ test_fail_quote_replace_in_raw_strings:
preferred_quoted_literal_style: double_quotes
test_pass_dollar_quoted_strings_are_ignored:
# Test that we dont interfere with dollar quoted strings
# Test that we don't interfere with dollar quoted strings
pass_str: |
SELECT
'some string',
@@ -243,14 +243,14 @@ test_pass_dollar_quoted_strings_are_ignored:
preferred_quoted_literal_style: single_quotes
test_pass_date_constructor_strings_are_ignored_1:
# Test that we dont interfere with date constructor strings
# Test that we don't interfere with date constructor strings
pass_str: |
SELECT
"quoted string",
DATE'some string'
test_pass_date_constructor_strings_are_ignored_2:
# Test that we dont interfere with date constructor strings
# Test that we don't interfere with date constructor strings
pass_str: |
SELECT
DATE'some string'

View File

@@ -75,8 +75,8 @@ test_value_table_functions_do_not_require_qualification:
force_enable: true
test_object_references_1a:
# This should fail as "a" is an unreference object
# We dont try to be smart.
# This should fail as "a" is an unreferenced object
# We don't try to be smart.
fail_str: SELECT a.bar, b FROM my_tbl
fix_str: SELECT a.bar, my_tbl.b FROM my_tbl

View File

@@ -299,7 +299,7 @@ def test_reflow__deduce_line_indent(
untaken_indents=(1,),
),
# After ON. Default is indented_on_contents = True, so there is
# an indent here. We *SHOULDNT* have an untaken indent here,
# an indent here. We *SHOULDN'T* have an untaken indent here,
# because while there was one at the last point, the trough
# of the last point should have cleared it.
_IndentPoint(

View File

@@ -16,7 +16,7 @@ allowlist_externals =
pip_pre = false
deps =
-r requirements_dev.txt
# Apply the contraints files _as requirements_ files here so that
# Apply the constraints files _as requirements_ files here so that
# we force the right installation version up front in each environment.
# NOTE: This is a bit of a hack around tox, but it does achieve reasonably
# consistent results.