This repository was archived by the owner on Dec 1, 2024. It is now read-only.
Conversation
9cd7bd1 to
17e9f24
Compare
lexidor
approved these changes
Nov 27, 2021
fredemmott
reviewed
Nov 29, 2021
|
|
||
| if (C\is_empty($roots)) { | ||
| $config = LintRunConfig::getForPath(\getcwd()); | ||
| $config = LintRunConfig::getForPath($this->cwd ?? \getcwd()); |
Contributor
There was a problem hiding this comment.
Why do you need this rather than specifying a root?
Contributor
Author
There was a problem hiding this comment.
There is a warning if I specify the root
Warning: PATH arguments contain a hhast-lint.json
fredemmott
suggested changes
Nov 30, 2021
fredemmott
left a comment
Contributor
There was a problem hiding this comment.
- It shouldn't be called cwd, as it's very decoupled from the working directory. Given all it's used for is specifying the path to the config file, it'd be clearer to take an optional full path to the configuration file (using
LintRunConfig::getFromConfigFile()) - I don't see a need for this to be a special-cased thing, especially in a CLI class that can already have optionals; what do you think about adding a
--config-file=argument instead, and making the whole thing more flexible? - Let's also change that warning to include ", but $ABSOLUTE_PATH_TO_ACTIVE_CONFIG will be used"
9ef40de to
67e0616
Compare
Contributor
Author
|
The |
fredemmott
approved these changes
Nov 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a
cwdparameter toLinterCLIfor the test purpose so we could test it without actualchdir, in case of interfering other tests.