danger-ruby-swiftlint
danger-ruby-swiftlint copied to clipboard
Switch to different folder path
Is there a way to switch to different folder path and then run swiftlint
in Dangerfile
and then switch back to the main folder?
For e.g.
Folder A
---- Folder B
---- Folder C
My main folder is Folder A
. I want to switch to Folder B
and then run swiftlint
in it. My .swiftlint.yml
file is inside Folder B
. After swiftlint
is complete, I want to switch back to Folder A
.
Hmm, I don't think that's currently possible with the tool. I believe SwiftLint is smart enough to respect the individual .swiftlint.yml
files in each directory. Can you try it out and see if ti works as-is? Thanks!
I tried running swiflint in the main directory and I didn't get any violations although there are known violations.
Regards, Rishabh Tayal [email protected]
On May 6, 2017, 9:35 AM -0500, Ash Furrow [email protected], wrote:
Hmm, I don't think that's currently possible with the tool. I believe SwiftLint is smart enough to respect the individual .swiftlint.yml files in each directory. Can you try it out and see if ti works as-is? Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/ashfurrow/danger-swiftlint/issues/41#issuecomment-299643787), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACALxgSukUj5h6ThtW2lccVqFLys2QSBks5r3IUagaJpZM4NQv1m).
Interesting. Thanks for following up. I'll try taking a look at it but it may not be for a little while.
Before you look into it I find a potential solution which should work but it doesn't. Here is the link. https://github.com/danger/danger/issues/805
Hey @RishabhTayal did you try to use the :directory field?
The intention of this feature is precisely allow you to run swiftlint from a different directory. In your case I believe it would be like this:
Directories
Folder A
---- Folder B
---- Folder C
Dangerfile
swiftlint.directory "Folder B"
swiftlint.lint_files
swiftlint.directory "Folder C"
swiftlint.lint_files
So it would lint different folders individually.
Hope it helps