From 0483ad2c11a0b64144abdb020c15a87d50a20ceb Mon Sep 17 00:00:00 2001 From: DeveloperC Date: Sat, 16 Sep 2023 00:26:31 +0100 Subject: [PATCH] style: changing linting targets to be prefixed with 'check' --- .github/workflows/continuous-integration.yml | 10 ++++++---- .../workflows/github-actions-workflows.yml | 7 ++++--- Earthfile | 20 +++++++++---------- ...check-github-actions-workflows-linting.sh} | 0 ci/{go-linting.sh => check-go-linting.sh} | 0 ci/{sh-linting.sh => check-sh-linting.sh} | 0 6 files changed, 20 insertions(+), 17 deletions(-) rename ci/{github-actions-workflows-linting.sh => check-github-actions-workflows-linting.sh} (100%) rename ci/{go-linting.sh => check-go-linting.sh} (100%) rename ci/{sh-linting.sh => check-sh-linting.sh} (100%) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index cebf08b..562192f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -50,7 +50,8 @@ jobs: uses: actions/checkout@v3 - name: Check formatting. run: earthly --ci +check-yaml-formatting - go-linting: + check-go-linting: + name: Check Go Linting runs-on: ubuntu-latest steps: - name: Download Earthly v0.7.17. @@ -58,8 +59,9 @@ jobs: - name: Checkout code. uses: actions/checkout@v3 - name: Check linting. - run: earthly --ci +go-linting - sh-linting: + run: earthly --ci +check-go-linting + check-sh-linting: + name: Check Sh Linting runs-on: ubuntu-latest steps: - name: Download Earthly v0.7.17. @@ -67,7 +69,7 @@ jobs: - name: Checkout code. uses: actions/checkout@v3 - name: Check linting. - run: earthly --ci +sh-linting + run: earthly --ci +check-sh-linting module-tidying: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/github-actions-workflows.yml b/.github/workflows/github-actions-workflows.yml index db52079..39e518d 100644 --- a/.github/workflows/github-actions-workflows.yml +++ b/.github/workflows/github-actions-workflows.yml @@ -7,12 +7,13 @@ env: FORCE_COLOR: 1 jobs: - Linting: + check-linting: + name: Check Linting runs-on: ubuntu-latest steps: - name: Download Earthly v0.7.17. run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.7.17/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'" - name: Checkout code. uses: actions/checkout@v3 - - name: Lint GitHub Actions Workflows. - run: earthly +github-actions-workflows-linting + - name: Check GitHub Actions workflows linting. + run: earthly +check-github-actions-workflows-linting diff --git a/Earthfile b/Earthfile index b44e5f1..7dea2d4 100644 --- a/Earthfile +++ b/Earthfile @@ -133,12 +133,12 @@ fix-formatting: BUILD +fix-yaml-formatting -go-linting: +check-go-linting: FROM +golang-base RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.0 DO +INSTALL_DEPENDENCIES DO +COPY_SOURCECODE - RUN ./ci/go-linting.sh + RUN ./ci/check-go-linting.sh ubuntu-base: @@ -147,24 +147,24 @@ ubuntu-base: RUN apt-get update --fix-missing -sh-linting: +check-sh-linting: FROM +ubuntu-base RUN apt-get install shellcheck -y DO +COPY_CI_DATA - RUN ./ci/sh-linting.sh + RUN ./ci/check-sh-linting.sh -github-actions-workflows-linting: +check-github-actions-workflows-linting: FROM +golang-base RUN go install github.com/rhysd/actionlint/cmd/actionlint@v1.6.24 DO +COPY_METADATA - RUN ./ci/github-actions-workflows-linting.sh + RUN ./ci/check-github-actions-workflows-linting.sh -linting: - BUILD +go-linting - BUILD +sh-linting - BUILD +github-actions-workflows-linting +check-linting: + BUILD +check-go-linting + BUILD +check-sh-linting + BUILD +check-github-actions-workflows-linting check-module-tidying: diff --git a/ci/github-actions-workflows-linting.sh b/ci/check-github-actions-workflows-linting.sh similarity index 100% rename from ci/github-actions-workflows-linting.sh rename to ci/check-github-actions-workflows-linting.sh diff --git a/ci/go-linting.sh b/ci/check-go-linting.sh similarity index 100% rename from ci/go-linting.sh rename to ci/check-go-linting.sh diff --git a/ci/sh-linting.sh b/ci/check-sh-linting.sh similarity index 100% rename from ci/sh-linting.sh rename to ci/check-sh-linting.sh