Closed
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
Applying lower_acl_than_parent
to provided sample code breaks it.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Linting Swift files in current working directory
Linting 'Example.swift' (1/1)
/path/Example.swift:3:5: warning: Lower ACL than Parent Violation: Ensure declarations have a lower access control level than their enclosing parent (lower_acl_than_parent)
Done linting! Found 1 violation, 0 serious in 1 file.
Environment
- SwiftLint version (run
swiftlint version
to be sure)? 0.51.0 - Installation method used (Homebrew, CocoaPods, building from source, etc)? homebrew
- Paste your configuration file:
only_rules:
- lower_acl_than_parent
- Are you using nested configurations? No.
- Which Xcode version are you using (check
xcodebuild -version
)? Xcode 14.3 Build version 14E222b - Do you have a sample that shows the issue?
struct Example {
let content: String
public init(content: String) {}
}
is corrected to:
struct Example {
let content: Stringinit(content: String) {}
}