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 issue where organizeDeclarations rule would unexpectedly remove non-mark comment #1956

Merged

Conversation

calda
Copy link
Collaborator

@calda calda commented Jan 3, 2025

This PR fixes an issue I noticed where the organizeDeclarations rule would unexpectedly remove a non-mark comment.

In this case, the comment is within the edit distance threshold of a comment like // Static Properties, meaning it would be unexpectedly removed:

        enum Test {
-           /// Test Properties
            static let foo = "foo"
            static let bar = "bar"
            static let baaz = "baaz"
        }

Instead it seems better to only look for and remove MARK comments.

@calda calda force-pushed the cal--organizeDeclarations-comment-behavior branch from e2da757 to 49497db Compare January 3, 2025 19:29
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.43%. Comparing base (6db7324) to head (49497db).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1956      +/-   ##
===========================================
- Coverage    95.44%   95.43%   -0.01%     
===========================================
  Files          138      138              
  Lines        24939    24953      +14     
===========================================
+ Hits         23803    23815      +12     
- Misses        1136     1138       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@calda calda merged commit 7cf39cb into nicklockwood:develop Jan 3, 2025
10 of 11 checks passed
nicklockwood pushed a commit that referenced this pull request Jan 19, 2025
nicklockwood pushed a commit that referenced this pull request Jan 19, 2025
nicklockwood pushed a commit that referenced this pull request Jan 19, 2025
nicklockwood pushed a commit that referenced this pull request Jan 19, 2025
nicklockwood pushed a commit that referenced this pull request Jan 19, 2025
nicklockwood pushed a commit that referenced this pull request Jan 20, 2025
nicklockwood pushed a commit that referenced this pull request Jan 21, 2025
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.

1 participant