Skip to content

Commit

Permalink
Fix count of yamllint errors (#3198)
Browse files Browse the repository at this point in the history
* Fix count of yamllint errors

Fixes #3195

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: nvuillam <nicolas.vuillamy@cloudity.com>
Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 9, 2023
1 parent 84e465b commit 89e2b1b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .automation/test/yaml/yml_bad_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#####################
#####################
## Heres some vars ##
#####################
#####################

############
# Env Vars #
############
env:
browser: here: there : again "yep"
es6: 0
jest: yes

Here: there 'is' something going on

something: "For 'Nothing'" 123
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Fix mkdocs generation + CI control job by @nvuillam in <https://github.com/oxsecurity/megalinter/pull/3135>
- Add semgrep ruleset to validation schema by @wesley-dean-flexion in <https://github.com/oxsecurity/megalinter/pull/3164>
- Downgrade stylelint to avoid crash with not v16 compliant dependencies
- Fix count of yaml-lint errors

- CI
- Add arguments to make use of pytest-xdist, by @echoix
Expand Down
2 changes: 1 addition & 1 deletion docs/descriptors/css_scss_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description: How to use scss-lint (configure, ignore files, ignore errors, help

> This linter has been deprecated.
>
> https://github.com/sds/scss-lint#notice-consider-other-tools-before-adopting-scss-lint
> <https://github.com/sds/scss-lint#notice-consider-other-tools-before-adopting-scss-lint>
>
> You should disable scss-lint by adding it in DISABLE_LINTERS property.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/descriptors/xml_xmllint.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML
| Variable | Description | Default value |
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
| XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` |
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` |
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` |
| XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call<br/>Ex: `-s --foo "bar"` | |
| XML_XMLLINT_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter<br/>Ex: `-s --foo "bar"` | |
| XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter<br/>Ex: `(src\|lib)` | Include every file |
Expand Down
2 changes: 2 additions & 0 deletions megalinter/descriptors/yaml.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ linters:
linter_megalinter_ref_url: "no"
config_file_name: ".yamllint.yml"
cli_lint_mode: list_of_files
cli_lint_errors_count: regex_count
cli_lint_errors_regex: "[0-9]+:[0-9]+.*error"
examples:
- "yamllint myfile.yaml"
- "yamllint -c .yamllint.yml myfile.yaml"
Expand Down

0 comments on commit 89e2b1b

Please sign in to comment.