Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Mar 20, 2025

This PR fixes false positives in VisibilityKeywordIndentation.

The rule was trying to match to the indentation of the line where the TypeNode began.
The thing is, we're actually more interesting in the top-level type declaration.

Example:

type
  Foo = // we care about the indentation of this line
      class(TObject) // but the rule was using this one
  public // <-- FP will be raised here.
    procedure Bar;
  end;

@cirras cirras requested a review from jgardn3r March 20, 2025 05:52
@cirras cirras force-pushed the visibility_indentation_anchor branch from 08b2eda to c2a96ed Compare March 21, 2025 01:19
@jgardn3r
Copy link
Collaborator

Also, rebase to resolve your merge CHANGELOG conflicts. 🙃

@cirras cirras force-pushed the visibility_indentation_anchor branch from c2a96ed to 4845eea Compare March 21, 2025 04:18
@cirras cirras requested a review from jgardn3r March 21, 2025 04:19
Copy link
Collaborator

@jgardn3r jgardn3r left a comment

Choose a reason for hiding this comment

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

Looks good

@cirras cirras merged commit ae21dc4 into master Mar 23, 2025
4 checks passed
@cirras cirras deleted the visibility_indentation_anchor branch March 28, 2025 05:56
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.

3 participants