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

False positive extension_access_modifier with Xcode 11.4 #3150

Closed
2 tasks done
CraigSiemens opened this issue Mar 26, 2020 · 1 comment
Closed
2 tasks done

False positive extension_access_modifier with Xcode 11.4 #3150

CraigSiemens opened this issue Mar 26, 2020 · 1 comment
Labels
bug Unexpected and reproducible misbehavior.

Comments

@CraigSiemens
Copy link
Contributor

New Issue Checklist

Describe the bug

extension_access_modifier reports a violation when an extension contains a method with an explicit access modifier and a method with an implicit modifier of internal.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint 
Loading configuration from '.swiftlint.yml'
Linting Swift files at paths 
Linting 'Test.swift' (1/1)
/Users/craig/Desktop/test/Test.swift:3:1: warning: Extension Access Modifier Violation: Prefer to use extension access modifiers (extension_access_modifier)
Done linting! Found 1 violation, 0 serious in 1 file.

Environment

  • SwiftLint version: 0.39.1
  • Installation method used: Homebrew
  • Paste your configuration file:
opt_in_rules:
  - extension_access_modifier
  • Are you using nested configurations? No
    If so, paste their relative paths and respective contents.
  • Which Xcode version are you using (check xcodebuild -version)? 11.4
  • 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.
struct Foo {}

// Extension Access Modifier Violation: Prefer to use extension access modifiers (extension_access_modifier)
extension Foo {
    func setup() {}
    public func update() {}
}
@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Mar 27, 2020
@marcelofabri
Copy link
Collaborator

Fixed in #3153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants