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

private_over_fileprivate produces a false positive when using actor #5489

Closed
2 tasks done
jbttn opened this issue Mar 8, 2024 · 0 comments · Fixed by #5490
Closed
2 tasks done

private_over_fileprivate produces a false positive when using actor #5489

jbttn opened this issue Mar 8, 2024 · 0 comments · Fixed by #5490
Assignees
Labels

Comments

@jbttn
Copy link

jbttn commented Mar 8, 2024

New Issue Checklist

Describe the bug

private_over_fileprivate produces a false positive when using actor.

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.53.0
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
  • Paste your configuration file:
disabled_rules:
  - todo

file_length:
  ignore_comment_only_lines: true
function_body_length: 75
identifier_name:
  excluded:
    - i
    - j
    - id
    - db
line_length:
  ignores_comments: true
type_name:
  excluded:
    - ID
    - L

Are you using nested configurations?

No

Which Xcode version are you using (check xcodebuild -version)?

Xcode 15.3
Build version 15E204a

Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.

import SwiftUI

extension EnvironmentValues {
    var foo: Foo { .shared }
}

actor Foo {
  fileprivate static let shared = Foo() // Triggers the warning
}

//class Foo {
//  fileprivate static let shared = Foo() // Does not trigger the warning
//}
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 a pull request may close this issue.

2 participants