Closed lars-reimann closed 3 years ago
@lars-reimann > That's true for IGNORE_GENERATED_FILE that I forgot (PR in progress), but for the linters you identified, they are part of JSON schema (which is mostly generated automatically from linter descriptors)
What IDE do you use ? It seems the used JSON schema is out of date :/
That's curious. The current state for me is:
@nvuillam IntelliJ seems to be using this section of the schema, which is indeed missing these keys:
"description": "Mega-Linter configuration file",
"enum_linter_keys": {
"enum": [
"ANSIBLE_ANSIBLE_LINT",
"ARM_ARM_TTK",
"BASH_EXEC",
"BASH_SHELLCHECK",
"BASH_SHFMT",
"C_CPPLINT",
"CLOJURE_CLJ_KONDO",
"CLOUDFORMATION_CFN_LINT",
"COFFEE_COFFEELINT",
"COPYPASTE_JSCPD",
"CPP_CPPLINT",
"CSHARP_DOTNET_FORMAT",
"CSS_STYLELINT",
"CSS_SCSS_LINT",
"DART_DARTANALYZER",
"DOCKERFILE_DOCKERFILELINT",
"DOCKERFILE_HADOLINT",
"EDITORCONFIG_EDITORCONFIG_CHECKER",
"ENV_DOTENV_LINTER",
"GHERKIN_GHERKIN_LINT",
"GIT_GIT_DIFF",
"GO_GOLANGCI_LINT",
"GRAPHQL_GRAPHQL_SCHEMA_LINTER",
"GROOVY_NPM_GROOVY_LINT",
"HTML_HTMLHINT",
"JAVA_CHECKSTYLE",
"JAVASCRIPT_ES",
"JAVASCRIPT_STANDARD",
"JAVASCRIPT_PRETTIER",
"JSON_JSONLINT",
"JSON_ESLINT_PLUGIN_JSONC",
"JSON_V8R",
"JSX_ESLINT",
"KOTLIN_KTLINT",
"KUBERNETES_KUBEVAL",
"LATEX_CHKTEX",
"LUA_LUACHECK",
"MARKDOWN_MARKDOWNLINT",
"MARKDOWN_REMARK_LINT",
"MARKDOWN_MARKDOWN_LINK_CHECK",
"OPENAPI_SPECTRAL",
"PERL_PERLCRITIC",
"PHP_BUILTIN",
"PHP_PHPCS",
"PHP_PHPSTAN",
"PHP_PSALM",
"POWERSHELL_POWERSHELL",
"PROTOBUF_PROTOLINT",
"PUPPET_PUPPET_LINT",
"PYTHON_PYLINT",
"PYTHON_BLACK",
"PYTHON_FLAKE8",
"PYTHON_ISORT",
"R_LINTR",
"RAKU_RAKU",
"RST_RST_LINT",
"RST_RSTCHECK",
"RST_RSTFMT",
"RUBY_RUBOCOP",
"RUST_CLIPPY",
"SALESFORCE_SFDX_SCANNER",
"SCALA_SCALAFIX",
"SNAKEMAKE_LINT",
"SNAKEMAKE_SNAKEFMT",
"SPELL_MISSPELL",
"SPELL_CSPELL",
"SQL_SQL_LINT",
"TEKTON_TEKTON_LINT",
"TERRAFORM_TFLINT",
"TERRAFORM_TERRASCAN",
"TERRAFORM_TERRAGRUNT",
"TSX_ESLINT",
"TYPESCRIPT_ES",
"TYPESCRIPT_STANDARD",
"TYPESCRIPT_PRETTIER",
"VBDOTNET_DOTNET_FORMAT",
"XML_XMLLINT",
"YAML_YAMLLINT",
"YAML_V8R"
],
"type": "string"
},
Those keys are not missing in master version of the schema ^^
From where is your JSON sample ? it does not contain MARKDOWN_MARKDOWN_TABLE_FORMATTER
whereas it is available in Mega-Linter repo ->
@nvuillam Unless I have some really weird caching issues on my side, they are missing, though. It's a different location than you pointed to. See https://github.com/nvuillam/mega-linter/blob/b4761190ddb97fcac8070473b878a067bccc91e3/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json#L239
I think there might be some unintended duplication in the schema.
I just clicked on your hyperlink and saw markdown table formatter entry, do you see it on your link ?
@nvuillam In line 144, yes. In line 239, where I pointed to, no. The entire part "enum_linter_keys" is defined twice, note the different line numbers:
If I remove the second occurrence (line 198), IntelliJ is happy. I'm unsure what the semantics of the second occurrence are anyway, since it's outside the definitions block. VS Code apparently ignores it, while IntelliJ overrides the original definition (line 100).
You're totally right, enum_linter_keys should be only within definitions
:)
Thanks for the PR !
Describe the bug The JSON schema seems to be missing some options that are mentioned in the documentation.
ENABLED_LINTERS/DISABLED_LINTERS:
Common variables:
I checked all linters and all common variables but none of the other parts of the schema.
To Reproduce Steps to reproduce the behavior:
Expected behavior Docs and schema should match.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context I just want to say thanks for a very promising and useful tool.