Skip to content

Commit

Permalink
Fix linter disabled reason usage (#4466)
Browse files Browse the repository at this point in the history
* Fix linter disabled reason usage

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: Borja Domínguez Vázquez <[email protected]>
Co-authored-by: bdovaz <[email protected]>
Co-authored-by: Nicolas Vuillamy <[email protected]>
  • Loading branch information
4 people authored Jan 9, 2025
1 parent fbad2c0 commit 3f8cf1d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md):
if hasattr(linter, "disabled") and linter.disabled is True:
linter_doc_md += [""]
linter_doc_md += ["_This linter has been disabled in this version_"]
if hasattr(linter, "disabled_reason") and linter.disabled_reason is True:
if hasattr(linter, "disabled_reason") and linter.disabled_reason:
linter_doc_md += [""]
linter_doc_md += [f"_Disabled reason: {linter.disabled_reason}_"]

Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/json_eslint_plugin_jsonc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ description: How to use eslint-plugin-jsonc (configure, ignore files, ignore err

_This linter has been disabled in this version_

_Disabled reason: Bug in eslint-plugin-jsonc: <https://github.com/ota-meshi/eslint-plugin-jsonc/issues/328>_

**eslint-plugin-jsonc** uses eslint to lint [**json**](https://www.json.org/), [**jsonc**](https://github.com/microsoft/node-jsonc-parser) and [**json5**](https://json5.org/) (extended JSON with comments & more).

- To override default configuration, create a `.eslintrc-json.json` [custom configuration file applicable to your project](https://github.com/ota-meshi/eslint-plugin-jsonc#configuration)
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/makefile_checkmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: How to use checkmake (configure, ignore files, ignore errors, help

_This linter has been disabled in this version_

_Disabled reason: Security issues: <https://github.com/mrtazz/checkmake/issues/99>_

## checkmake documentation

- Version in MegaLinter: **0.2.0**
Expand Down
2 changes: 2 additions & 0 deletions docs/descriptors/markdown_remark_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: How to use remark-lint (configure, ignore files, ignore errors, hel

_This linter has been disabled in this version_

_Disabled reason: Bug in remark-lint: <https://github.com/remarkjs/remark-lint/issues/322>_

## remark-lint documentation

- Version in MegaLinter: **14.0.2**
Expand Down
2 changes: 1 addition & 1 deletion megalinter/descriptors/json.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ linters:
# ESLINT-PLUGIN-JSONC
- class: EslintLinter
disabled: true
disabled_reason: "Bug in eslint-plugin-jsonc : https://github.com/ota-meshi/eslint-plugin-jsonc/issues/328"
disabled_reason: "Bug in eslint-plugin-jsonc: https://github.com/ota-meshi/eslint-plugin-jsonc/issues/328"
linter_name: eslint-plugin-jsonc
can_output_sarif: true
file_extensions:
Expand Down

0 comments on commit 3f8cf1d

Please sign in to comment.