From 401a9f8fbf4fc1994da3ea5da1033d9d9865e7a9 Mon Sep 17 00:00:00 2001 From: Philip Mallegol-Hansen Date: Fri, 12 Jun 2020 15:10:18 -0700 Subject: [PATCH] Clean up documentation We add documentation on how the variables now work, and remove duplication in run-linter-locally.md --- README.md | 11 +++++++++-- docs/run-linter-locally.md | 24 +----------------------- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 7dc3d3b8..a4775109 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,14 @@ jobs: ``` ## Environment variables -The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality: +The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality. + +*Note:* All the `VALIDATE_[LANGAUGE]` variables behave in a specific way. +If none of them are passed, then they all default to true. +However if any one of the variables are set, we default to leaving any unset variable to false. +This means that if you run the linter "out of the box", all langauges will be checked. +But if you wish to select specific linters, we give you full control to choose which linters are run, +and won't run anything unexpected. | **ENV VAR** | **Default Value** | **Notes** | | --- | --- | --- | @@ -120,10 +127,10 @@ The super-linter allows you to pass the following `ENV` variables to be able to | **VALIDATE_JAVASCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: standard) | | **VALIDATE_TYPESCRIPT_ES** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: eslint) | | **VALIDATE_TYPESCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: standard) | -| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s). | | **VALIDATE_DOCKER** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_GO** | `true` | Flag to enable or disable the linting process of the language. | | **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the language. | +| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s). | | **ACTIONS_RUNNER_DEBUG** | `false` | Flag to enable additional information about the linter, versions, and additional output. | ### Template rules files diff --git a/docs/run-linter-locally.md b/docs/run-linter-locally.md index a1803746..06117349 100644 --- a/docs/run-linter-locally.md +++ b/docs/run-linter-locally.md @@ -23,29 +23,7 @@ Once the container has been downloaded to your local environment, you can then b - **NOTE:** The flag:`RUN_LOCAL` will set: `VALIDATE_ALL_CODEBASE` to true. This means it will scan **all** the files in the directory you have mapped. If you want to only validate a subset of your codebase, map a folder with only the files you wish to have linted ### Flags for running Locally -You can add as many **Additional** flags as needed: - -| **ENV VAR** | **Command** | **Default Value** | **Notes** | -| --- | --- | --- | --- | -| **VALIDATE_YAML** | `-e VALIDATE_YAML=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_JSON** | `-e VALIDATE_JSON=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_XML** | `-e VALIDATE_XML=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_MD** | `-e VALIDATE_MD=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_BASH** | `-e VALIDATE_BASH=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_PERL** | `-e VALIDATE_PERL=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_PYTHON** | `-e VALIDATE_PYTHON=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_RUBY** | `-e VALIDATE_RUBY=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_COFFEE** | `-e VALIDATE_COFFEE=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_ANSIBLE** | `-e VALIDATE_ANSIBLE=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_JAVASCRIPT_ES** | `-e VALIDATE_JAVASCRIPT_ES=` | `true` | Flag to enable or disable the linting process of the language (Utilizing: eslint) | -| **VALIDATE_JAVASCRIPT_STANDARD** | `-e VALIDATE_JAVASCRIPT_STANDARD=` | `true` | Flag to enable or disable the linting process of the language (Utilizing: standard) | -| **VALIDATE_TYPESCRIPT_ES** | `-e VALIDATE_TYPESCRIPT_ES=` | `true` | Flag to enable or disable the linting process of the language (Utilizing: eslint) | -| **VALIDATE_TYPESCRIPT_STANDARD** | `-e VALIDATE_TYPESCRIPT_STANDARD=` | `true` | Flag to enable or disable the linting process of the language (Utilizing: standard) | -| **VALIDATE_DOCKER** | `-e VALIDATE_DOCKER=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_GO** | `-e VALIDATE_GO=` | `true` | Flag to enable or disable the linting process of the language | -| **VALIDATE_TERRAFORM** | `-e VALIDATE_TERRAFORM=` | `true` | Flag to enable or disable the linting process of the language | -| **ANSIBLE_DIRECTORY** | `-e ANSIBLE_DIRECTORY=` | `/ansible` | Flag to set the root directory for Ansible file location(s) | -| **ACTIONS_RUNNER_DEBUG** | `-e ACTIONS_RUNNER_DEBUG=` | `false` | Flag to enable or disable additional debug info | +You can add as many **Additional** flags as needed, documented in [README.md](../README.md#Environment-variables) ## Troubleshooting