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

Need ability to suppress linter version info output #5337

Closed
1 task done
rmatte opened this issue Feb 27, 2024 · 2 comments · Fixed by #5546, #5547 or #5537
Closed
1 task done

Need ability to suppress linter version info output #5337

rmatte opened this issue Feb 27, 2024 · 2 comments · Fixed by #5546, #5547 or #5537
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label

Comments

@rmatte
Copy link

rmatte commented Feb 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Previously the version info of all the linters was not shown by default and required a certain level of logging to see. The way it used to work is that we'd get the possum output and then it would only show linting errors if we selected the appropriate log level to see those and that was it. Now we're getting flooded with this info whether we want it or not every time we run super-linter...

chktex: chktex: WARNING -- Could not find global resource file.
ChkTeX v1.7.8 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with POSIX extended regex support.
rubocop: 1.60.2
perl: 
This is perl 5, version 38, subversion 2 (v5.38.2) built for x86_64-linux-thread-multi

Copyright 1987-2023, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.
xmllint: xmllint: using libxml version 21106
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 HTTP DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Schemas Schematron Modules Debug Zlib Lzma 
ansible-lint: ansible-lint 24.2.0 using ansible-core:2.16.3 ansible-compat:4.1.11 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
eslint: v8.56.0
markdownlint: 0.39.0
snakefmt: snakefmt, version 0.10.0
cpplint: Cpplint fork (https://github.com/cpplint/cpplint)
cpplint 1.6.1
Python 3.12.2 (main, Feb  7 2024, 22:13:24) [GCC 13.2.1 20231014]
editorconfig-checker: 2.7.2
gitleaks: v8.18.2
phpstan: PHPStan - PHP Static Analysis Tool 1.10.48
dotenv-linter: dotenv-linter 3.3.0
asl-validator: 3.8.2
actionlint: 1.6.26
installed by building from source
built with go1.21.1 compiler for linux/amd64
tekton-lint: 1.0.0-beta.9
terrascan: version: v1.18.11
terraform: Terraform v1.7.3
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.7.4. You can update by downloading from https://www.terraform.io/downloads.html
2024/02/27 14:17:07 traces export: Post "http:///dev/otel-grpc.sock": http: no Host in request URL
2024/02/27 14:17:07 traces export: Post "http:///dev/otel-grpc.sock": http: no Host in request URL
clippy: clippy 0.1.72
R: R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-musl (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
rustfmt: rustfmt 1.6.0-stable ( )
shellcheck: ShellCheck - shell script analysis tool
version: 0.9.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
jscpd: 3.5.10
black: black, 24.2.0 (compiled: no)
Python (CPython) 3.12.2
prettier: 3.2.5
php: PHP 8.2.15 (cli) (built: Jan 18 2024 16:40:05) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.15, Copyright (c) Zend Technologies
textlint: v14.0.3
npm-groovy-lint: GroovyLint: Successfully processed CodeNarc: 
CodeNarc version 3.3.0
npm-groovy-lint version 14.2.2

Embeds:
CodeNarc version 3.3.0
- Groovy version 3.0.9 (superlite)
renovate-config-validator: (node:240) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
37.202.2
golangci-lint: golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T20:35:23Z
kubeconform: v0.6.4
golangci-lint: golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T20:35:23Z
gherkin-lint: Version command not supported
eslint: v8.56.0
scalafmt: scalafmt 3.7.17
stylelint: 15.11.0
sqlfluff: sqlfluff, version 2.3.5
bash-exec: Version command not supported
google-java-format: google-java-format: Version 1.19.2
phpcs: PHP_CodeSniffer version 3.8.0 (stable) by Squiz and PHPCSStandards
terragrunt: terragrunt version v0.55.2
psalm: Psalm 5.22.1@e9dad66e11274315dac27e08349c628c7d6a1a43
pylint: pylint 3.0.3
astroid 3.0.3
Python 3.12.2 (main, Feb  7 2024, 22:13:24) [GCC 13.2.1 20231014]
shfmt: v3.8.0
snakemake: 8.4.9
arm-ttk: ModuleVersion = 0.24
pwsh: PowerShell 7.4.1
mypy: mypy 1.8.0 (compiled: yes)
eslint: v8.56.0
coffeelint: 5.2.11
tflint: TFLint version 0.50.3
+ ruleset.terraform (0.5.0-bundled)
cfn-lint: cfn-lint 0.85.2
flake8: 7.0.0 (mccabe: 0.7.0, pycodestyle: 2.11.1, pyflakes: 3.2.0) CPython 3.12.2 on
Linux
spectral: 6.11.0
clj-kondo: clj-kondo v2024.02.12
eslint: v8.56.0
ts-standard: 12.0.2
eslint: v8.56.0
protolint: protolint version 0.47.5(80ba08f)
raku: Welcome to Rakudo™ v2023.11.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.11.
prettier: 3.2.5
hadolint: Haskell Dockerfile Linter 2.12.0
checkstyle: Checkstyle version: 10.13.0
clang-format: clang-format version 17.0.5 (https://github.com/llvm/llvm-project.git 98bfdac5ce82d1679f8af9a57501471812ab68d7)
ktlint: 1.1.1
yamllint: yamllint 1.35.1
dart: Dart SDK version: 3.3.0 (stable) (Tue Feb 13 10:25:19 2024 +0000) on "linux_x64"
isort: 
                 _                 _
                (_) ___  ___  _ __| |_
                | |/ _/ / _ \/ '__  _/
                | |\__ \/\_\/| |  | |_
                |_|\___/\___/\_/   \_/

      isort your imports, so you don't have to.

                    VERSION 5.13.2
dotnet: 8.0.101
eslint: v8.56.0
rustfmt: rustfmt 1.6.0-stable ( )
htmlhint: 1.1.4
rustfmt: rustfmt 1.6.0-stable ( )
sql-lint: 1.0.0
checkov: 3.2.22
lua: Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio
standard: 17.1.0

Expected Behavior

This info should probably just be hidden by default and then have some sort of SHOW_LINTER_VERSIONS option to show this stuff if people want it. Or it could be the other way around, if preferred, with a SUPPRESS_LINTER_VERSIONS option to disable the display of this stuff. There is already a "SUPPRESS_POSSUM" option so that variable naming would be in line with that. Just need a way to get rid of the versions output as we don't want to see the version of every linter every time we run super-linter. Thanks.

Anything else?

No response

@rmatte rmatte added the enhancement New feature or request label Feb 27, 2024
@ferrarimarco
Copy link
Collaborator

I think we can probably wrap this call in an info call:

if ! cat "${VERSION_FILE}"; then

instead of introducing another environment variable.

Feel free to send a PR, I'll happily review it.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

If you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the O: backlog 🤖 label`.

@github-actions github-actions bot added the O: stale 🤖 Stale issue/pr label Mar 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2024
@ferrarimarco ferrarimarco reopened this Apr 19, 2024
@ferrarimarco ferrarimarco added O: backlog 🤖 Backlog, stale ignores this label and removed O: stale 🤖 Stale issue/pr labels Apr 19, 2024
ferrarimarco added a commit that referenced this issue Apr 19, 2024
- Write log messages in the log file according to the LOG_LEVEL that the
  user configured (or the default), instead of printing all the messages
  regardless of LOG_LEVEL to the log file.
- Don't emit colors if there is no terminal

Close #5337
ferrarimarco added a commit that referenced this issue Apr 19, 2024
Use log functions to print linter versions and the super-linter logo so
that they respect the configured log level.

Close #5337
ferrarimarco added a commit that referenced this issue Apr 19, 2024
- Write log messages in the log file according to the LOG_LEVEL that the
  user configured (or the default), instead of printing all the messages
  regardless of LOG_LEVEL to the log file.
- Don't emit colors if there is no terminal

Close #5337
ferrarimarco added a commit that referenced this issue Apr 19, 2024
Use log functions to print linter versions and the super-linter logo so
that they respect the configured log level.

Close #5337
ferrarimarco added a commit that referenced this issue Apr 19, 2024
- Write log messages in the log file according to the LOG_LEVEL that the
  user configured (or the default), instead of printing all the messages
  regardless of LOG_LEVEL to the log file.
- Don't emit colors if there is no terminal

Close #5337
github-merge-queue bot pushed a commit that referenced this issue Apr 20, 2024
- Write log messages in the log file according to the LOG_LEVEL that the
  user configured (or the default), instead of printing all the messages
  regardless of LOG_LEVEL to the log file.
- Don't emit colors if there is no terminal

Close #5337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request O: backlog 🤖 Backlog, stale ignores this label
Projects
None yet
2 participants