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

Add rule to lint trailing commas in select clauses #752

Merged
merged 4 commits into from Feb 13, 2021

Conversation

alanmcruickshank
Copy link
Member

This fixes #362.

@codecov
Copy link

codecov bot commented Feb 12, 2021

Codecov Report

Merging #752 (0d1c926) into master (4ef3139) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #752      +/-   ##
==========================================
+ Coverage   96.03%   96.04%   +0.01%     
==========================================
  Files          95       96       +1     
  Lines        6756     6779      +23     
==========================================
+ Hits         6488     6511      +23     
  Misses        268      268              
Flag Coverage Δ
dbt017-py38 60.31% <37.50%> (-0.09%) ⬇️
dbt018-py38 60.34% <37.50%> (-0.09%) ⬇️
py36 95.24% <100.00%> (+0.01%) ⬆️
py37 95.24% <100.00%> (+0.01%) ⬆️
py38 95.19% <100.00%> (+0.01%) ⬆️
py39 95.19% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sqlfluff/core/rules/config_info.py 100.00% <ø> (ø)
src/sqlfluff/core/rules/base.py 88.83% <100.00%> (+0.22%) ⬆️
src/sqlfluff/core/rules/std/L038.py 100.00% <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 4ef3139...0d1c926. Read the comment docs.

Copy link
Contributor

@dmateusp dmateusp left a comment

Choose a reason for hiding this comment

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

I didn't know some platforms allowed it! It's a scary world out there 😄

@alanmcruickshank
Copy link
Member Author

I didn't know some platforms allowed it! It's a scary world out there 😄

BigQuery allows it but as far as I know, they're the only ones. That's why I think it's a safe bet to forbid.

@alanmcruickshank alanmcruickshank merged commit 19b9954 into master Feb 13, 2021
@alanmcruickshank alanmcruickshank deleted the ac/select_clause_trailing_comma branch February 13, 2021 11: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.

Trailing commas in select statement should raise linting error
2 participants