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 #4252 (Resolve multiple sensible indents) #4285

Merged
merged 4 commits into from Jan 15, 2023
Merged

Conversation

alanmcruickshank
Copy link
Member

This resolves #4252.

The issue arises from a bug in #4239. That PR did not account for both the point before and after the comment having important indent stats. This introduces a method for combining them so all the information is encoded.

@coveralls
Copy link

coveralls commented Jan 15, 2023

Pull Request Test Coverage Report for Build 3925631069

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

Totals Coverage Status
Change from base Build 3925629202: 0.0%
Covered Lines: 16959
Relevant Lines: 16959

💛 - Coveralls

FROM table
WHERE
NOT bool_column AND NOT bool_column
AND some_column >= 1
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't have a comment in it?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦 . Good catch

@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

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

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4285   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          201       201           
  Lines        15176     15181    +5     
=========================================
+ Hits         15176     15181    +5     
Impacted Files Coverage Δ
src/sqlfluff/utils/reflow/elements.py 100.00% <100.00%> (ø)
src/sqlfluff/utils/reflow/reindent.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 cf2d35c into main Jan 15, 2023
@alanmcruickshank alanmcruickshank deleted the ac/indents branch January 15, 2023 23:02
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.

2.0.0a2 Comment in a complex, nested sub-query breaks indentation of following SQL
3 participants