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

Fix #4255 (Fix exception on mixed indent description) #4288

Merged
merged 3 commits into from
Jan 16, 2023

Conversation

alanmcruickshank
Copy link
Member

This resolves #4255 . The problem arises from trying to make a description for a mixed indent, which we don't actually need. This resolves that gracefully by providing a generic "mixed indent" return so that things can complete nicely.

@alanmcruickshank alanmcruickshank changed the title Fix #4255 Fix #4255 (Fix exception on mixed indent description) Jan 15, 2023
@WittierDinosaur
Copy link
Contributor

Would we not want to fix a mixed indent? You'd expect a mixture of tabs and spaces to be wrong in any scenario - granted that'd be a more involved change

@alanmcruickshank
Copy link
Member Author

Would we not want to fix a mixed indent? You'd expect a mixture of tabs and spaces to be wrong in any scenario - granted that'd be a more involved change

We do - but that's a different rule. This is a rule aimed just at trailing/leading comments and doesn't include the logic to fix the indent. It's a good question on why someone would only want to do one and not the other - but I could imagine someone with a particularly strange indentation setup might want to use us to lint commas but not indents. 🤷

@coveralls
Copy link

coveralls commented Jan 16, 2023

Pull Request Test Coverage Report for Build 3928982305

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

Totals Coverage Status
Change from base Build 3928979929: 0.0%
Covered Lines: 16961
Relevant Lines: 16961

💛 - Coveralls

@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (f69c8eb) compared to base (c24a636).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4288   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          201       201           
  Lines        15181     15183    +2     
=========================================
+ Hits         15181     15183    +2     
Impacted Files Coverage Δ
src/sqlfluff/utils/reflow/elements.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.

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 7065410 into main Jan 16, 2023
@alanmcruickshank alanmcruickshank deleted the ac/mixed_indents branch January 16, 2023 10:03
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 L019 throws exception. Spacing issue?
3 participants