-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix using incorrect config file #1604
Conversation
Generated by 🚫 Danger |
Codecov Report
@@ Coverage Diff @@
## master #1604 +/- ##
==========================================
- Coverage 88.2% 88.18% -0.02%
==========================================
Files 194 194
Lines 9680 9693 +13
==========================================
+ Hits 8538 8548 +10
- Misses 1142 1145 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have tests to cover this case? 🤔
49c4fc2
to
dbdc9f7
Compare
I actually think this fix is wrong, or at least incomplete. It won't work if the specified config isn't in the root path (e.g. |
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Removes configuration “working directory” check as the configuration itself can reside in different directory. This check was introduced with PR realm#1604 for issue realm#1531. At the time it was necessary as SwiftLint did not support Configuration merging and this stopped overwriting the configuration. Replaced it with configuration file path check. At the moment, if you load configuration from different path than root path **and** you also have configuration file in root path then it is skipped. Now that configuration merging is supported, it is more correct to merge them. Example where `Level3/.swiftlint.yml` is skipped: `swiftlint lint --config ../.swiftlint.yml --path Level3` ``` Level2 │ .swiftlint.yml │ └───Level3 │ │ .swiftlint.yml │ │ Level3.swift ``` Adds test for making sure that configuration that is out of working directory is merged with configuration from working directory. Adds test for realm#1531 to make sure regression won’t happen in the future.
Fixes #1531.