Skip to content

Commit 89e2b1b

Browse files
authored
Fix count of yamllint errors (#3198)
* 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>
1 parent 84e465b commit 89e2b1b

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

.automation/test/yaml/yml_bad_2.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#####################
2+
#####################
3+
## Heres some vars ##
4+
#####################
5+
#####################
6+
7+
############
8+
# Env Vars #
9+
############
10+
env:
11+
browser: here: there : again "yep"
12+
es6: 0
13+
jest: yes
14+
15+
Here: there 'is' something going on
16+
17+
something: "For 'Nothing'" 123

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
2525
- Fix mkdocs generation + CI control job by @nvuillam in <https://github.com/oxsecurity/megalinter/pull/3135>
2626
- Add semgrep ruleset to validation schema by @wesley-dean-flexion in <https://github.com/oxsecurity/megalinter/pull/3164>
2727
- Downgrade stylelint to avoid crash with not v16 compliant dependencies
28+
- Fix count of yaml-lint errors
2829

2930
- CI
3031
- Add arguments to make use of pytest-xdist, by @echoix

docs/descriptors/css_scss_lint.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: How to use scss-lint (configure, ignore files, ignore errors, help
1515

1616
> This linter has been deprecated.
1717
>
18-
> https://github.com/sds/scss-lint#notice-consider-other-tools-before-adopting-scss-lint
18+
> <https://github.com/sds/scss-lint#notice-consider-other-tools-before-adopting-scss-lint>
1919
>
2020
> You should disable scss-lint by adding it in DISABLE_LINTERS property.
2121
>

docs/descriptors/xml_xmllint.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML
2525
| Variable | Description | Default value |
2626
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
2727
| XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` |
28-
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` |
28+
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` |
2929
| XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call<br/>Ex: `-s --foo "bar"` | |
3030
| XML_XMLLINT_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter<br/>Ex: `-s --foo "bar"` | |
3131
| XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter<br/>Ex: `(src\|lib)` | Include every file |

megalinter/descriptors/yaml.megalinter-descriptor.yml

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ linters:
7373
linter_megalinter_ref_url: "no"
7474
config_file_name: ".yamllint.yml"
7575
cli_lint_mode: list_of_files
76+
cli_lint_errors_count: regex_count
77+
cli_lint_errors_regex: "[0-9]+:[0-9]+.*error"
7678
examples:
7779
- "yamllint myfile.yaml"
7880
- "yamllint -c .yamllint.yml myfile.yaml"

0 commit comments

Comments
 (0)