-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom config not loaded properly #1531
Labels
bug
Unexpected and reproducible misbehavior.
Comments
I was able to reproduce it with 0.19.0. |
I have a fix incoming. |
jpsim
added a commit
that referenced
this issue
Jun 3, 2017
marcelofabri
pushed a commit
that referenced
this issue
Jun 13, 2017
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
May 7, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
May 7, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
May 7, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
May 7, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
May 7, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
Sep 19, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
Sep 20, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
Sep 20, 2019
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.
alvarhansen
added a commit
to alvarhansen/SwiftLint
that referenced
this issue
Sep 20, 2019
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When linting with custom config file while
.swiftlint.yml
exists in current directory,disabled_rules
are loaded from.swiftlint.yml
instead of passed config file.How to reproduce (0.18.1):
In folder containing
Run
swiftlint lint --config .swiftlint-ci.yml
:The text was updated successfully, but these errors were encountered: