Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure and Ambiguous rule bundles #4444

Merged
merged 11 commits into from Mar 1, 2023
Merged

Conversation

alanmcruickshank
Copy link
Member

@alanmcruickshank alanmcruickshank commented Feb 28, 2023

Another step in #4031. These ones are all straightforward recodes. All the rules are still intact and just moved into new bundles as per the rules spreadsheet.

This also updates rule glob matching expressions in rules and exclude_rules to also match on aliases, names and groups - mostly because it supports better backward compatibility and it's not significantly more complicated to execute.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4302599190

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4295671548: 0.0%
Covered Lines: 17312
Relevant Lines: 17312

💛 - Coveralls

@coveralls
Copy link

coveralls commented Mar 1, 2023

Pull Request Test Coverage Report for Build 4304409563

  • 107 of 107 (100.0%) changed or added relevant lines in 17 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4295671548: 0.0%
Covered Lines: 17312
Relevant Lines: 17312

💛 - Coveralls

@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (b684224) 100.00% compared to head (01120ed) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4444   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          208       210    +2     
  Lines        15420     15473   +53     
=========================================
+ Hits         15420     15473   +53     
Impacted Files Coverage Δ
src/sqlfluff/cli/commands.py 100.00% <ø> (ø)
src/sqlfluff/core/rules/base.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM01.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM02.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM03.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM04.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM05.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM06.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/AM07.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/ambiguous/__init__.py 100.00% <100.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alanmcruickshank alanmcruickshank marked this pull request as ready for review March 1, 2023 11:19
This query violates L027, L044, L050, L051, and L052.
When we exclude L05*,L027 in the config we expect L027, L050, L051,
and L052 to be ignored by the linter.
This query violates L027, AM04 (ex L044), L050, AM05 (ex L051), and L052.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure we want zombie refs around where we don't need them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - I mention them, because the globs in this test (L04*), do still match these rules because of their aliases. It's not as much that they're there as old refs, it's because those refs persist as aliases which can be matched by globs (as demonstrated in this test).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WittierDinosaur - do you reckon that makes sense? I think otherwise the test is kind of confusing to understand.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I guess so. But you don't do that in the glob_include tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm good point. I'll update the comments to be more explicit on both.

@alanmcruickshank alanmcruickshank changed the title [draft] Structure and Ambiguous rule bundles Structure and Ambiguous rule bundles Mar 1, 2023
Copy link
Contributor

@WittierDinosaur WittierDinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alanmcruickshank alanmcruickshank merged commit 8a82572 into main Mar 1, 2023
@alanmcruickshank alanmcruickshank deleted the ac/rules_reorg_5 branch March 1, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants