danger-ruby-swiftlint
danger-ruby-swiftlint copied to clipboard
danger-swxftlint 0.7.0 fails when specifying config file
Very odd, tested 0.6.0
and it works fine.
Although, 0.7.0
works with this configuration:
swiftlint.lint_files
It does fail with this:
swiftlint.config_file = '.swiftlint.yml'
swiftlint.lint_files
The logs report fatal error
but it doesn't make CI like travis fail the build and it neither report any type of error whatsoever on the pull request.
fatal error: Could not read configuration file at path '/Users/myuser/Projects/myProject/mySubProject/Sources/Auth0Provider/Authentication/Resources/SignIn.swift/.swiftlint.yml': file /Users/marcelofabri/Westfield/SwiftLint/Source/SwiftLintFramework/Models/Configuration.swift, line 167
/Users/myuser/Projects/myProject/mySubProject/Sources/Auth0Provider/Authentication/Resources/SignIn.swift/.swiftlint.yml:File not found.
fatal error: Could not read configuration file at path '/Users/myuser/Projects/myProject/mySubProject/Sources/AuthenticationProvider/Controllers/AuthenticationController.swift/.swiftlint.yml': file /Users/marcelofabri/Westfield/SwiftLint/Source/SwiftLintFramework/Models/Configuration.swift, line 167
/Users/myuser/Projects/myProject/mySubProject/Sources/AuthenticationProvider/Controllers/AuthenticationController.swift/.swiftlint.yml:File not found.
Errors are weird, not sure what's happening there. Somehow it seems there is some hardcoded path coming from swiftlint directly.
I am using the latest swiftlint 0.20.1
.
This is a SwiftLint issue, sorry about that. Filled https://github.com/realm/SwiftLint/issues/1694 to track it.
And PR landed in https://github.com/realm/SwiftLint/pull/1695. Could you please try it to see if it solves the issue?
Also, a current workaround for this issue is to provide an absolute path for --config
.
@marcelofabri I can try if you release an hot fix of swiftlint 0.20.2
There are a number of ways to install SwiftLint without requiring an official release. Please see https://github.com/realm/SwiftLint#installation
Notably, brew install swiftlint --HEAD
It seems like SwiftLint 0.21.0
has the same issue.