From aacb0daac5461d73eec66a7c87b30116a613419c Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 5 Feb 2020 09:23:47 -0600 Subject: [PATCH] adding them docs --- .automation/README.md | 3 +++ .automation/test/README.md | 9 ++++++++- .automation/test/ansible/README.md | 13 +++++++++++++ .automation/test/coffeescript/README.md | 13 +++++++++++++ .automation/test/docker/README.md | 13 +++++++++++++ .automation/test/javascript/README.md | 13 +++++++++++++ .automation/test/json/README.md | 13 +++++++++++++ .automation/test/markdown/README.md | 13 +++++++++++++ .automation/test/perl/README.md | 13 +++++++++++++ .automation/test/python/README.md | 13 +++++++++++++ .automation/test/ruby/README.md | 13 +++++++++++++ .automation/test/shell/README.md | 13 +++++++++++++ .automation/test/xml/README.md | 13 +++++++++++++ .automation/test/yml/README.md | 13 +++++++++++++ README.md | 21 ++++++++++++++++++--- 15 files changed, 185 insertions(+), 4 deletions(-) create mode 100644 .automation/test/ansible/README.md create mode 100644 .automation/test/coffeescript/README.md create mode 100644 .automation/test/docker/README.md create mode 100644 .automation/test/javascript/README.md create mode 100644 .automation/test/json/README.md create mode 100644 .automation/test/markdown/README.md create mode 100644 .automation/test/perl/README.md create mode 100644 .automation/test/python/README.md create mode 100644 .automation/test/ruby/README.md create mode 100644 .automation/test/shell/README.md create mode 100644 .automation/test/xml/README.md create mode 100644 .automation/test/yml/README.md diff --git a/.automation/README.md b/.automation/README.md index 6c6331d8..55c2c464 100644 --- a/.automation/README.md +++ b/.automation/README.md @@ -17,3 +17,6 @@ When the script is triggered in a branch, it will push with the tag:**NameOfBran - *troubleshooting* - *debugging* - **Note:** The branch name will be reduced to AlpaNumeric for consistancy and uploading + +# test +This folder holds all **Test Cases** to help run the *CI/CT/CD* process for the **Super-Linter**. diff --git a/.automation/test/README.md b/.automation/test/README.md index 53bccba2..9fd57345 100644 --- a/.automation/test/README.md +++ b/.automation/test/README.md @@ -1,8 +1,15 @@ # Test Cases -This folder holds `template test cases` that are used to validate the sanity of the **Super-Linter**. +This folder holds `test cases` that are used to validate the sanity of the **Super-Linter**. The format: - Each **Super-Linter** language should have its own folder - Folder(s) containing test cases for each language supported - Passing test case(s) per language denoted in naming scheme + - **FORMAT:** `LANGUAGE_(TYPE)_FILE.EXTENSION` + - **Example:** `markdown_good_5.md` + - **Note:** This allows the process to understand if linting of the file should pass or fail\ + - **Note:** (good=Standard linting should be successful bad=standard linting should fail ) - Failing test case(s) per language denoted in naming scheme + - **FORMAT:** `LANGUAGE_(TYPE)_FILE.EXTENSION` + - **Example:** `markdown_bad_5.md` + - **Note:** (good=Standard linting should be successful bad=standard linting should fail ) - Script to run test cases and validate the sanity of **Super-Linter** diff --git a/.automation/test/ansible/README.md b/.automation/test/ansible/README.md new file mode 100644 index 00000000..b156a407 --- /dev/null +++ b/.automation/test/ansible/README.md @@ -0,0 +1,13 @@ +# Ansible Test Cases +This folder holds the test cases for **Ansible**. + +## Additional Docs +The folder **ghe-initialize** is pulled from the **GitHub-Demo-Stack** and is a valid **Ansible** role. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/coffeescript/README.md b/.automation/test/coffeescript/README.md new file mode 100644 index 00000000..42a56d5a --- /dev/null +++ b/.automation/test/coffeescript/README.md @@ -0,0 +1,13 @@ +# Coffeescript Test Cases +This folder holds the test cases for **Coffeescript**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/docker/README.md b/.automation/test/docker/README.md new file mode 100644 index 00000000..10a18447 --- /dev/null +++ b/.automation/test/docker/README.md @@ -0,0 +1,13 @@ +# Docker Test Cases +This folder holds the test cases for **Docker**. + +## Additional Docs +Due to the nature of the naming of files, we have `2` subfolders in this directory. +- `good` is for working, and correct **Dockerfile**(s) +- `bad` is for invalid, and incorrect **Dockerfile**(s) + +## Good Test Cases +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/javascript/README.md b/.automation/test/javascript/README.md new file mode 100644 index 00000000..262bf6e6 --- /dev/null +++ b/.automation/test/javascript/README.md @@ -0,0 +1,13 @@ +# Javascript Test Cases +This folder holds the test cases for **Javascript**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/json/README.md b/.automation/test/json/README.md new file mode 100644 index 00000000..8c2acadd --- /dev/null +++ b/.automation/test/json/README.md @@ -0,0 +1,13 @@ +# Json Test Cases +This folder holds the test cases for **Json**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/markdown/README.md b/.automation/test/markdown/README.md new file mode 100644 index 00000000..bdb2577a --- /dev/null +++ b/.automation/test/markdown/README.md @@ -0,0 +1,13 @@ +# Markdown Test Cases +This folder holds the test cases for **Markdown**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/perl/README.md b/.automation/test/perl/README.md new file mode 100644 index 00000000..8122ba0b --- /dev/null +++ b/.automation/test/perl/README.md @@ -0,0 +1,13 @@ +# Perl Test Cases +This folder holds the test cases for **Perl**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/python/README.md b/.automation/test/python/README.md new file mode 100644 index 00000000..13fbb6fa --- /dev/null +++ b/.automation/test/python/README.md @@ -0,0 +1,13 @@ +# Python Test Cases +This folder holds the test cases for **Python**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/ruby/README.md b/.automation/test/ruby/README.md new file mode 100644 index 00000000..9d921c9a --- /dev/null +++ b/.automation/test/ruby/README.md @@ -0,0 +1,13 @@ +# Ruby Test Cases +This folder holds the test cases for **Ruby**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/shell/README.md b/.automation/test/shell/README.md new file mode 100644 index 00000000..1ca64290 --- /dev/null +++ b/.automation/test/shell/README.md @@ -0,0 +1,13 @@ +# Bash Test Cases +This folder holds the test cases for **Bash**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/xml/README.md b/.automation/test/xml/README.md new file mode 100644 index 00000000..a40d0728 --- /dev/null +++ b/.automation/test/xml/README.md @@ -0,0 +1,13 @@ +# XML Test Cases +This folder holds the test cases for **XML**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/yml/README.md b/.automation/test/yml/README.md new file mode 100644 index 00000000..59c9ccd1 --- /dev/null +++ b/.automation/test/yml/README.md @@ -0,0 +1,13 @@ +# Yml Test Cases +This folder holds the test cases for **Yml**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/README.md b/README.md index 122ff5a6..a545fc87 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,11 @@ Developers on **GitHub** can call this Action to lint their code base with the f ## How to use To use this **GitHub** Action you will need to complete the following: -- Copy **any** or **all** template rules files from `TEMPLATES/` into your repository in the location: `.github/linters/` - - If your repository does not have rules files, they will fall back to defaults in this repositories `TEMPLATE` folder - Add the **GitHub** Action: **Super-Linter** to your current **GitHub** Actions workflow - Enjoy your more *stable*, and *cleaner* code base ### Example connecting GitHub Action Workflow -In your repository you should have a `workflows` folder with **GitHub** Action similar to below: +In your repository you should have a `.github/workflows` folder with **GitHub** Action similar to below: - `.github/workflows/linter.yml` @@ -124,6 +122,14 @@ The super-linter allows you to pass the following `ENV` variables to be able to - **VALIDATE_DOCKER** - Default: `true` - Flag to enable or disable the linting process of the language +- **VERBOSE_OUTPUT** + - Default: `false` + - Flag to enable additional information about the linter, versions, and additional output + +### Template rules files +You can use the **GitHub** **Super-Linter** *with* or *without* your own personal rules sets. This allows for greater flexibility for each individual code base. The Template rules all try to follow the standards we believe should be enabled at the basic level. +- Copy **any** or **all** template rules files from `TEMPLATES/` into your repository in the location: `.github/linters/` of your repository + - If your repository does not have rules files, they will fall back to defaults in this repositories `TEMPLATE` folder ## Docker Hub The **Docker** container that is built from this repository is located at `https://cloud.docker.com/u/admiralawkbar/repository/docker/admiralawkbar/super-linter` @@ -131,6 +137,15 @@ The **Docker** container that is built from this repository is located at `https ## Running Super-Linter locally (troubleshooting/debugging/enhancements) If you find that you need to run super-linter locally, you can follow the documentation at [Running super-linter locally](https://github.com/github/super-linter/blob/master/.github/run-linter-locally.md) +### CI/CT/CD +The **Super-Linter** has *CI/CT/CD* configured utilizing **GitHub** Actions. +- When a branch is created and code is pushed, a **GitHub** Action is triggered for building the new **Docker** container with the new codebase +- The **Docker** container is then ran against the *test cases* to validate all code sanity + - `.automation/test` contains all test cases for each language that should be validated +- These **GitHub** Actions utilize the Checks API and Protected Branches to help follow the SDLC +- When the Pull Request is merged to master, the **Super-Linter** **Docker** container is then updated and deployed with the new codebase + - **Note:** The branches **Docker** container is also removed from **DockerHub** to cleanup after itself + ## How to contribute If you would like to help contribute to this **GitHub** Action, please see [CONTRIBUTING](https://github.com/github/super-linter/blob/master/.github/CONTRIBUTING.md)