From c4249ee93aecb3eeed99970c0f615ef751fee3a7 Mon Sep 17 00:00:00 2001 From: Nick Van Wiggeren Date: Thu, 18 Jun 2020 15:27:50 -0700 Subject: [PATCH 1/5] update docs to point to github docker image --- README.md | 2 +- docs/run-linter-locally.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f60cdaad..ef3de4fe 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ You can use the **GitHub** **Super-Linter** *with* or *without* your own persona If you need to disable certain *rules* and *functionality*, you can view [Disable Rules](https://github.com/github/super-linter/blob/master/docs/disabling-linters.md) ## Docker Hub -The **Docker** container that is built from this repository is located at `https://hub.docker.com/r/admiralawkbar/super-linter` +The **Docker** container that is built from this repository is located at `https://hub.docker.com/r/github/super-linter` ## 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/docs/run-linter-locally.md) diff --git a/docs/run-linter-locally.md b/docs/run-linter-locally.md index 06117349..d552f3f1 100644 --- a/docs/run-linter-locally.md +++ b/docs/run-linter-locally.md @@ -12,13 +12,13 @@ You can follow the link below on how to install and configure **Docker** on your ## Download the latest Super-Linter Docker container - Pull the latest **Docker** container down from **DockerHub** - - `docker pull admiralawkbar/super-linter:latest` + - `docker pull github/super-linter:latest` Once the container has been downloaded to your local environment, you can then begin the process, or running the container against your codebase. ## Run the container Locally - You can run the container locally with the following **Base** flags to run your code: - - `docker run -e RUN_LOCAL=true -v /path/to/local/codebase:/tmp/lint admiralawkbar/super-linter` - - To run against a single file you can use: `docker run -e RUN_LOCAL=true -v /path/to/local/codebase/file:/tmp/lint/file admiralawkbar/super-linter` + - `docker run -e RUN_LOCAL=true -v /path/to/local/codebase:/tmp/lint github/super-linter` + - To run against a single file you can use: `docker run -e RUN_LOCAL=true -v /path/to/local/codebase/file:/tmp/lint/file github/super-linter` - **NOTE:** You need to pass the `RUN_LOCAL` flag to bypass some of the GitHub Actions checks, as well as the mapping of your local codebase to `/tmp/lint` so that the linter can pick up the code - **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 @@ -29,7 +29,7 @@ You can add as many **Additional** flags as needed, documented in [README.md](.. ### Run container and gain access to the command line If you need to run the container locally and gain access to its command line, you can run the following command: -- `docker run -it --entrypoint /bin/bash admiralawkbar/super-linter` +- `docker run -it --entrypoint /bin/bash github/super-linter` - This will drop you in the command line of the docker container for any testing or troubleshooting that may be needed. ### Found issues From e22eb00151aae0a8beda1292790ef918dcc453f8 Mon Sep 17 00:00:00 2001 From: iggy Date: Thu, 18 Jun 2020 16:15:52 -0700 Subject: [PATCH 2/5] Update to latest golangci-lint In setting super-linter up on one of my repo's, I ran into golangci/golangci-lint#827 which is apparently fixed in v1.23.8 (and has improved error messages in v1.24.0). I'm not sure if there's a reason for using the version that is there now, but if the latest doesn't work, please at least update to 1.24.0. Signed-off-by: iggy --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 89eab906..50c5778c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,7 +89,7 @@ RUN wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/s ##################### # Install Go Linter # ##################### -ARG GO_VERSION='v1.23.7' +ARG GO_VERSION='v1.27.0' RUN wget -O- -nvq https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "$GO_VERSION" ################## From 2751fb19a97a61b3c61921cd2545bd1e2f46daa3 Mon Sep 17 00:00:00 2001 From: Antoine Leblanc Date: Fri, 19 Jun 2020 07:44:26 +0200 Subject: [PATCH 3/5] Minor brand wording change Rename Github to GitHub. Signed-off-by: Antoine Leblanc --- .automation/cleanup-docker.sh | 4 ++-- .../test/ansible/ghe-initialize/defaults/main.yml | 2 +- .../ghe-initialize/tasks/ghe-initial-configuration.yml | 2 +- .automation/test/python/python_bad_1.py | 2 +- .automation/test/python/python_good_1.py | 2 +- .automation/upload-docker.sh | 4 ++-- Dockerfile | 4 ++-- lib/linter.sh | 10 +++++----- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.automation/cleanup-docker.sh b/.automation/cleanup-docker.sh index 77b86ab3..ba2cb758 100755 --- a/.automation/cleanup-docker.sh +++ b/.automation/cleanup-docker.sh @@ -16,7 +16,7 @@ ########### # Globals # ########### -GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace +GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace DOCKER_USERNAME="${DOCKER_USERNAME}" # Username to login to DockerHub DOCKER_PASSWORD="${DOCKER_PASSWORD}" # Password to login to DockerHub IMAGE_REPO="${IMAGE_REPO}" # Image repo to upload the image @@ -32,7 +32,7 @@ Header() { echo "" echo "-------------------------------------------------------" - echo "----- Github Actions remove image from DockerHub ------" + echo "----- GitHub Actions remove image from DockerHub ------" echo "-------------------------------------------------------" echo "" } diff --git a/.automation/test/ansible/ghe-initialize/defaults/main.yml b/.automation/test/ansible/ghe-initialize/defaults/main.yml index 6e8741f0..62e30a3a 100644 --- a/.automation/test/ansible/ghe-initialize/defaults/main.yml +++ b/.automation/test/ansible/ghe-initialize/defaults/main.yml @@ -62,7 +62,7 @@ core_expire_sessions: "false" core_package_version: "null" ####################### -# Default Github Vars # +# Default GitHub Vars # ####################### github_ssl_enabled: "true" github_ssl_tls_mode: "tlsv12" diff --git a/.automation/test/ansible/ghe-initialize/tasks/ghe-initial-configuration.yml b/.automation/test/ansible/ghe-initialize/tasks/ghe-initial-configuration.yml index d078873e..91865d3c 100644 --- a/.automation/test/ansible/ghe-initialize/tasks/ghe-initial-configuration.yml +++ b/.automation/test/ansible/ghe-initialize/tasks/ghe-initial-configuration.yml @@ -74,7 +74,7 @@ ################################### # Set the GHE Admin Password fact # ################################### - - name: Set the Github Admin password fact + - name: Set the GitHub Admin password fact set_fact: github_admin_password: "{{ github_admin_password }}" diff --git a/.automation/test/python/python_bad_1.py b/.automation/test/python/python_bad_1.py index 843aad50..369a7224 100644 --- a/.automation/test/python/python_bad_1.py +++ b/.automation/test/python/python_bad_1.py @@ -89,7 +89,7 @@ def delete_label(label_id): Delete the specified label :param label_id: Label's node id. :type label_id: str - :return: Github API request response. + :return: GitHub API request response. """ query_variables = { diff --git a/.automation/test/python/python_good_1.py b/.automation/test/python/python_good_1.py index f808c297..e894c36f 100644 --- a/.automation/test/python/python_good_1.py +++ b/.automation/test/python/python_good_1.py @@ -88,7 +88,7 @@ def delete_label(label_id): Delete the specified label :param label_id: Label's node id. :type label_id: str - :return: Github API request response. + :return: GitHub API request response. """ query_variables = { diff --git a/.automation/upload-docker.sh b/.automation/upload-docker.sh index e6f42be1..644bee8d 100755 --- a/.automation/upload-docker.sh +++ b/.automation/upload-docker.sh @@ -17,7 +17,7 @@ ########### # Globals # ########### -GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace +GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace DOCKER_USERNAME="${DOCKER_USERNAME}" # Username to login to DockerHub DOCKER_PASSWORD="${DOCKER_PASSWORD}" # Password to login to DockerHub IMAGE_REPO="${IMAGE_REPO}" # Image repo to upload the image @@ -33,7 +33,7 @@ Header() { echo "" echo "-------------------------------------------------------" - echo "------ Github Actions Upload image to DockerHub -------" + echo "------ GitHub Actions Upload image to DockerHub -------" echo "-------------------------------------------------------" echo "" } diff --git a/Dockerfile b/Dockerfile index 89eab906..da74a9f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ FROM python:alpine # Label the instance and set maintainer # ######################################### LABEL com.github.actions.name="GitHub Super-Linter" \ - com.github.actions.description="Lint your code base with Github Actions" \ + com.github.actions.description="Lint your code base with GitHub Actions" \ com.github.actions.icon="code" \ com.github.actions.color="red" \ maintainer="GitHub DevOps " @@ -99,7 +99,7 @@ RUN curl -Ls "$(curl -Ls https://api.github.com/repos/terraform-linters/tflint/r && mv "tflint" /usr/bin/ ########################################### -# Load GitHub Env Vars for Github Actions # +# Load GitHub Env Vars for GitHub Actions # ########################################### ENV GITHUB_SHA=${GITHUB_SHA} \ GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH} \ diff --git a/lib/linter.sh b/lib/linter.sh index 4ea4461b..473f53cd 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -67,8 +67,8 @@ LANGUAGE_ARRAY=('YML' 'JSON' 'XML' 'MARKDOWN' 'BASH' 'PERL' 'RUBY' 'PYTHON' # GitHub ENV Vars # ################### GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit -GITHUB_EVENT_PATH="${GITHUB_EVENT_PATH}" # Github Event Path -GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace +GITHUB_EVENT_PATH="${GITHUB_EVENT_PATH}" # GitHub Event Path +GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace ANSIBLE_DIRECTORY="${ANSIBLE_DIRECTORY}" # Ansible Directory VALIDATE_ALL_CODEBASE="${VALIDATE_ALL_CODEBASE}" # Boolean to validate all files VALIDATE_YAML="${VALIDATE_YAML}" # Boolean to validate language @@ -167,7 +167,7 @@ Header() ########## echo "" echo "---------------------------------------------" - echo "--- Github Actions Multi Language Linter ----" + echo "--- GitHub Actions Multi Language Linter ----" echo "---------------------------------------------" echo "" echo "---------------------------------------------" @@ -1963,9 +1963,9 @@ RunTestCases() Header ####################### -# Get Github Env Vars # +# Get GitHub Env Vars # ####################### -# Need to pull in all the Github variables +# Need to pull in all the GitHub variables # needed to connect back and update checks GetGitHubVars From f81547ff33b59d09ddf19dbd85e98493af4e7674 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Fri, 19 Jun 2020 20:46:13 +0900 Subject: [PATCH 4/5] Update the notation of RuboCop RuboCop is the proper notation as below. > **RuboCop** is a Ruby static code analyzer (a.k.a. `linter`) and > code formatter. https://github.com/rubocop-hq/rubocop/blob/v0.85.1/README.md --- README.md | 2 +- docs/disabling-linters.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ef3de4fe..f1dfb044 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | **Markdown** | [markdownlint](https://github.com/igorshubovych/markdownlint-cli#readme) | | **Perl** | [perl](https://pkgs.alpinelinux.org/package/edge/main/x86/perl) | | **Python3** | [pylint](https://www.pylint.org/) | -| **Ruby** | [Rubocop](https://github.com/rubocop-hq/rubocop) | +| **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) | | **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) | | **Terraform** | [tflint](https://github.com/terraform-linters/tflint) | | **TypeScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index a885c9f4..3adf8bfd 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -26,20 +26,20 @@ Below is examples and documentation for each language and the various methods to -------------------------------------------------------------------------------- ## Ruby -- [Rubocop](https://github.com/rubocop-hq/rubocop) +- [RuboCop](https://github.com/rubocop-hq/rubocop) -### Rubocop Config file +### RuboCop Config file - `.github/linters/.ruby-lint.yml` - You can pass multiple rules and overwrite default rules - File should be located at: `.github/linters/.ruby-lint.yml` -- **Note:** We use the Default **GitHub** Rule set from [Rubocop-GitHub](https://github.com/github/rubocop-github) +- **Note:** We use the Default **GitHub** Rule set from [RuboCop-GitHub](https://github.com/github/rubocop-github) -### Rubocop disable single line +### RuboCop disable single line ```ruby method(argument) # rubocop:disable SomeRule, SomeOtherRule ``` -### Rubocop disable code block +### RuboCop disable code block ```ruby # rubocop:disable This is a long line @@ -47,7 +47,7 @@ var="this is some other stuff" # rubocop:enable ``` -### Rubocop disable entire file +### RuboCop disable entire file If you need to ignore an entire file, you can update the `.github/linters/.ruby-lint.yml` to ignore certain files and locations ```yml From 7ee5d3d66a7e2c9db0bd4710f20833e49c010464 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Fri, 19 Jun 2020 06:51:04 -0700 Subject: [PATCH 5/5] Fix Links Links pointed to github-demo which is 404, updated to point to super-linter --- .github/CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 960b4afe..f553dcfc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -40,6 +40,6 @@ If you are the current maintainer of this action: - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) - [GitHub Help](https://help.github.com) -[pulls]: https://github.com/github/github-demo-stack/pulls -[pr]: https://github.com/github/github-demo-stack/compare -[fork]: https://github.com/github/github-demo-stack/fork +[pulls]: https://github.com/github/super-linter/pulls +[pr]: https://github.com/github/super-linter/compare +[fork]: https://github.com/github/super-linter/fork