Skip to content

Revert redundant internal & fileprivate accessibility analysis#1038

Merged
ileitch merged 1 commit into
masterfrom
revert-internal-fileprivate-accessibility
Jan 6, 2026
Merged

Revert redundant internal & fileprivate accessibility analysis#1038
ileitch merged 1 commit into
masterfrom
revert-internal-fileprivate-accessibility

Conversation

@ileitch

@ileitch ileitch commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

After further testing, I identified some significant issues with the internal analysis.

  • Applying internal explicitly to some declarations causes an incorrect result (e.g., initializers, overrides, protocol conformances).
  • The README states that analysis also applies to declarations that are implicitly internal, yet this is not the case. Enabling this highlights many false-positives.

After further testing, I identified some significant issues with the internal analysis.
* Applying `internal` explicitly to some declarations causes an incorrect result (e.g., initializers, overrides, protocol conformances).
* The README states that analysis also applies to declarations that are implicitly internal, yet this is not the case. Enabling this highlights many false-positives.
@ileitch
ileitch merged commit d9ec01c into master Jan 6, 2026
13 checks passed
@ileitch
ileitch deleted the revert-internal-fileprivate-accessibility branch January 6, 2026 12:52
@danwood

danwood commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

@ileitch I will try to dig into this and get these fixed, but do you have any specific problematic examples that you ran across? I have been using this branch for months now so I'm surprised there would be issues.

@ileitch

ileitch commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

@ileitch I will try to dig into this and get these fixed, but do you have any specific problematic examples that you ran across? I have been using this branch for months now so I'm surprised there would be issues.

If you tweak RedundantInternalAccessibilityMarker to use accessibility.value == .internal instead of accessibility.isExplicitly(.internal), then run mise r scan, you'll see a lot of new results. You should also see that for some of them, making the declaration as either private or fileprivate is not valid.

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 participants