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

References rule bundle #4446

Merged
merged 5 commits into from Mar 1, 2023
Merged

References rule bundle #4446

merged 5 commits into from Mar 1, 2023

Conversation

alanmcruickshank
Copy link
Member

@alanmcruickshank alanmcruickshank commented Mar 1, 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.

The only deeper functionality change here is the RF04, RF05 and CP02 shared a utility function called identifiers_policy_applicable which had been living in the capitalisation bundle. With the new plugin structure, having bundles which depend on other bundles doesn't work neatly (and results in circular imports). To resolve that I've mode this method into the sqlfluff.util module so that both can depend on it neatly.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4307518570

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

Totals Coverage Status
Change from base Build 4306190214: 0.0%
Covered Lines: 17338
Relevant Lines: 17338

💛 - Coveralls

@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (8a82572) 100.00% compared to head (cb19ddd) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4446   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          210       212    +2     
  Lines        15473     15497   +24     
=========================================
+ Hits         15473     15497   +24     
Impacted Files Coverage Δ
src/sqlfluff/rules/capitalisation/CP02.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF01.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF02.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF03.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF04.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF05.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/RF06.py 100.00% <100.00%> (ø)
src/sqlfluff/rules/references/__init__.py 100.00% <100.00%> (ø)
src/sqlfluff/utils/identifers.py 100.00% <100.00%> (ø)

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 20:35
@alanmcruickshank alanmcruickshank changed the title [draft] References rule bundle References rule bundle Mar 1, 2023
Copy link
Member

@pwildenhain pwildenhain left a comment

Choose a reason for hiding this comment

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

🌈 ✨ Nicely done

@@ -281,7 +281,7 @@ require_final_semicolon = False
# GROUP BY/ORDER BY column references
group_by_and_order_by_style = consistent

[sqlfluff:rules:L057]
[sqlfluff:rules:RF05]
Copy link
Member

Choose a reason for hiding this comment

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

Are there any plans to allow using the new "readable" rule names in the config rather than the codes?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll slack you about this. Short answer - not at the moment because if we accept more than one way of specifying config, we then have to deal with resolving priority.

@alanmcruickshank alanmcruickshank merged commit 021e790 into main Mar 1, 2023
@alanmcruickshank alanmcruickshank deleted the ac/rules_reorg_6 branch March 1, 2023 21:09
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