Closed mildm8nnered closed 5 days ago
17 Messages | |
---|---|
:book: | Linting Aerial with this PR took 1.02s vs 0.98s on main (4% slower) |
:book: | Linting Alamofire with this PR took 1.37s vs 1.36s on main (0% slower) |
:book: | Linting Brave with this PR took 8.04s vs 8.03s on main (0% slower) |
:book: | Linting DuckDuckGo with this PR took 4.39s vs 4.42s on main (0% faster) |
:book: | Linting Firefox with this PR took 11.35s vs 11.34s on main (0% slower) |
:book: | Linting Kickstarter with this PR took 10.07s vs 10.06s on main (0% slower) |
:book: | Linting Moya with this PR took 0.56s vs 0.56s on main (0% slower) |
:book: | Linting NetNewsWire with this PR took 2.77s vs 2.75s on main (0% slower) |
:book: | Linting Nimble with this PR took 0.82s vs 0.81s on main (1% slower) |
:book: | Linting PocketCasts with this PR took 8.68s vs 8.68s on main (0% slower) |
:book: | Linting Quick with this PR took 0.45s vs 0.46s on main (2% faster) |
:book: | Linting Realm with this PR took 5.02s vs 5.05s on main (0% faster) |
:book: | Linting Sourcery with this PR took 2.53s vs 2.51s on main (0% slower) |
:book: | Linting Swift with this PR took 4.93s vs 4.92s on main (0% slower) |
:book: | Linting VLC with this PR took 1.33s vs 1.34s on main (0% faster) |
:book: | Linting Wire with this PR took 19.22s vs 19.25s on main (0% faster) |
:book: | Linting WordPress with this PR took 14.21s vs 14.22s on main (0% faster) |
Generated by :no_entry_sign: Danger
Adds a
--working-directory
argument tolint
andanalyze
, for users who cannot easily control the current directory when executing SwiftLint (e.g. in some plugin and CI scenarios).Addresses #5424
This is required because
.swiftlint.yml
's in the current directory are treated slightly differently to.swiftlint.yml
's found deeper in the tree.For example:
We could assume that the first
.swiftlint.yml
we encountered was the "main" one, but this would not be true in the unusual, but valid case, where users intentionally did not have a "main".swiftlint.yml
. Additionally, some SwiftLint code, specifically some reporters, assume that the current directory is also the top-level directory of the project.All relative paths on the command line and in configuration files will be treated as relative to the specified working directory.