Open ghost opened 2 years ago
This is actually an issue in Danger
itself.
This plugin uses Git
module from Danger
.
So here the git.renamed_files
, git.modified_files
and git.added_files
already return incorrect paths (basically with the subdir path added again unnecessarily). So in your case ios
is added twice as this is probably the directory where your Dangerfile is located.
https://github.com/ashfurrow/danger-ruby-swiftlint/blob/00dabeb5af5cf6e6628716a20daa607e94f35b2c/lib/danger_plugin.rb#L211-L216
So you can either provide the paths to files yourself or temporary workaround by linting all files instead of only modified in the PR.
Set swiftlint.lint_all_files = true
and it will omit the part of code that uses flawed Danger
methods.:
https://github.com/ashfurrow/danger-ruby-swiftlint/blob/00dabeb5af5cf6e6628716a20daa607e94f35b2c/lib/danger_plugin.rb#L104-L113
I am using Bitrise as a CI/CD tool and I have an issue when I am running Danger-swiftlint for my project:
The cause of this issue probably is a double
ios
value in the path because when I moved Danger and Gemfile file into the root folder it works. We are using Kotlin Multiplatform and our root folder for iOS is project_catalouge/ios/ and there is no possibility to keep these files there.Is there any workaround for this or a way to pass a different execution path?
My Danger file setup:
Bitrise job for running Danger: