Skip to content

Commit

Permalink
Add textlint (super-linter#2006)
Browse files Browse the repository at this point in the history
* Add textlint

* Add new final newline

* Validate only markdown files

* txt -> md
  • Loading branch information
massongit committed Sep 30, 2021
1 parent 81422f3 commit 3472ac3
Show file tree
Hide file tree
Showing 10 changed files with 8,234 additions and 5,463 deletions.
20 changes: 20 additions & 0 deletions .automation/test/natural_language/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Natural language Test Cases

This folder holds the test cases for **natural language**.

## Additional Docs

No Additional information is needed for this test case.

## Good Test Cases

The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted.

- **Note:** They are linted utilizing the default linter rules.

## Bad Test Cases

The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted.

- **Note:** They are linted utilizing the default linter rules.
{"mode":"full","isActive":false}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://eslint.org/docs/user-guide/configuring#configuration-file-formats
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://eslint.org/docs/user-guide/configuring/#configuration-file-formats
6 changes: 6 additions & 0 deletions .github/linters/.textlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"filters": {},
"rules": {
"no-dead-link": true
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base
| **LaTeX** | [ChkTex](https://www.nongnu.org/chktex/) |
| **Lua** | [luacheck](https://github.com/luarocks/luacheck) |
| **Markdown** | [markdownlint](https://github.com/igorshubovych/markdownlint-cli#readme) |
| **Natural language** | [textlint](https://textlint.github.io/) |
| **OpenAPI** | [spectral](https://github.com/stoplightio/spectral) |
| **Perl** | [perlcritic](https://metacpan.org/pod/Perl::Critic) |
| **PHP** | [PHP built-in linter](https://www.php.net/) / [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) / [PHPStan](https://phpstan.org/) / [Psalm](https://psalm.dev/) |
Expand Down Expand Up @@ -314,6 +315,7 @@ But if you wish to select or exclude specific linters, we give you full control
| **SQL_CONFIG_FILE** | `.sql-config.json` | Filename for [SQL-Lint configuration](https://sql-lint.readthedocs.io/en/latest/files/configuration.html) (ex: `sql-config.json` , `.config.json`) |
| **TERRAFORM_TFLINT_CONFIG_FILE** | `.tflint.hcl` | Filename for [tfLint configuration](https://github.com/terraform-linters/tflint) (ex: `.tflint.hcl`) |
| **TERRAFORM_TERRASCAN_CONFIG_FILE**| `terrascan.toml` | Filename for [terrascan configuration](https://github.com/accurics/terrascan) (ex: `terrascan.toml`) |
| **TEXTLINT_CONFIG_FILE** | `.textlintrc` | Filename for [textlint configuration](https://textlint.github.io/docs/getting-started.html#configuration) (ex: `.textlintrc`) |
| **TYPESCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) |
| **USE_FIND_ALGORITHM** | `false` | By default, we use `git diff` to find all files in the workspace and what has been updated, this would enable the Linux `find` method instead to find all files to lint |
| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. |
Expand Down Expand Up @@ -351,6 +353,7 @@ But if you wish to select or exclude specific linters, we give you full control
| **VALIDATE_LATEX** | `true` | Flag to enable or disable the linting process of the LaTeX language. |
| **VALIDATE_LUA** | `true` | Flag to enable or disable the linting process of the language. |
| **VALIDATE_MARKDOWN** | `true` | Flag to enable or disable the linting process of the Markdown language. |
| **VALIDATE_NATURAL_LANGUAGE** | `true` | Flag to enable or disable the linting process of the natural language. |
| **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the OpenAPI language. |
| **VALIDATE_PERL** | `true` | Flag to enable or disable the linting process of the Perl language. |
| **VALIDATE_PHP** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter) (keep for backward compatibility) |
Expand Down
6 changes: 6 additions & 0 deletions TEMPLATES/.textlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"filters": {},
"rules": {
"no-dead-link": true
}
}

0 comments on commit 3472ac3

Please sign in to comment.