You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for specifying --chdir multiple times. This reuses the current support for running multiple subprocesses in parallel, used by --recursive. With this option, we can now run multiple --chdir without running all --chdir, which is useful, for example, in pre-commit or CI systems on PRs where you may want to run on all modified roots rather than all roots.
Since the --chdir is not originally intended to be used in multiple times, integrity with other features is important. For example, what happens if you use the --filter or --recursive with multiple --chdir commands?
Furthermore, the validity of allowing multiple --chdir needs to be considered. While --chdir follows the design of Terraform, Terraform only allows one --chdir. Unlike Terraform, is there a design justification for allowing multiple --chdir?
The justification for multiple --chdir is the same as for --recursive: you generally want to run tflint on many roots (in CI for example), while when running raw terraform, you want to be more specific. This implementation is just adding more flexibility to that - instead of every root with --recursive, you may want to run only on a subset of roots.
Multiple --chdir with --filter works in the same way as --recursive with --filter - each worker independently resolves the filter on their own directory.
Multiple --chdir with --recursive will run on the union of all the directories under all --chdirs.
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
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.
Add support for specifying --chdir multiple times. This reuses the current support for running multiple subprocesses in parallel, used by --recursive. With this option, we can now run multiple --chdir without running all --chdir, which is useful, for example, in pre-commit or CI systems on PRs where you may want to run on all modified roots rather than all roots.