Skip to content

Commit

Permalink
Improve performances (#1227)
Browse files Browse the repository at this point in the history
* stylelint: list_of_files

* standard: list_of_files

* markdown-link-check: list_of_files

* Upgrade link ref
  • Loading branch information
nvuillam committed Jan 31, 2022
1 parent 73c41ea commit ac0c045
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .automation/test/css/css_bad_02.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Bad */
/* Multi-line */
/* Comment */
.selector-3[type="text"] {
background: linear-gradient(#FFFFFF, rgba(0, 0, 0, 0.8));
box-sizing: border-box;
display: block;
color: #AAAAAA;
}
22 changes: 22 additions & 0 deletions .automation/test/css/css_good_02.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Multi-line comment
*/

.selector-1,
.selector-2,
.selector-3[type="text"] {
background: linear-gradient(#fff, rgba(0 0 0 80%));
box-sizing: border-box;
display: block;
color: #333;
}

.selector-a,
.selector-b:not(:first-child) {
padding: 10px !important;
top: calc(calc(1em * 2) / 3);
}

.selector-x { width: 10%; }
.selector-y { width: 20%; }
.selector-z { width: 30%; }
28 changes: 28 additions & 0 deletions .automation/test/markdown/markdown_bad_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Bad Markdown

This is just standard good markdown.

###### Second level header

This header does **NOT** follow the __step__ down from `level 1`.

- Here it *is*
- Some more indention
- why so much?

```
ls -la
```

| this | is a wrong | table |
|--------|-------|--------------------|
| hahaha | naaaaaaah | wrong formatting ! |
| hahaha | naaaaaaah | wrong formatting ! |

# Walk away

We're all done **here**.
- [Link Action]https://github.com
- [Link Action 2](#wesh)
- [Link Action 3](http://www.glouglouglglsdgdfgfdgsfgdfgdf.com)
- [Link Action 4](http://www.glouglouglglsdgdfgfdgsfgdfgdf.com2)
25 changes: 25 additions & 0 deletions .automation/test/markdown/markdown_good_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Good Markdown

This is just standard good markdown.

## Second level header

This header follows the step down from `level 1`.

- Here it *is*
- Some more **indention**
- why so much?

```bash
ls -la
```

| this | is a good | table |
|------|-----------|----------|
| haha | yesssssss | good ! |
| haha | yesssssss | gooood ! |

### Walk away

We're all done **here**.
- [Link Action](https://github.com)
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-l

- Linter updates:
- cspell: Update .cspell default config with `"version: "2.0", "noConfigSearch": true`
- Use list_of_files mode to improve performances
- markdown-link-check
- standard
- stylelint

- Linter versions upgrades
<!-- linter-versions-end -->
Expand Down
5 changes: 3 additions & 2 deletions megalinter/descriptors/css.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ linters:
linter_rules_configuration_url: https://stylelint.io/user-guide/configure
linter_rules_inline_disable_url: https://stylelint.io/user-guide/ignore-code
linter_megalinter_ref_url: https://stylelint.io/user-guide/integrations/other#analysis-platform-engines
cli_lint_mode: list_of_files
config_file_name: .stylelintrc.json
cli_config_arg_name: "--config"
cli_lint_fix_arg_name: "--fix"
examples:
- "stylelint myfile.css"
- "stylelint --config .stylelintrc.json myfile.css"
- "stylelint --fix --config .stylelintrc.json myfile.css"
- "stylelint --config .stylelintrc.json myfile.css myfile2.css myfile3.css"
- "stylelint --fix --config .stylelintrc.json myfile.css myfile2.css myfile3.css"
install:
npm:
- stylelint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ linters:
linter_rules_url: https://standardjs.com/rules.html
linter_banner_image_url: https://github.com/standard/standard/raw/master/sticker.png
name: JAVASCRIPT_STANDARD
cli_lint_mode: list_of_files
cli_lint_fix_arg_name: "--fix"
examples:
- "standard myfile.js"
Expand Down
1 change: 1 addition & 0 deletions megalinter/descriptors/markdown.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ linters:
linter_rules_configuration_url: https://github.com/tcort/markdown-link-check#config-file-format
linter_rules_inline_disable_url: https://github.com/tcort/markdown-link-check#disable-comments
linter_megalinter_ref_url: https://github.com/tcort/markdown-link-check#run-in-other-tools
cli_lint_mode: list_of_files
config_file_name: .markdown-link-check.json
cli_lint_errors_count: regex_sum
cli_lint_errors_regex: "ERROR: ([0-9]+) dead links found"
Expand Down
2 changes: 1 addition & 1 deletion megalinter/descriptors/python.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ linters:
linter_banner_image_url: http://mypy-lang.org/static/mypy_light.svg
linter_rules_configuration_url: https://mypy.readthedocs.io/en/stable/config_file.html
linter_rules_inline_disable_url: https://mypy.readthedocs.io/en/stable/inline_config.html#inline-config
linter_megalinter_ref_url: https://github.com/python/mypy/pull/12100
linter_megalinter_ref_url: never
cli_lint_mode: list_of_files
cli_lint_extra_args:
- "--install-types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ linters:
linter_rules_url: https://standardjs.com/rules.html
linter_banner_image_url: https://github.com/standard/standard/raw/master/sticker.png
name: TYPESCRIPT_STANDARD
cli_lint_mode: list_of_files
cli_lint_extra_args:
- "--parser"
- "@typescript-eslint/parser"
Expand Down

0 comments on commit ac0c045

Please sign in to comment.