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

L031 desc updated to cover both 'from' and 'join' #1625

Merged
merged 5 commits into from Oct 13, 2021

Conversation

nevado
Copy link
Contributor

@nevado nevado commented Oct 13, 2021

Brief summary of the change made

Small update to L031 description so it is clear that it covers both 'from' and 'join' clauses - previously was a bit confusing as it only mentioned 'join' clauses but will also trigger when there is no join present.

Fixes #1624

Are there any other side effects of this change that we should be aware of?

No

Pull Request checklist

All good

nevado and others added 3 commits October 13, 2021 12:33
L031 description updated to cover both 'from' and 'join' clauses - previously was a bit confusing as it only mentioned 'join' clauses but will also trigger when there is no join present. Related to sqlfluff#1624
Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

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

@nevado you'll need to update this test case:

expected_output = """== [test/fixtures/linter/indentation_error_simple.sql] FAIL
L: 2 | P: 4 | L003 | Indentation not hanging or a multiple of 4 spaces
L: 5 | P: 10 | L010 | Keywords must be consistently upper case.
L: 5 | P: 13 | L031 | Avoid using aliases in join condition
"""

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #1625 (6b2f536) into main (14e1a23) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1625   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          131       131           
  Lines         9207      9207           
=========================================
  Hits          9207      9207           
Impacted Files Coverage Δ
src/sqlfluff/rules/L031.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14e1a23...6b2f536. Read the comment docs.

@tunetheweb tunetheweb merged commit 05d172f into sqlfluff:main Oct 13, 2021
@nevado nevado deleted the patch-1 branch October 13, 2021 15:25
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.

TSQL - L031 incorrectly triggers "Avoid using aliases in join condition" when no join present
2 participants