Skip to content
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

Add support for recursive init and print versions #1629

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Dec 25, 2022

Follow up of #1622

This PR changes --init and --version to support the --recursive option. As a result --chdir is also supported:

$ tflint --recursive --init
Installing plugins on each working directory...

====================================================
working directory: .

Plugin `aws` is already installed
====================================================
working directory: sub1

No plugins to install
====================================================
working directory: sub2

No plugins to install
====================================================
working directory: sub3

No plugins to install
====================================================
working directory: sub3/sub

No plugins to install

$ tflint --recursive --version
TFLint version 0.43.0

====================================================
working directory: .

+ ruleset.aws (0.21.1)
+ ruleset.terraform (0.2.1-bundled)
====================================================
working directory: sub1

+ ruleset.terraform (0.2.1-bundled)
====================================================
working directory: sub2

+ ruleset.terraform (0.2.1-bundled)
====================================================
working directory: sub3

+ ruleset.terraform (0.2.1-bundled)
====================================================
working directory: sub3/sub

+ ruleset.terraform (0.2.1-bundled)

This is a missing piece for the recursive inspection introduced in #1622. The recursive inspection will load each directory's config, so you'll need to tflint --init in each directory. The tflint --recursive --init solves this.

@wata727 wata727 merged commit f221b31 into master Dec 25, 2022
@wata727 wata727 deleted the recursive_for_init_and_version branch December 25, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant