Skip to content

Conversation

@benfdking
Copy link
Collaborator

Summary

  • reset indentation and untaken indents for comment-only lines
  • test comment at start of parenthesized block keeps correct indent

Testing

  • cargo test -p sqruff-lib --test rules -- LT02-indent.yml

https://chatgpt.com/codex/tasks/task_e_68c6d7e1944c833092f5e0695ec9f581

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle.

Your free Bugbot reviews will reset on October 13

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, please upgrade to Bugbot Pro by visiting the Cursor dashboard. Your first 14 days will be free!

first_ip.initial_indent_balance = initial_indent_balance;
first_ip.untaken_indents.clear();
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Comment Line Bug Causes Indentation Issues

The new logic incorrectly modifies the line immediately following a comment-only line. This can break indentation for subsequent comment lines or normal code, and only updates the first indent point, leading to inconsistent line state. Additionally, comment_line_idx + 1 has a potential integer overflow.

Fix in Cursor Fix in Web

@github-actions
Copy link

Benchmark for b928ecc

Click to view benchmark
Test Base PR %
DepthMap::from_parent 51.6±0.71µs 50.2±0.56µs -2.71%
fix_complex_query 11.9±0.22ms 11.9±0.06ms 0.00%
fix_superlong 163.7±16.45ms 168.4±19.13ms +2.87%
parse_complex_query 4.1±0.06µs 4.2±0.06µs +2.44%
parse_expression_recursion 7.1±0.09µs 7.2±0.11µs +1.41%
parse_simple_query 1048.6±14.05ns 1069.3±20.48ns +1.97%

@openhands-ai
Copy link

openhands-ai bot commented Sep 14, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • PR Checks

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #1969 at branch `codex/fix-formatting-issue-with-sql-comments`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant