Skip to content

Conversation

@paustint
Copy link
Collaborator

Ensure that the indent is applied correctly to all tokens

Resolves: #272

Ensure that the indent is applied correctly to all tokens

Resolves: #272
@paustint paustint requested a review from Copilot December 15, 2025 22:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where the numIndent option was not being properly applied to all tokens during SOQL query formatting. Previously, the formatter hardcoded a single tab character (\t) when adding new lines after keywords, ignoring the configured indent value.

Key Changes:

  • Updated the formatClause method to use getIndent() instead of hardcoded \t
  • Added test case to verify correct indentation with numIndent: 2

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/formatter/formatter.ts Changed formatClause to use getIndent() method instead of hardcoded tab character
test/test-cases-for-format.ts Added test case 18 to verify numIndent option works correctly, and reformatted existing test cases for consistency
CHANGELOG.md Added version 6.3.1 entry documenting the indent fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paustint paustint merged commit 7c99095 into master Dec 15, 2025
6 checks passed
@paustint paustint deleted the bug/272 branch December 15, 2025 22:38
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.

Formatter: indent is not honored for the first token after a keyword

2 participants