diff --git a/.automation/build.py b/.automation/build.py index 0c71d9b02c4..08818185bfb 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -142,13 +142,20 @@ class {lang_lower}_{linter_name_lower}_test(TestCase, LinterTestRoot): # Automatically generate README linters table and a MD file for each linter -def generate_linter_documentation(): +def generate_documentation(): descriptor_files = megalinter.utils.list_descriptor_files() linters_by_type = {'language': [], 'format': [], 'tooling_format': []} + descriptors = [] for descriptor_file in descriptor_files: + descriptor = megalinter.utils.build_descriptor_info(descriptor_file) + descriptors += [descriptor] descriptor_linters = megalinter.utils.build_descriptor_linters( descriptor_file) linters_by_type[descriptor_linters[0].descriptor_type] += descriptor_linters + # Build descriptors documentation + for descriptor in descriptors: + generate_descriptor_documentation(descriptor) + # Build README linters table and linters documentation linters_tables_md = [] process_type(linters_by_type, 'language', 'Languages', linters_tables_md) process_type(linters_by_type, 'format', 'Formats', linters_tables_md) @@ -161,7 +168,78 @@ def generate_linter_documentation(): "", linters_tables_md_str) -# Build a MD table for a type of linter (language, format, tooling_format )SSS +# Generate a MD page for a descriptor (language, format, tooling_format) +def generate_descriptor_documentation(descriptor): + descriptor_md = [ + "", + "" + ] + # Title + descriptor_md += [f"# {descriptor.get('descriptor_label', descriptor.get('descriptor_id'))}", + ""] + # Criteria used by the descriptor to identify files to lint + descriptor_md += [ + "## Linted files", + ""] + if descriptor.get('active_only_if_file_found', None) is not None: + descriptor_md += [ + f"- Activated only if file is found: `{descriptor.get('active_only_if_file_found')}`"] + if len(descriptor.get('file_extensions', [])) > 0: + descriptor_md += ['- File extensions:'] + for file_extension in descriptor.get('file_extensions'): + descriptor_md += [f" - `{file_extension}`"] + descriptor_md += [""] + if len(descriptor.get('file_names', [])) > 0: + descriptor_md += ['- File names:'] + for file_name in descriptor.get('file_names'): + descriptor_md += [f" - `{file_name}`"] + descriptor_md += [""] + if len(descriptor.get('file_contains', [])) > 0: + descriptor_md += ['- Detected file content:'] + for file_contains_expr in descriptor.get('file_contains'): + descriptor_md += [f" - `{file_contains_expr}`"] + descriptor_md += [""] + # Mega-linter variables + descriptor_md += [ + "## Mega-linter configuration", + "", + "| Variable | Description | Default value |", + "| ----------------- | -------------- | -------------- |"] + descriptor_md += [ + f"| {descriptor.get('descriptor_id')}_FILTER_REGEX_INCLUDE | Custom regex including filter | |", + f"| {descriptor.get('descriptor_id')}_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | |", + "" + ] + # List of linters + lang_lower = descriptor.get('descriptor_id').lower() + descriptor_md += [ + "## Linters", + "", + "| Linter | Configuration key |", + "| ------ | ----------------- |"] + for linter in descriptor.get('linters', []): + linter_name_lower = linter.get('linter_name').lower().replace('-', '_') + linter_doc_url = f"{DOCS_URL_DESCRIPTORS_ROOT}/{lang_lower}_{linter_name_lower}.md" + descriptor_md += [ + f"| [{linter.get('linter_name')}]({doc_url(linter_doc_url)}) | " + f"[{linter.get('name', descriptor.get('descriptor_id'))}]({doc_url(linter_doc_url)}) |"] + # Add install info + if descriptor.get('install', None) is not None: + descriptor_md += ["", + "## Behind the scenes"] + descriptor_md += ["", + "### Installation", + ""] + descriptor_md += get_install_md(descriptor) + # Write MD file + file = open( + f"{REPO_HOME}/docs/descriptors/{lang_lower}.md", 'w') + file.write("\n".join(descriptor_md) + "\n") + file.close() + logging.info('Updated ' + file.name) + + +# Build a MD table for a type of linter (language, format, tooling_format), and a MD file for each linter def process_type(linters_by_type, type1, type_label, linters_tables_md): linters_tables_md += [ f"### {type_label}", @@ -173,7 +251,8 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): for linter in descriptor_linters: lang_lower = linter.descriptor_id.lower() linter_name_lower = linter.linter_name.lower().replace('-', '_') - # Append in general linter tables + + # Append in general linter tables (for README) descriptor_label = f"**{linter.descriptor_label}** ({linter.descriptor_id})" \ if hasattr(linter, 'descriptor_label') else f"**{linter.descriptor_id}**" if prev_lang != linter.descriptor_id and \ @@ -186,12 +265,14 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): '', '', descriptor_label, 32) else: icon_html = '' - descriptor_id_cell = descriptor_label if prev_lang != linter.descriptor_id else '' + descriptor_url = doc_url(f"{DOCS_URL_DESCRIPTORS_ROOT}/{lang_lower}.md") + descriptor_id_cell = f"[{descriptor_label}]({descriptor_url})" if prev_lang != linter.descriptor_id else '' prev_lang = linter.descriptor_id linter_doc_url = f"{DOCS_URL_DESCRIPTORS_ROOT}/{lang_lower}_{linter_name_lower}.md" linters_tables_md += [ f"| {icon_html} | {descriptor_id_cell} | [{linter.linter_name}]({doc_url(linter_doc_url)})" f"| [{linter.name}]({doc_url(linter_doc_url)}) |"] + # Build individual linter doc linter_doc_md = [ "", @@ -312,29 +393,7 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): ""] item = vars(linter) merge_install_attr(item) - if 'dockerfile' in item['install']: - linter_doc_md += ["- Dockerfile commands :"] - linter_doc_md += ['```dockerfile'] - linter_doc_md += item['install']['dockerfile'] - linter_doc_md += ['```', - ""] - if 'apk' in item['install']: - linter_doc_md += ["- APK packages (Linux):"] - linter_doc_md += md_package_list(item['install']['apk'], " ", - "https://pkgs.alpinelinux.org/packages?branch=edge&name=") - if 'npm' in item['install']: - linter_doc_md += ["- NPM packages (node.js):"] - linter_doc_md += md_package_list(item['install'] - ['npm'], " ", "https://www.npmjs.com/package/") - if 'pip' in item['install']: - linter_doc_md += ["- PIP packages (Python):"] - linter_doc_md += md_package_list(item['install'] - ['pip'], " ", "https://pypi.org/project/") - if 'gem' in item['install']: - linter_doc_md += ["- GEM packages (Ruby) :"] - linter_doc_md += md_package_list(item['install'] - ['gem'], " ", "https://rubygems.org/gems/") - + linter_doc_md += get_install_md(item) linter_doc_md += [ "", "### Linter web site", @@ -350,6 +409,33 @@ def process_type(linters_by_type, type1, type_label, linters_tables_md): return linters_tables_md +def get_install_md(item): + linter_doc_md = [] + if 'dockerfile' in item['install']: + linter_doc_md += ["- Dockerfile commands :"] + linter_doc_md += ['```dockerfile'] + linter_doc_md += item['install']['dockerfile'] + linter_doc_md += ['```', + ""] + if 'apk' in item['install']: + linter_doc_md += ["- APK packages (Linux):"] + linter_doc_md += md_package_list(item['install']['apk'], " ", + "https://pkgs.alpinelinux.org/packages?branch=edge&name=") + if 'npm' in item['install']: + linter_doc_md += ["- NPM packages (node.js):"] + linter_doc_md += md_package_list(item['install'] + ['npm'], " ", "https://www.npmjs.com/package/") + if 'pip' in item['install']: + linter_doc_md += ["- PIP packages (Python):"] + linter_doc_md += md_package_list(item['install'] + ['pip'], " ", "https://pypi.org/project/") + if 'gem' in item['install']: + linter_doc_md += ["- GEM packages (Ruby) :"] + linter_doc_md += md_package_list(item['install'] + ['gem'], " ", "https://rubygems.org/gems/") + return linter_doc_md + + def doc_url(href): if href.startswith('https://github') and "#" not in href: return href + "#readme" @@ -450,5 +536,5 @@ def copy_files(): validate_descriptors() generate_dockerfile() generate_linter_test_classes() - generate_linter_documentation() + generate_documentation() copy_files() diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 12340cafbfe..7896d15d6a6 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -1,6 +1,6 @@ --- # Mega-Linter GitHub Action configuration file -# More info at https://github.com/nvuillam/mega-linter#mega-linter +# More info at https://github.com/nvuillam/mega-linter#readme name: Mega-Linter # Start lint on any push and on pull requests diff --git a/README.md b/README.md index e8e9ba45ca6..d4337f46344 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![GitHub release](https://img.shields.io/github/v/release/nvuillam/mega-linter?sort=semver) [![Docker Pulls](https://img.shields.io/docker/pulls/nvuillam/mega-linter)](https://hub.docker.com/r/nvuillam/mega-linter) -[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) [![codecov](https://codecov.io/gh/nvuillam/mega-linter/branch/master/graph/badge.svg)](https://codecov.io/gh/nvuillam/mega-linter) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) @@ -65,74 +65,74 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **BASH** | [bash-exec](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme)| [BASH_EXEC](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | +| | [**BASH**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash.md#readme) | [bash-exec](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme)| [BASH_EXEC](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | | | | [shellcheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme)| [BASH_SHELLCHECK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme) | | | | [shfmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme)| [BASH_SHFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme) | -| | **C** | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme)| [C_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | -| | **CLOJURE** | [clj-kondo](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme)| [CLOJURE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | -| | **COFFEE** | [coffeelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme)| [COFFEE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | -| | **C++** (CPP) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme)| [CPP_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | -| | **C#** (CSHARP) | [dotnet-format](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme)| [CSHARP](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | -| | **DART** | [dartanalyzer](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme)| [DART](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | -| | **GO** | [golangci-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme)| [GO](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | -| | **GROOVY** | [npm-groovy-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme)| [GROOVY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | -| | **JAVA** | [checkstyle](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme)| [JAVA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | -| | **JAVASCRIPT** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme)| [JAVASCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | +| | [**C**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c.md#readme) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme)| [C_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | +| | [**CLOJURE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure.md#readme) | [clj-kondo](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme)| [CLOJURE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | +| | [**COFFEE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee.md#readme) | [coffeelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme)| [COFFEE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | +| | [**C++** (CPP)](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp.md#readme) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme)| [CPP_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | +| | [**C#** (CSHARP)](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp.md#readme) | [dotnet-format](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme)| [CSHARP](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | +| | [**DART**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart.md#readme) | [dartanalyzer](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme)| [DART](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | +| | [**GO**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go.md#readme) | [golangci-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme)| [GO](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | +| | [**GROOVY**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy.md#readme) | [npm-groovy-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme)| [GROOVY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | +| | [**JAVA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java.md#readme) | [checkstyle](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme)| [JAVA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | +| | [**JAVASCRIPT**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme)| [JAVASCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | | | | [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme)| [JAVASCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme) | -| | **JSX** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme)| [JSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | -| | **KOTLIN** | [ktlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme)| [KOTLIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | -| | **LUA** | [luacheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme)| [LUA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | -| | **PERL** | [perlcritic](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme)| [PERL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | -| | **PHP** | [php](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme)| [PHP_BUILTIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | +| | [**JSX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme)| [JSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | +| | [**KOTLIN**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin.md#readme) | [ktlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme)| [KOTLIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | +| | [**LUA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua.md#readme) | [luacheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme)| [LUA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | +| | [**PERL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl.md#readme) | [perlcritic](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme)| [PERL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | +| | [**PHP**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php.md#readme) | [php](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme)| [PHP_BUILTIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | | | | [phpcs](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme)| [PHP_PHPCS](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme) | | | | [phpstan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme)| [PHP_PHPSTAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme) | | | | [psalm](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme)| [PHP_PSALM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme) | -| | **POWERSHELL** | [powershell](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme)| [POWERSHELL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | -| | **PYTHON** | [pylint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme)| [PYTHON_PYLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | +| | [**POWERSHELL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell.md#readme) | [powershell](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme)| [POWERSHELL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | +| | [**PYTHON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python.md#readme) | [pylint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme)| [PYTHON_PYLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | | | | [black](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme)| [PYTHON_BLACK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme) | | | | [flake8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme)| [PYTHON_FLAKE8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme) | -| | **R** | [lintr](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme)| [R](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | -| | **RAKU** | [raku](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme)| [RAKU](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | -| | **RUBY** | [rubocop](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme)| [RUBY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | -| | **RUST** | [clippy](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme)| [RUST](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | -| | **SCALA** | [scalafix](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme)| [SCALA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | -| | **SQL** | [sql-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme)| [SQL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | -| | **TSX** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme)| [TSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | -| | **TYPESCRIPT** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme)| [TYPESCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | +| | [**R**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r.md#readme) | [lintr](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme)| [R](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | +| | [**RAKU**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku.md#readme) | [raku](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme)| [RAKU](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | +| | [**RUBY**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby.md#readme) | [rubocop](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme)| [RUBY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | +| | [**RUST**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust.md#readme) | [clippy](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme)| [RUST](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | +| | [**SCALA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala.md#readme) | [scalafix](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme)| [SCALA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | +| | [**SQL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql.md#readme) | [sql-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme)| [SQL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | +| | [**TSX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme)| [TSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | +| | [**TYPESCRIPT**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme)| [TYPESCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | | | | [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme)| [TYPESCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme) | ### Formats | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **CSS** | [stylelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme)| [CSS_STYLELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | +| | [**CSS**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css.md#readme) | [stylelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme)| [CSS_STYLELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | | | | [scss-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme)| [CSS_SCSS_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme) | -| | **ENV** | [dotenv-linter](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme)| [ENV](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | -| | **HTML** | [htmlhint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme)| [HTML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | -| | **JSON** | [jsonlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme)| [JSON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | -| | **LATEX** | [chktex](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme)| [LATEX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | -| | **MARKDOWN** | [markdownlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme)| [MARKDOWN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | -| | **PROTOBUF** | [protolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme)| [PROTOBUF](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | -| | **XML** | [xmllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme)| [XML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | -| | **YAML** | [yamllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme)| [YAML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | +| | [**ENV**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env.md#readme) | [dotenv-linter](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme)| [ENV](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | +| | [**HTML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html.md#readme) | [htmlhint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme)| [HTML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | +| | [**JSON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json.md#readme) | [jsonlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme)| [JSON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | +| | [**LATEX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex.md#readme) | [chktex](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme)| [LATEX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | +| | [**MARKDOWN**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown.md#readme) | [markdownlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme)| [MARKDOWN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | +| | [**PROTOBUF**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf.md#readme) | [protolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme)| [PROTOBUF](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | +| | [**XML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml.md#readme) | [xmllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme)| [XML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | +| | [**YAML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml.md#readme) | [yamllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme)| [YAML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | ### Tooling formats | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **ANSIBLE** | [ansible-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme)| [ANSIBLE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | -| | **ARM** | [arm-ttk](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme)| [ARM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | -| | **CLOUDFORMATION** | [cfn-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme)| [CLOUDFORMATION](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | -| | **DOCKERFILE** | [dockerfilelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme)| [DOCKERFILE_DOCKERFILELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | +| | [**ANSIBLE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible.md#readme) | [ansible-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme)| [ANSIBLE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | +| | [**ARM**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm.md#readme) | [arm-ttk](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme)| [ARM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | +| | [**CLOUDFORMATION**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation.md#readme) | [cfn-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme)| [CLOUDFORMATION](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | +| | [**DOCKERFILE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile.md#readme) | [dockerfilelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme)| [DOCKERFILE_DOCKERFILELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | | | | [hadolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme)| [DOCKERFILE_HADOLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme) | -| | **EDITORCONFIG** | [editorconfig-checker](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme)| [EDITORCONFIG](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | -| | **KUBERNETES** | [kubeval](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme)| [KUBERNETES_KUBEVAL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | -| | **OPENAPI** | [spectral](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme)| [OPENAPI](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | -| | **PUPPET** | [puppet-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme)| [PUPPET](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | -| | **SNAKEMAKE** | [snakemake](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme)| [SNAKEMAKE_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | +| | [**EDITORCONFIG**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig.md#readme) | [editorconfig-checker](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme)| [EDITORCONFIG](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | +| | [**KUBERNETES**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes.md#readme) | [kubeval](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme)| [KUBERNETES_KUBEVAL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | +| | [**OPENAPI**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi.md#readme) | [spectral](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme)| [OPENAPI](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | +| | [**PUPPET**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet.md#readme) | [puppet-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme)| [PUPPET](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | +| | [**SNAKEMAKE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake.md#readme) | [snakemake](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme)| [SNAKEMAKE_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | | | | [snakefmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme)| [SNAKEMAKE_SNAKEFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme) | -| | **TEKTON** | [tekton-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme)| [TEKTON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | -| | **TERRAFORM** | [tflint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme)| [TERRAFORM_TFLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | +| | [**TEKTON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton.md#readme) | [tekton-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme)| [TEKTON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | +| | [**TERRAFORM**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform.md#readme) | [tflint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme)| [TERRAFORM_TFLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | | | | [terrascan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme)| [TERRAFORM_TERRASCAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme) | | | | [terragrunt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme)| [TERRAFORM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme) | @@ -214,18 +214,18 @@ jobs: You can show Mega-Linter status with a badge in your repository README -[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) Format: ```markdown -[![Mega-Linter](https://github.com///workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com///workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) ``` Example: ```markdown -[![Mega-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) ``` _Note:_ IF you did not use `Mega-Linter` as GitHub Action name, please read [GitHub Actions Badges documentation](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository) diff --git a/docs/descriptors/ansible.md b/docs/descriptors/ansible.md new file mode 100644 index 00000000000..1b7ae3830eb --- /dev/null +++ b/docs/descriptors/ansible.md @@ -0,0 +1,22 @@ + + +# ANSIBLE + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| ANSIBLE_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| ANSIBLE_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [ansible-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | [ANSIBLE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | diff --git a/docs/descriptors/arm.md b/docs/descriptors/arm.md new file mode 100644 index 00000000000..eeb91c9fed0 --- /dev/null +++ b/docs/descriptors/arm.md @@ -0,0 +1,24 @@ + + +# ARM + +## Linted files + +- File extensions: + - `.json` + +- Detected file content: + - `schema.management.azure.com` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| ARM_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| ARM_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [arm-ttk](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | [ARM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | diff --git a/docs/descriptors/bash.md b/docs/descriptors/bash.md new file mode 100644 index 00000000000..0ed62d9a2fa --- /dev/null +++ b/docs/descriptors/bash.md @@ -0,0 +1,26 @@ + + +# BASH + +## Linted files + +- File extensions: + - `.sh` + - `.bash` + - `.dash` + - `.ksh` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| BASH_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| BASH_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [bash-exec](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | [BASH_EXEC](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | +| [shellcheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme) | [BASH_SHELLCHECK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme) | +| [shfmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme) | [BASH_SHFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme) | diff --git a/docs/descriptors/c.md b/docs/descriptors/c.md new file mode 100644 index 00000000000..db1b5324f3b --- /dev/null +++ b/docs/descriptors/c.md @@ -0,0 +1,22 @@ + + +# C + +## Linted files + +- File extensions: + - `.c` + - `.h` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| C_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| C_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | [C_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | diff --git a/docs/descriptors/clojure.md b/docs/descriptors/clojure.md new file mode 100644 index 00000000000..0bbb8177a18 --- /dev/null +++ b/docs/descriptors/clojure.md @@ -0,0 +1,24 @@ + + +# CLOJURE + +## Linted files + +- File extensions: + - `.clj` + - `.cljs` + - `.cljc` + - `.edn` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| CLOJURE_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| CLOJURE_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [clj-kondo](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | [CLOJURE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | diff --git a/docs/descriptors/cloudformation.md b/docs/descriptors/cloudformation.md new file mode 100644 index 00000000000..e057ea93774 --- /dev/null +++ b/docs/descriptors/cloudformation.md @@ -0,0 +1,27 @@ + + +# CLOUDFORMATION + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + - `.json` + +- Detected file content: + - `AWSTemplateFormatVersion` + - `(AWS|Alexa|Custom)::` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| CLOUDFORMATION_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| CLOUDFORMATION_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [cfn-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | [CLOUDFORMATION](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | diff --git a/docs/descriptors/coffee.md b/docs/descriptors/coffee.md new file mode 100644 index 00000000000..3f170077e1c --- /dev/null +++ b/docs/descriptors/coffee.md @@ -0,0 +1,21 @@ + + +# COFFEE + +## Linted files + +- File extensions: + - `.coffee` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| COFFEE_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| COFFEE_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [coffeelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | [COFFEE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | diff --git a/docs/descriptors/cpp.md b/docs/descriptors/cpp.md new file mode 100644 index 00000000000..cbf072a89f1 --- /dev/null +++ b/docs/descriptors/cpp.md @@ -0,0 +1,31 @@ + + +# C++ + +## Linted files + +- File extensions: + - `.cpp` + - `.h` + - `.cc` + - `.hpp` + - `.cxx` + - `.cu` + - `.hxx` + - `.c++` + - `.hh` + - `.h++` + - `.cuh` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| CPP_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| CPP_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | [CPP_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | diff --git a/docs/descriptors/csharp.md b/docs/descriptors/csharp.md new file mode 100644 index 00000000000..87bef856a99 --- /dev/null +++ b/docs/descriptors/csharp.md @@ -0,0 +1,35 @@ + + +# C# + +## Linted files + +- File extensions: + - `.cs` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| CSHARP_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| CSHARP_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [dotnet-format](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | [CSHARP](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +RUN wget --tries=5 -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest + +ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" +``` + diff --git a/docs/descriptors/css.md b/docs/descriptors/css.md new file mode 100644 index 00000000000..9f88e89b4f6 --- /dev/null +++ b/docs/descriptors/css.md @@ -0,0 +1,24 @@ + + +# CSS + +## Linted files + +- File extensions: + - `.css` + - `.scss` + - `.saas` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| CSS_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| CSS_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [stylelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | [CSS_STYLELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | +| [scss-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme) | [CSS_SCSS_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme) | diff --git a/docs/descriptors/dart.md b/docs/descriptors/dart.md new file mode 100644 index 00000000000..4e071718193 --- /dev/null +++ b/docs/descriptors/dart.md @@ -0,0 +1,21 @@ + + +# DART + +## Linted files + +- File extensions: + - `.dart` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| DART_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| DART_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [dartanalyzer](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | [DART](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | diff --git a/docs/descriptors/dockerfile.md b/docs/descriptors/dockerfile.md new file mode 100644 index 00000000000..5e2791248d9 --- /dev/null +++ b/docs/descriptors/dockerfile.md @@ -0,0 +1,22 @@ + + +# DOCKERFILE + +## Linted files + +- File names: + - `Dockerfile` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| DOCKERFILE_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| DOCKERFILE_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [dockerfilelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | [DOCKERFILE_DOCKERFILELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | +| [hadolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme) | [DOCKERFILE_HADOLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme) | diff --git a/docs/descriptors/editorconfig.md b/docs/descriptors/editorconfig.md new file mode 100644 index 00000000000..2c46a44ace1 --- /dev/null +++ b/docs/descriptors/editorconfig.md @@ -0,0 +1,22 @@ + + +# EDITORCONFIG + +## Linted files + +- Activated only if file is found: `.editorconfig` +- File extensions: + - `*` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| EDITORCONFIG_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| EDITORCONFIG_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [editorconfig-checker](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | [EDITORCONFIG](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | diff --git a/docs/descriptors/env.md b/docs/descriptors/env.md new file mode 100644 index 00000000000..8ae7bb782bd --- /dev/null +++ b/docs/descriptors/env.md @@ -0,0 +1,21 @@ + + +# ENV + +## Linted files + +- File extensions: + - `.env` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| ENV_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| ENV_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [dotenv-linter](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | [ENV](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | diff --git a/docs/descriptors/go.md b/docs/descriptors/go.md new file mode 100644 index 00000000000..45a3bd66a68 --- /dev/null +++ b/docs/descriptors/go.md @@ -0,0 +1,37 @@ + + +# GO + +## Linted files + +- File extensions: + - `.go` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| GO_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| GO_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [golangci-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | [GO](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin +``` + +- APK packages (Linux): + - [go](https://pkgs.alpinelinux.org/packages?branch=edge&name=go) diff --git a/docs/descriptors/groovy.md b/docs/descriptors/groovy.md new file mode 100644 index 00000000000..fdfebbbab48 --- /dev/null +++ b/docs/descriptors/groovy.md @@ -0,0 +1,27 @@ + + +# GROOVY + +## Linted files + +- File extensions: + - `.groovy` + - `.gvy` + - `.gradle` + - `.nf` + +- File names: + - `Jenkinsfile` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| GROOVY_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| GROOVY_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [npm-groovy-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | [GROOVY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | diff --git a/docs/descriptors/html.md b/docs/descriptors/html.md new file mode 100644 index 00000000000..9e781f7e854 --- /dev/null +++ b/docs/descriptors/html.md @@ -0,0 +1,22 @@ + + +# HTML + +## Linted files + +- File extensions: + - `.html` + - `.htm` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| HTML_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| HTML_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [htmlhint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | [HTML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | diff --git a/docs/descriptors/java.md b/docs/descriptors/java.md new file mode 100644 index 00000000000..97258cdf4c1 --- /dev/null +++ b/docs/descriptors/java.md @@ -0,0 +1,28 @@ + + +# JAVA + +## Linted files + +- File extensions: + - `.java` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| JAVA_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| JAVA_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [checkstyle](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | [JAVA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | + +## Behind the scenes + +### Installation + +- APK packages (Linux): + - [openjdk8-jre](https://pkgs.alpinelinux.org/packages?branch=edge&name=openjdk8-jre) diff --git a/docs/descriptors/javascript.md b/docs/descriptors/javascript.md new file mode 100644 index 00000000000..0e9010e0f13 --- /dev/null +++ b/docs/descriptors/javascript.md @@ -0,0 +1,30 @@ + + +# JAVASCRIPT + +## Linted files + +- File extensions: + - `.js` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| JAVASCRIPT_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| JAVASCRIPT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | [JAVASCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | +| [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme) | [JAVASCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme) | + +## Behind the scenes + +### Installation + +- APK packages (Linux): + - [npm](https://pkgs.alpinelinux.org/packages?branch=edge&name=npm) + - [nodejs-current](https://pkgs.alpinelinux.org/packages?branch=edge&name=nodejs-current) diff --git a/docs/descriptors/json.md b/docs/descriptors/json.md new file mode 100644 index 00000000000..0953c61ff26 --- /dev/null +++ b/docs/descriptors/json.md @@ -0,0 +1,21 @@ + + +# JSON + +## Linted files + +- File extensions: + - `.json` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| JSON_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| JSON_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [jsonlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | [JSON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | diff --git a/docs/descriptors/jsx.md b/docs/descriptors/jsx.md new file mode 100644 index 00000000000..8421b41d13b --- /dev/null +++ b/docs/descriptors/jsx.md @@ -0,0 +1,21 @@ + + +# JSX + +## Linted files + +- File extensions: + - `.jsx` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| JSX_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| JSX_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | [JSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | diff --git a/docs/descriptors/kotlin.md b/docs/descriptors/kotlin.md new file mode 100644 index 00000000000..3b11d9a135b --- /dev/null +++ b/docs/descriptors/kotlin.md @@ -0,0 +1,22 @@ + + +# KOTLIN + +## Linted files + +- File extensions: + - `.kt` + - `.kts` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| KOTLIN_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| KOTLIN_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [ktlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | [KOTLIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | diff --git a/docs/descriptors/kubernetes.md b/docs/descriptors/kubernetes.md new file mode 100644 index 00000000000..86b5f2eafd8 --- /dev/null +++ b/docs/descriptors/kubernetes.md @@ -0,0 +1,28 @@ + + +# KUBERNETES + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + - `.json` + +- Detected file content: + - `apiVersion:` + - `kustomize.config.k8s.io` + - `tekton` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| KUBERNETES_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| KUBERNETES_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [kubeval](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | [KUBERNETES_KUBEVAL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | diff --git a/docs/descriptors/latex.md b/docs/descriptors/latex.md new file mode 100644 index 00000000000..7d9586f7d9a --- /dev/null +++ b/docs/descriptors/latex.md @@ -0,0 +1,21 @@ + + +# LATEX + +## Linted files + +- File extensions: + - `.tex` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| LATEX_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| LATEX_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [chktex](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | [LATEX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | diff --git a/docs/descriptors/lua.md b/docs/descriptors/lua.md new file mode 100644 index 00000000000..60495d74139 --- /dev/null +++ b/docs/descriptors/lua.md @@ -0,0 +1,21 @@ + + +# LUA + +## Linted files + +- File extensions: + - `.lua` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| LUA_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| LUA_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [luacheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | [LUA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | diff --git a/docs/descriptors/markdown.md b/docs/descriptors/markdown.md new file mode 100644 index 00000000000..5573cab54a4 --- /dev/null +++ b/docs/descriptors/markdown.md @@ -0,0 +1,21 @@ + + +# MARKDOWN + +## Linted files + +- File extensions: + - `.md` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| MARKDOWN_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| MARKDOWN_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [markdownlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | [MARKDOWN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | diff --git a/docs/descriptors/openapi.md b/docs/descriptors/openapi.md new file mode 100644 index 00000000000..57d871453e5 --- /dev/null +++ b/docs/descriptors/openapi.md @@ -0,0 +1,29 @@ + + +# OPENAPI + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + - `.json` + +- Detected file content: + - `"openapi":` + - `"swagger":` + - `openapi:` + - `swagger:` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| OPENAPI_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| OPENAPI_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [spectral](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | [OPENAPI](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | diff --git a/docs/descriptors/perl.md b/docs/descriptors/perl.md new file mode 100644 index 00000000000..14c2a95f2f5 --- /dev/null +++ b/docs/descriptors/perl.md @@ -0,0 +1,31 @@ + + +# PERL + +## Linted files + +- File extensions: + - `.pl` + - `.pm` + - `.t` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| PERL_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| PERL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [perlcritic](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | [PERL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | + +## Behind the scenes + +### Installation + +- APK packages (Linux): + - [perl](https://pkgs.alpinelinux.org/packages?branch=edge&name=perl) + - [perl-dev](https://pkgs.alpinelinux.org/packages?branch=edge&name=perl-dev) diff --git a/docs/descriptors/php.md b/docs/descriptors/php.md new file mode 100644 index 00000000000..4cdd3ac9c3d --- /dev/null +++ b/docs/descriptors/php.md @@ -0,0 +1,52 @@ + + +# PHP + +## Linted files + +- File extensions: + - `.php` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| PHP_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| PHP_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [php](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | [PHP_BUILTIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | +| [phpcs](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme) | [PHP_PHPCS](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme) | +| [phpstan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme) | [PHP_PHPSTAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme) | +| [psalm](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme) | [PHP_PSALM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +RUN wget --tries=5 -O phive.phar https://phar.io/releases/phive.phar \ + && wget --tries=5 -O phive.phar.asc https://phar.io/releases/phive.phar.asc \ + && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79 \ + && gpg --verify phive.phar.asc phive.phar \ + && chmod +x phive.phar \ + && mv phive.phar /usr/local/bin/phive \ + && rm phive.phar.asc + +``` + +- APK packages (Linux): + - [php7](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7) + - [php7-phar](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-phar) + - [php7-json](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-json) + - [php7-mbstring](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-mbstring) + - [php-xmlwriter](https://pkgs.alpinelinux.org/packages?branch=edge&name=php-xmlwriter) + - [php7-tokenizer](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-tokenizer) + - [php7-ctype](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-ctype) + - [php7-curl](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-curl) + - [php7-dom](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-dom) + - [php7-simplexml](https://pkgs.alpinelinux.org/packages?branch=edge&name=php7-simplexml) diff --git a/docs/descriptors/powershell.md b/docs/descriptors/powershell.md new file mode 100644 index 00000000000..3fe949bda6a --- /dev/null +++ b/docs/descriptors/powershell.md @@ -0,0 +1,47 @@ + + +# POWERSHELL + +## Linted files + +- File extensions: + - `.ps1` + - `.psm1` + - `.psd1` + - `.ps1xml` + - `.pssc` + - `.psrc` + - `.cdxml` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| POWERSHELL_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| POWERSHELL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [powershell](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | [POWERSHELL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +ARG PWSH_VERSION='latest' +ARG PWSH_DIRECTORY='/opt/microsoft/powershell' +RUN mkdir -p ${PWSH_DIRECTORY} \ + && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \ + | grep browser_download_url \ + | grep linux-alpine-x64 \ + | cut -d '"' -f 4 \ + | xargs -n 1 wget -O - \ + | tar -xzC ${PWSH_DIRECTORY} \ + && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh + +``` + diff --git a/docs/descriptors/protobuf.md b/docs/descriptors/protobuf.md new file mode 100644 index 00000000000..4904fcf4e57 --- /dev/null +++ b/docs/descriptors/protobuf.md @@ -0,0 +1,21 @@ + + +# PROTOBUF + +## Linted files + +- File extensions: + - `.proto` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| PROTOBUF_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| PROTOBUF_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [protolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | [PROTOBUF](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | diff --git a/docs/descriptors/puppet.md b/docs/descriptors/puppet.md new file mode 100644 index 00000000000..17a39346108 --- /dev/null +++ b/docs/descriptors/puppet.md @@ -0,0 +1,21 @@ + + +# PUPPET + +## Linted files + +- File extensions: + - `.pp` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| PUPPET_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| PUPPET_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [puppet-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | [PUPPET](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | diff --git a/docs/descriptors/python.md b/docs/descriptors/python.md new file mode 100644 index 00000000000..2a84521733c --- /dev/null +++ b/docs/descriptors/python.md @@ -0,0 +1,23 @@ + + +# PYTHON + +## Linted files + +- File extensions: + - `.py` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| PYTHON_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| PYTHON_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [pylint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | [PYTHON_PYLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | +| [black](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme) | [PYTHON_BLACK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme) | +| [flake8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme) | [PYTHON_FLAKE8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme) | diff --git a/docs/descriptors/r.md b/docs/descriptors/r.md new file mode 100644 index 00000000000..5937532cf2f --- /dev/null +++ b/docs/descriptors/r.md @@ -0,0 +1,24 @@ + + +# R + +## Linted files + +- File extensions: + - `.r` + - `.R` + - `.Rmd` + - `.RMD` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| R_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| R_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [lintr](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | [R](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | diff --git a/docs/descriptors/raku.md b/docs/descriptors/raku.md new file mode 100644 index 00000000000..3df613ec831 --- /dev/null +++ b/docs/descriptors/raku.md @@ -0,0 +1,26 @@ + + +# RAKU + +## Linted files + +- File extensions: + - `.raku` + - `.rakumod` + - `.rakutest` + - `.pm6` + - `.pl6` + - `.p6` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| RAKU_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| RAKU_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [raku](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | [RAKU](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | diff --git a/docs/descriptors/ruby.md b/docs/descriptors/ruby.md new file mode 100644 index 00000000000..6537e8eb44b --- /dev/null +++ b/docs/descriptors/ruby.md @@ -0,0 +1,31 @@ + + +# RUBY + +## Linted files + +- File extensions: + - `.rb` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| RUBY_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| RUBY_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [rubocop](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | [RUBY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | + +## Behind the scenes + +### Installation + +- APK packages (Linux): + - [ruby](https://pkgs.alpinelinux.org/packages?branch=edge&name=ruby) + - [ruby-dev](https://pkgs.alpinelinux.org/packages?branch=edge&name=ruby-dev) + - [ruby-bundler](https://pkgs.alpinelinux.org/packages?branch=edge&name=ruby-bundler) + - [ruby-rdoc](https://pkgs.alpinelinux.org/packages?branch=edge&name=ruby-rdoc) diff --git a/docs/descriptors/rust.md b/docs/descriptors/rust.md new file mode 100644 index 00000000000..805ba17108f --- /dev/null +++ b/docs/descriptors/rust.md @@ -0,0 +1,32 @@ + + +# RUST + +## Linted files + +- File extensions: + - `.rs` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| RUST_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| RUST_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [clippy](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | [RUST](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" +``` + diff --git a/docs/descriptors/scala.md b/docs/descriptors/scala.md new file mode 100644 index 00000000000..9988087def3 --- /dev/null +++ b/docs/descriptors/scala.md @@ -0,0 +1,33 @@ + + +# SCALA + +## Linted files + +- File extensions: + - `.scala` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| SCALA_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| SCALA_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [scalafix](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | [SCALA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | + +## Behind the scenes + +### Installation + +- Dockerfile commands : +```dockerfile +RUN curl -fLo coursier https://git.io/coursier-cli && \ + chmod +x coursier + +``` + diff --git a/docs/descriptors/snakemake.md b/docs/descriptors/snakemake.md new file mode 100644 index 00000000000..95c102def6d --- /dev/null +++ b/docs/descriptors/snakemake.md @@ -0,0 +1,25 @@ + + +# SNAKEMAKE + +## Linted files + +- File extensions: + - `.smk` + +- File names: + - `Snakefile` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| SNAKEMAKE_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| SNAKEMAKE_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [snakemake](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | [SNAKEMAKE_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | +| [snakefmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme) | [SNAKEMAKE_SNAKEFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme) | diff --git a/docs/descriptors/sql.md b/docs/descriptors/sql.md new file mode 100644 index 00000000000..592c9ed3a24 --- /dev/null +++ b/docs/descriptors/sql.md @@ -0,0 +1,21 @@ + + +# SQL + +## Linted files + +- File extensions: + - `.sql` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| SQL_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| SQL_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [sql-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | [SQL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | diff --git a/docs/descriptors/tekton.md b/docs/descriptors/tekton.md new file mode 100644 index 00000000000..fd52472c616 --- /dev/null +++ b/docs/descriptors/tekton.md @@ -0,0 +1,25 @@ + + +# TEKTON + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + +- Detected file content: + - `apiVersion: tekton` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| TEKTON_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| TEKTON_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [tekton-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | [TEKTON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | diff --git a/docs/descriptors/terraform.md b/docs/descriptors/terraform.md new file mode 100644 index 00000000000..a14605e9461 --- /dev/null +++ b/docs/descriptors/terraform.md @@ -0,0 +1,23 @@ + + +# TERRAFORM + +## Linted files + +- File extensions: + - `.tf` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| TERRAFORM_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| TERRAFORM_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [tflint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | [TERRAFORM_TFLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | +| [terrascan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme) | [TERRAFORM_TERRASCAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme) | +| [terragrunt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme) | [TERRAFORM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme) | diff --git a/docs/descriptors/tsx.md b/docs/descriptors/tsx.md new file mode 100644 index 00000000000..5e91743f0f2 --- /dev/null +++ b/docs/descriptors/tsx.md @@ -0,0 +1,21 @@ + + +# TSX + +## Linted files + +- File extensions: + - `.tsx` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| TSX_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| TSX_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | [TSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | diff --git a/docs/descriptors/typescript.md b/docs/descriptors/typescript.md new file mode 100644 index 00000000000..fb5336c3e93 --- /dev/null +++ b/docs/descriptors/typescript.md @@ -0,0 +1,29 @@ + + +# TYPESCRIPT + +## Linted files + +- File extensions: + - `.ts` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| TYPESCRIPT_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| TYPESCRIPT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | [TYPESCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | +| [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme) | [TYPESCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme) | + +## Behind the scenes + +### Installation + +- NPM packages (node.js): + - [typescript](https://www.npmjs.com/package/typescript) diff --git a/docs/descriptors/xml.md b/docs/descriptors/xml.md new file mode 100644 index 00000000000..8eac461ad1e --- /dev/null +++ b/docs/descriptors/xml.md @@ -0,0 +1,21 @@ + + +# XML + +## Linted files + +- File extensions: + - `.xml` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| XML_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| XML_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [xmllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | [XML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | diff --git a/docs/descriptors/yaml.md b/docs/descriptors/yaml.md new file mode 100644 index 00000000000..e7054c875cd --- /dev/null +++ b/docs/descriptors/yaml.md @@ -0,0 +1,22 @@ + + +# YAML + +## Linted files + +- File extensions: + - `.yml` + - `.yaml` + +## Mega-linter configuration + +| Variable | Description | Default value | +| ----------------- | -------------- | -------------- | +| YAML_FILTER_REGEX_INCLUDE | Custom regex including filter | | +| YAML_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | + +## Linters + +| Linter | Configuration key | +| ------ | ----------------- | +| [yamllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | [YAML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | diff --git a/docs/index.md b/docs/index.md index e8e9ba45ca6..d4337f46344 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ ![GitHub release](https://img.shields.io/github/v/release/nvuillam/mega-linter?sort=semver) [![Docker Pulls](https://img.shields.io/docker/pulls/nvuillam/mega-linter)](https://hub.docker.com/r/nvuillam/mega-linter) -[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) [![codecov](https://codecov.io/gh/nvuillam/mega-linter/branch/master/graph/badge.svg)](https://codecov.io/gh/nvuillam/mega-linter) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) @@ -65,74 +65,74 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **BASH** | [bash-exec](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme)| [BASH_EXEC](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | +| | [**BASH**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash.md#readme) | [bash-exec](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme)| [BASH_EXEC](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_bash_exec.md#readme) | | | | [shellcheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme)| [BASH_SHELLCHECK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shellcheck.md#readme) | | | | [shfmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme)| [BASH_SHFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/bash_shfmt.md#readme) | -| | **C** | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme)| [C_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | -| | **CLOJURE** | [clj-kondo](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme)| [CLOJURE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | -| | **COFFEE** | [coffeelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme)| [COFFEE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | -| | **C++** (CPP) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme)| [CPP_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | -| | **C#** (CSHARP) | [dotnet-format](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme)| [CSHARP](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | -| | **DART** | [dartanalyzer](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme)| [DART](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | -| | **GO** | [golangci-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme)| [GO](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | -| | **GROOVY** | [npm-groovy-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme)| [GROOVY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | -| | **JAVA** | [checkstyle](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme)| [JAVA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | -| | **JAVASCRIPT** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme)| [JAVASCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | +| | [**C**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c.md#readme) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme)| [C_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/c_cpplint.md#readme) | +| | [**CLOJURE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure.md#readme) | [clj-kondo](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme)| [CLOJURE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/clojure_clj_kondo.md#readme) | +| | [**COFFEE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee.md#readme) | [coffeelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme)| [COFFEE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/coffee_coffeelint.md#readme) | +| | [**C++** (CPP)](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp.md#readme) | [cpplint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme)| [CPP_CPPLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cpp_cpplint.md#readme) | +| | [**C#** (CSHARP)](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp.md#readme) | [dotnet-format](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme)| [CSHARP](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/csharp_dotnet_format.md#readme) | +| | [**DART**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart.md#readme) | [dartanalyzer](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme)| [DART](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dart_dartanalyzer.md#readme) | +| | [**GO**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go.md#readme) | [golangci-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme)| [GO](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/go_golangci_lint.md#readme) | +| | [**GROOVY**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy.md#readme) | [npm-groovy-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme)| [GROOVY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/groovy_npm_groovy_lint.md#readme) | +| | [**JAVA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java.md#readme) | [checkstyle](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme)| [JAVA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/java_checkstyle.md#readme) | +| | [**JAVASCRIPT**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme)| [JAVASCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_eslint.md#readme) | | | | [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme)| [JAVASCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/javascript_standard.md#readme) | -| | **JSX** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme)| [JSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | -| | **KOTLIN** | [ktlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme)| [KOTLIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | -| | **LUA** | [luacheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme)| [LUA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | -| | **PERL** | [perlcritic](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme)| [PERL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | -| | **PHP** | [php](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme)| [PHP_BUILTIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | +| | [**JSX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme)| [JSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/jsx_eslint.md#readme) | +| | [**KOTLIN**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin.md#readme) | [ktlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme)| [KOTLIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kotlin_ktlint.md#readme) | +| | [**LUA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua.md#readme) | [luacheck](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme)| [LUA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/lua_luacheck.md#readme) | +| | [**PERL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl.md#readme) | [perlcritic](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme)| [PERL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/perl_perlcritic.md#readme) | +| | [**PHP**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php.md#readme) | [php](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme)| [PHP_BUILTIN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_php.md#readme) | | | | [phpcs](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme)| [PHP_PHPCS](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpcs.md#readme) | | | | [phpstan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme)| [PHP_PHPSTAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_phpstan.md#readme) | | | | [psalm](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme)| [PHP_PSALM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/php_psalm.md#readme) | -| | **POWERSHELL** | [powershell](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme)| [POWERSHELL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | -| | **PYTHON** | [pylint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme)| [PYTHON_PYLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | +| | [**POWERSHELL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell.md#readme) | [powershell](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme)| [POWERSHELL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/powershell_powershell.md#readme) | +| | [**PYTHON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python.md#readme) | [pylint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme)| [PYTHON_PYLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_pylint.md#readme) | | | | [black](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme)| [PYTHON_BLACK](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_black.md#readme) | | | | [flake8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme)| [PYTHON_FLAKE8](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/python_flake8.md#readme) | -| | **R** | [lintr](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme)| [R](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | -| | **RAKU** | [raku](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme)| [RAKU](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | -| | **RUBY** | [rubocop](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme)| [RUBY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | -| | **RUST** | [clippy](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme)| [RUST](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | -| | **SCALA** | [scalafix](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme)| [SCALA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | -| | **SQL** | [sql-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme)| [SQL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | -| | **TSX** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme)| [TSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | -| | **TYPESCRIPT** | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme)| [TYPESCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | +| | [**R**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r.md#readme) | [lintr](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme)| [R](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/r_lintr.md#readme) | +| | [**RAKU**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku.md#readme) | [raku](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme)| [RAKU](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/raku_raku.md#readme) | +| | [**RUBY**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby.md#readme) | [rubocop](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme)| [RUBY](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ruby_rubocop.md#readme) | +| | [**RUST**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust.md#readme) | [clippy](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme)| [RUST](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/rust_clippy.md#readme) | +| | [**SCALA**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala.md#readme) | [scalafix](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme)| [SCALA](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/scala_scalafix.md#readme) | +| | [**SQL**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql.md#readme) | [sql-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme)| [SQL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/sql_sql_lint.md#readme) | +| | [**TSX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme)| [TSX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tsx_eslint.md#readme) | +| | [**TYPESCRIPT**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript.md#readme) | [eslint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme)| [TYPESCRIPT_ES](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_eslint.md#readme) | | | | [standard](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme)| [TYPESCRIPT_STANDARD](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/typescript_standard.md#readme) | ### Formats | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **CSS** | [stylelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme)| [CSS_STYLELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | +| | [**CSS**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css.md#readme) | [stylelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme)| [CSS_STYLELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_stylelint.md#readme) | | | | [scss-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme)| [CSS_SCSS_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/css_scss_lint.md#readme) | -| | **ENV** | [dotenv-linter](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme)| [ENV](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | -| | **HTML** | [htmlhint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme)| [HTML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | -| | **JSON** | [jsonlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme)| [JSON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | -| | **LATEX** | [chktex](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme)| [LATEX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | -| | **MARKDOWN** | [markdownlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme)| [MARKDOWN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | -| | **PROTOBUF** | [protolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme)| [PROTOBUF](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | -| | **XML** | [xmllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme)| [XML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | -| | **YAML** | [yamllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme)| [YAML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | +| | [**ENV**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env.md#readme) | [dotenv-linter](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme)| [ENV](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/env_dotenv_linter.md#readme) | +| | [**HTML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html.md#readme) | [htmlhint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme)| [HTML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/html_htmlhint.md#readme) | +| | [**JSON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json.md#readme) | [jsonlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme)| [JSON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/json_jsonlint.md#readme) | +| | [**LATEX**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex.md#readme) | [chktex](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme)| [LATEX](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/latex_chktex.md#readme) | +| | [**MARKDOWN**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown.md#readme) | [markdownlint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme)| [MARKDOWN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/markdown_markdownlint.md#readme) | +| | [**PROTOBUF**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf.md#readme) | [protolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme)| [PROTOBUF](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/protobuf_protolint.md#readme) | +| | [**XML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml.md#readme) | [xmllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme)| [XML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/xml_xmllint.md#readme) | +| | [**YAML**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml.md#readme) | [yamllint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme)| [YAML](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/yaml_yamllint.md#readme) | ### Tooling formats | | Language / Format | Linter | Configuration key | | --- | ----------------- | -------------- | ------------ | -| | **ANSIBLE** | [ansible-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme)| [ANSIBLE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | -| | **ARM** | [arm-ttk](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme)| [ARM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | -| | **CLOUDFORMATION** | [cfn-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme)| [CLOUDFORMATION](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | -| | **DOCKERFILE** | [dockerfilelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme)| [DOCKERFILE_DOCKERFILELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | +| | [**ANSIBLE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible.md#readme) | [ansible-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme)| [ANSIBLE](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/ansible_ansible_lint.md#readme) | +| | [**ARM**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm.md#readme) | [arm-ttk](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme)| [ARM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/arm_arm_ttk.md#readme) | +| | [**CLOUDFORMATION**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation.md#readme) | [cfn-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme)| [CLOUDFORMATION](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/cloudformation_cfn_lint.md#readme) | +| | [**DOCKERFILE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile.md#readme) | [dockerfilelint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme)| [DOCKERFILE_DOCKERFILELINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_dockerfilelint.md#readme) | | | | [hadolint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme)| [DOCKERFILE_HADOLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/dockerfile_hadolint.md#readme) | -| | **EDITORCONFIG** | [editorconfig-checker](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme)| [EDITORCONFIG](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | -| | **KUBERNETES** | [kubeval](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme)| [KUBERNETES_KUBEVAL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | -| | **OPENAPI** | [spectral](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme)| [OPENAPI](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | -| | **PUPPET** | [puppet-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme)| [PUPPET](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | -| | **SNAKEMAKE** | [snakemake](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme)| [SNAKEMAKE_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | +| | [**EDITORCONFIG**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig.md#readme) | [editorconfig-checker](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme)| [EDITORCONFIG](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/editorconfig_editorconfig_checker.md#readme) | +| | [**KUBERNETES**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes.md#readme) | [kubeval](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme)| [KUBERNETES_KUBEVAL](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/kubernetes_kubeval.md#readme) | +| | [**OPENAPI**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi.md#readme) | [spectral](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme)| [OPENAPI](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/openapi_spectral.md#readme) | +| | [**PUPPET**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet.md#readme) | [puppet-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme)| [PUPPET](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/puppet_puppet_lint.md#readme) | +| | [**SNAKEMAKE**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake.md#readme) | [snakemake](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme)| [SNAKEMAKE_LINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakemake.md#readme) | | | | [snakefmt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme)| [SNAKEMAKE_SNAKEFMT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/snakemake_snakefmt.md#readme) | -| | **TEKTON** | [tekton-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme)| [TEKTON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | -| | **TERRAFORM** | [tflint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme)| [TERRAFORM_TFLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | +| | [**TEKTON**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton.md#readme) | [tekton-lint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme)| [TEKTON](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/tekton_tekton_lint.md#readme) | +| | [**TERRAFORM**](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform.md#readme) | [tflint](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme)| [TERRAFORM_TFLINT](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_tflint.md#readme) | | | | [terrascan](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme)| [TERRAFORM_TERRASCAN](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terrascan.md#readme) | | | | [terragrunt](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme)| [TERRAFORM](https://github.com/nvuillam/mega-linter/tree/master/docs/descriptors/terraform_terragrunt.md#readme) | @@ -214,18 +214,18 @@ jobs: You can show Mega-Linter status with a badge in your repository README -[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/mega-linter/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) Format: ```markdown -[![Mega-Linter](https://github.com///workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com///workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) ``` Example: ```markdown -[![Mega-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/marketplace/actions/mega-linter) +[![Mega-Linter](https://github.com/nvuillam/npm-groovy-lint/workflows/Mega-Linter/badge.svg?branch=master)](https://github.com/nvuillam/mega-linter#readme) ``` _Note:_ IF you did not use `Mega-Linter` as GitHub Action name, please read [GitHub Actions Badges documentation](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository) diff --git a/megalinter/reporters/GithubCommentReporter.py b/megalinter/reporters/GithubCommentReporter.py index e78719a2986..ca16757fa69 100644 --- a/megalinter/reporters/GithubCommentReporter.py +++ b/megalinter/reporters/GithubCommentReporter.py @@ -11,38 +11,47 @@ from megalinter import Reporter +BRANCH = 'master' +URL_ROOT = "https://github.com/nvuillam/mega-linter/tree/" + BRANCH +DOCS_URL_ROOT = URL_ROOT + "/docs" +DOCS_URL_DESCRIPTORS_ROOT = DOCS_URL_ROOT + "/descriptors" + class GithubCommentReporter(Reporter): name = 'GITHUB_COMMENT' scope = 'mega-linter' github_api_url = 'https://api.github.com' - gh_url = 'https://github.com/marketplace/actions/mega-linter' + gh_url = 'https://github.com/nvuillam/mega-linter#readme' def manage_activation(self): if os.environ.get('POST_GITHUB_COMMENT', 'true') == 'true': self.is_active = True def produce_report(self): - table_header = ["Descriptor", "Linter", - "Files with error(s)", "Total files"] - table_data_raw = [table_header] - for linter in self.master.linters: - if linter.is_active is True: - emoji = ':green_circle:' if linter.status == 'success' and linter.return_code == 0 \ - else 'orange_circle' if linter.status != 'success' and linter.return_code == 0 \ - else ':red_circle:' - first_col = f"{emoji} {linter.descriptor_id}" - table_data_raw += [ - [first_col, linter.linter_name, linter.number_errors, len(linter.files)]] - # Post comment on GitHub pull request if os.environ.get('GITHUB_TOKEN', '') != '': - # Build message github_repo = os.environ['GITHUB_REPOSITORY'] run_id = os.environ['GITHUB_RUN_ID'] sha = os.environ.get('GITHUB_SHA') action_run_url = f"https://github.com/{github_repo}/actions/runs/{run_id}" + table_header = ["Descriptor", "Linter", + "Files with error(s)", "Total files"] + table_data_raw = [table_header] + for linter in self.master.linters: + if linter.is_active is True: + emoji = ':green_circle:' if linter.status == 'success' and linter.return_code == 0 \ + else 'orange_circle' if linter.status != 'success' and linter.return_code == 0 \ + else ':red_circle:' + first_col = f"{emoji} {linter.descriptor_id}" + lang_lower = linter.descriptor_id.lower() + linter_name_lower = linter.linter_name.lower().replace('-', '_') + linter_doc_url = f"{DOCS_URL_DESCRIPTORS_ROOT}/{lang_lower}_{linter_name_lower}.md" + linter_link = f"[{linter.linter_name}]({linter_doc_url})" + errors_cell = f"[{linter.number_errors}]({action_run_url})" if linter.number_errors > 0 \ + else linter.number_errors + table_data_raw += [ + [first_col, linter_link, errors_cell, len(linter.files)]] # Build markdown table table_data_raw.pop(0) writer = MarkdownTableWriter( diff --git a/megalinter/utils.py b/megalinter/utils.py index d783e804e21..a171fcac1ac 100644 --- a/megalinter/utils.py +++ b/megalinter/utils.py @@ -45,6 +45,13 @@ def list_descriptor_files(): return descriptor_files +# Extract descriptor info from descriptor file +def build_descriptor_info(file): + with open(file) as f: + language_descriptor = yaml.load(f, Loader=yaml.FullLoader) + return language_descriptor + + # Build linter instances from a descriptor file name, and initialize them def build_descriptor_linters(file, linter_init_params=None, linter_names=None): if linter_names is None: