oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.93k stars 237 forks source link

Discover how Linters are activated or de-activated #3512

Closed llaville closed 6 months ago

llaville commented 6 months ago

Is your feature request related to a problem? Please describe. Add ability to known how linters are activated or not

Describe the solution you'd like Add new logs (debug level) on each linter activation/deactivation

Describe alternatives you've considered Do nothing

Additional context Example of output

[Activation] - ACTION_ACTIONLINT (ACTION) was not activated by default strategies
[Activation] - ANSIBLE_ANSIBLE_LINT (ANSIBLE) was not activated by default strategies
[Activation] - API_SPECTRAL (API) was not activated by default strategies
[Activation] - ARM_ARM_TTK (ARM) was not activated by default strategies
[Activation] - BASH_EXEC (BASH) was not activated by default strategies
[Activation] - BASH_SHELLCHECK (BASH) was not activated by default strategies
[Activation] - BASH_SHFMT (BASH) was not activated by default strategies
[Activation] - BICEP_BICEP_LINTER (BICEP) was not activated by default strategies
[Activation] - C_CPPLINT (C) was not activated by default strategies
[Activation] - C_CLANG_FORMAT (C) was not activated by default strategies
[Activation] - CLOJURE_CLJ_KONDO (CLOJURE) was not activated by default strategies
[Activation] - CLOJURE_CLJSTYLE (CLOJURE) was not activated by default strategies
[Activation] - CLOUDFORMATION_CFN_LINT (CLOUDFORMATION) was not activated by default strategies
[Activation] - COFFEE_COFFEELINT (COFFEE) was not activated by default strategies
[Activation] - COPYPASTE_JSCPD (COPYPASTE) was not activated by default strategies
[Activation] - CPP_CPPLINT (CPP) was not activated by default strategies
[Activation] - CPP_CLANG_FORMAT (CPP) was not activated by default strategies
[Activation] - CSHARP_DOTNET_FORMAT (CSHARP) was not activated by default strategies
[Activation] - CSHARP_CSHARPIER (CSHARP) was not activated by default strategies
[Activation] - CSHARP_ROSLYNATOR (CSHARP) was not activated by default strategies
[Activation] - CSS_STYLELINT (CSS) was not activated by default strategies
[Activation] - CSS_SCSS_LINT (CSS) was not activated by default strategies
[Activation] - DART_DARTANALYZER (DART) was not activated by default strategies
[Activation] - DOCKERFILE_HADOLINT (DOCKERFILE) was not activated by default strategies
[Activation] - EDITORCONFIG_EDITORCONFIG_CHECKER (EDITORCONFIG) was not activated by default strategies
[Activation] - ENV_DOTENV_LINTER (ENV) was not activated by default strategies
[Activation] - GHERKIN_GHERKIN_LINT (GHERKIN) was not activated by default strategies
[Activation] - GO_GOLANGCI_LINT (GO) was not activated by default strategies
[Activation] - GO_REVIVE (GO) was not activated by default strategies
[Activation] - GRAPHQL_GRAPHQL_SCHEMA_LINTER (GRAPHQL) was not activated by default strategies
[Activation] - GROOVY_NPM_GROOVY_LINT (GROOVY) was not activated by default strategies
[Activation] - HTML_DJLINT (HTML) was not activated by default strategies
[Activation] - HTML_HTMLHINT (HTML) was not activated by default strategies
[Activation] - JAVA_CHECKSTYLE (JAVA) was not activated by default strategies
[Activation] - JAVA_PMD (JAVA) was not activated by default strategies
[Activation] - JAVASCRIPT_ES (JAVASCRIPT) was not activated by default strategies
[Activation] - JAVASCRIPT_STANDARD (JAVASCRIPT) was not activated by default strategies
[Activation] - JAVASCRIPT_PRETTIER (JAVASCRIPT) was not activated by default strategies
[Activation] + JSON_JSONLINT (JSON) was activated by ENABLE_LINTERS strategies
[Activation] - JSON_ESLINT_PLUGIN_JSONC (JSON) was not activated by default strategies
[Activation] - JSON_V8R (JSON) was not activated by default strategies
[Activation] - JSON_PRETTIER (JSON) was not activated by default strategies
[Activation] - JSON_NPM_PACKAGE_JSON_LINT (JSON) was not activated by default strategies
[Activation] - JSX_ESLINT (JSX) was not activated by default strategies
[Activation] - KOTLIN_KTLINT (KOTLIN) was not activated by default strategies
[Activation] - KOTLIN_DETEKT (KOTLIN) was not activated by default strategies
[Activation] - KUBERNETES_KUBECONFORM (KUBERNETES) was not activated by default strategies
[Activation] - KUBERNETES_HELM (KUBERNETES) was not activated by default strategies
[Activation] - KUBERNETES_KUBESCAPE (KUBERNETES) was not activated by default strategies
[Activation] - LATEX_CHKTEX (LATEX) was not activated by default strategies
[Activation] - LUA_LUACHECK (LUA) was not activated by default strategies
[Activation] - MAKEFILE_CHECKMAKE (MAKEFILE) was not activated by default strategies
[Activation] - MARKDOWN_MARKDOWNLINT (MARKDOWN) was not activated by default strategies
[Activation] - MARKDOWN_REMARK_LINT (MARKDOWN) was not activated by default strategies
[Activation] - MARKDOWN_MARKDOWN_LINK_CHECK (MARKDOWN) was not activated by default strategies
[Activation] - MARKDOWN_MARKDOWN_TABLE_FORMATTER (MARKDOWN) was not activated by default strategies
[Activation] - OPENAPI_SPECTRAL (OPENAPI) was not activated by default strategies
[Activation] - PERL_PERLCRITIC (PERL) was not activated by default strategies
[Activation] - PHP_PHPCS (PHP) was not activated by default strategies
[Activation] - PHP_PHPSTAN (PHP) was not activated by default strategies
[Activation] - PHP_PSALM (PHP) was not activated by default strategies
[Activation] + PHP_PHPLINT (PHP) was activated by ENABLE_LINTERS strategies
[Activation] - POWERSHELL_POWERSHELL (POWERSHELL) was not activated by default strategies
[Activation] - POWERSHELL_POWERSHELL_FORMATTER (POWERSHELL) was not activated by default strategies
[Activation] - PROTOBUF_PROTOLINT (PROTOBUF) was not activated by default strategies
[Activation] - PUPPET_PUPPET_LINT (PUPPET) was not activated by default strategies
[Activation] - PYTHON_PYLINT (PYTHON) was not activated by default strategies
[Activation] - PYTHON_BLACK (PYTHON) was not activated by default strategies
[Activation] - PYTHON_FLAKE8 (PYTHON) was not activated by default strategies
[Activation] - PYTHON_ISORT (PYTHON) was not activated by default strategies
[Activation] - PYTHON_BANDIT (PYTHON) was not activated by default strategies
[Activation] - PYTHON_MYPY (PYTHON) was not activated by default strategies
[Activation] - PYTHON_PYRIGHT (PYTHON) was not activated by default strategies
[Activation] - PYTHON_RUFF (PYTHON) was not activated by default strategies
[Activation] - R_LINTR (R) was not activated by default strategies
[Activation] - RAKU_RAKU (RAKU) was not activated by default strategies
[Activation] - REPOSITORY_CHECKOV (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_DEVSKIM (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_DUSTILOCK (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_GIT_DIFF (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_GITLEAKS (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_GRYPE (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_KICS (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_SECRETLINT (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_SEMGREP (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_SYFT (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_TRIVY (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_TRIVY_SBOM (REPOSITORY) was not activated by default strategies
[Activation] - REPOSITORY_TRUFFLEHOG (REPOSITORY) was not activated by default strategies
[Activation] - RST_RST_LINT (RST) was not activated by default strategies
[Activation] - RST_RSTCHECK (RST) was not activated by default strategies
[Activation] - RST_RSTFMT (RST) was not activated by default strategies
[Activation] - RUBY_RUBOCOP (RUBY) was not activated by default strategies
[Activation] - RUST_CLIPPY (RUST) was not activated by default strategies
[Activation] - SALESFORCE_SFDX_SCANNER_APEX (SALESFORCE) was not activated by default strategies
[Activation] - SALESFORCE_SFDX_SCANNER_AURA (SALESFORCE) was not activated by default strategies
[Activation] - SALESFORCE_SFDX_SCANNER_LWC (SALESFORCE) was not activated by default strategies
[Activation] - SALESFORCE_LIGHTNING_FLOW_SCANNER (SALESFORCE) was not activated by default strategies
[Activation] - SCALA_SCALAFIX (SCALA) was not activated by default strategies
[Activation] - SNAKEMAKE_LINT (SNAKEMAKE) was not activated by default strategies
[Activation] - SNAKEMAKE_SNAKEFMT (SNAKEMAKE) was not activated by default strategies
[Activation] - SPELL_CSPELL (SPELL) was not activated by default strategies
[Activation] - SPELL_PROSELINT (SPELL) was not activated by default strategies
[Activation] - SPELL_VALE (SPELL) was not activated by default strategies
[Activation] - SPELL_LYCHEE (SPELL) was not activated by default strategies
[Activation] - SQL_SQL_LINT (SQL) was not activated by default strategies
[Activation] - SQL_SQLFLUFF (SQL) was not activated by default strategies
[Activation] - SQL_TSQLLINT (SQL) was not activated by default strategies
[Activation] - SWIFT_SWIFTLINT (SWIFT) was not activated by default strategies
[Activation] - TEKTON_TEKTON_LINT (TEKTON) was not activated by default strategies
[Activation] - TERRAFORM_TFLINT (TERRAFORM) was not activated by default strategies
[Activation] - TERRAFORM_TERRASCAN (TERRAFORM) was not activated by default strategies
[Activation] - TERRAFORM_TERRAGRUNT (TERRAFORM) was not activated by default strategies
[Activation] - TERRAFORM_TERRAFORM_FMT (TERRAFORM) was not activated by default strategies
[Activation] - TSX_ESLINT (TSX) was not activated by default strategies
[Activation] - TYPESCRIPT_ES (TYPESCRIPT) was not activated by default strategies
[Activation] - TYPESCRIPT_STANDARD (TYPESCRIPT) was not activated by default strategies
[Activation] - TYPESCRIPT_PRETTIER (TYPESCRIPT) was not activated by default strategies
[Activation] - VBDOTNET_DOTNET_FORMAT (VBDOTNET) was not activated by default strategies
[Activation] - XML_XMLLINT (XML) was not activated by default strategies
[Activation] - YAML_PRETTIER (YAML) was not activated by default strategies
[Activation] - YAML_YAMLLINT (YAML) was not activated by default strategies
[Activation] - YAML_V8R (YAML) was not activated by default strategies

Related to closed report #3507

llaville commented 6 months ago

Implementation in new branch https://github.com/oxsecurity/megalinter/tree/features/activation-linters-logs

llaville commented 6 months ago

Done: https://github.com/oxsecurity/megalinter/actions/runs/8857480837

nvuillam commented 6 months ago

@llaville you used logging.debug so it will be displayed only when LOG_LEVEL=DEBUG, so it works for me , thanks ! :)

llaville commented 6 months ago

@nvuillam Any other operations should I do ?

nvuillam commented 6 months ago

@llaville just update CHANGELOG.md and make a PR ;)