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

Quiet(er) option #2146

Closed
pvickery-ParamountCommerce opened this issue Oct 23, 2024 · 1 comment · Fixed by #2150
Closed

Quiet(er) option #2146

pvickery-ParamountCommerce opened this issue Oct 23, 2024 · 1 comment · Fixed by #2150

Comments

@pvickery-ParamountCommerce
Copy link
Contributor

pvickery-ParamountCommerce commented Oct 23, 2024

Introduction

The --quiet option was removed in 0.11.0, as it became the default, but I think it would be useful to add it back to allow even quieter output.

- [#413](https://github.com/terraform-linters/tflint/pull/413): Remove `--quiet` option

For example, I run tflint from pre-commit-terraform on a large repo with many projects and when a single project fails tflint, I get the following output for all the projects before any useful information about the findings.

====================================================
working directory: dir1

Plugin "aws" is already installed
====================================================
working directory: dir2

Plugin "aws" is already installed
====================================================
working directory: dir3

Plugin "aws" is already installed
...

Proposal

Can these logs be made option by using --quiet?

References

tflint/cmd/init.go

Lines 27 to 28 in 8bb73bb

fmt.Fprint(cli.outStream, "====================================================\n")
fmt.Fprintf(cli.outStream, "working directory: %s\n\n", wd)

fmt.Fprintf(cli.outStream, "Plugin \"%s\" is already installed\n", pluginCfg.Name)

Related issue: #1849

@wata727
Copy link
Member

wata727 commented Oct 30, 2024

Alternatively, it may be worth considering changing the behavior of --recursive --init so that it doesn't output anything if nothing happens in the subdir.

If we introduce --quiet, it is important to introduce subcommands first, since its name can be read as applying to other commands as well #1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants