From c60a3556744e34d671fcdd2ab21d6430623990f6 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:04:41 +0900 Subject: [PATCH 01/11] param `directory` was changed to `paths` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27744657..1d40fceb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: - name: perlcritic uses: gugod/actions-perlcritic@fun with: - directory: "lib script t dev-bin" + paths: "lib script t dev-bin" yath: runs-on: ${{ matrix.os }} From cad109b41a6a4d133ef7a52539a12eac6dfe5956 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:45:17 +0900 Subject: [PATCH 02/11] try running perlcritic with full command --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d40fceb..068927f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: perlcritic - uses: gugod/actions-perlcritic@fun - with: - paths: "lib script t dev-bin" + - uses: gugod/actions-perlcritic@fun + - run: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin yath: runs-on: ${{ matrix.os }} From c182f5dde230948bee00966ca8a340d2627eb5d8 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:47:27 +0900 Subject: [PATCH 03/11] retry --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 068927f1..ede234d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: gugod/actions-perlcritic@fun - - run: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin + run: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin yath: runs-on: ${{ matrix.os }} From 1c5304b6da1b1ad102a06df0f2908d6505632738 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:52:52 +0900 Subject: [PATCH 04/11] retry: ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ede234d5..5543c118 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: gugod/actions-perlcritic@fun - run: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin + with: + entrypoint: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin yath: runs-on: ${{ matrix.os }} From 466e4f66eb6f5d87f8350dd49fcf2bb8db7eb283 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:55:08 +0900 Subject: [PATCH 05/11] retry: entrypoint as an array --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5543c118..6ed84804 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v2 - uses: gugod/actions-perlcritic@fun with: - entrypoint: perlcritic --quiet --profile .perlcriticrc lib script t dev-bin + entrypoint: ['perlcritic', '--quiet', '--profile', '.perlcriticrc', 'lib', 'script', 't', 'dev-bin'] yath: runs-on: ${{ matrix.os }} From 4adacff43e01a81ce26cfe4a325d6c68236e1128 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 09:58:18 +0900 Subject: [PATCH 06/11] separate linting (perlcritic) to its own workflow --- .github/workflows/ci.yml | 8 -------- .github/workflows/lint.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ed84804..c709db85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,14 +3,6 @@ name: CI on: pull_request jobs: - perlcritic: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: gugod/actions-perlcritic@fun - with: - entrypoint: ['perlcritic', '--quiet', '--profile', '.perlcriticrc', 'lib', 'script', 't', 'dev-bin'] - yath: runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..cf7c7508 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +name: Lint + +on: pull_request + +jobs: + perlcritic: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gugod/actions-perlcritic@fun + with: + entrypoint: ['perlcritic', '--quiet', '--profile', '.perlcriticrc', 'lib', 'script', 't', 'dev-bin'] From 4a57dc02fad6549da8b0d9898a6300d5c374f668 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Thu, 11 Mar 2021 10:00:38 +0900 Subject: [PATCH 07/11] fallback -- 'entrypoint' can only be a string. error from github action: The workflow is not valid. .github/workflows/lint.yml (Line: 12, Col: 23): A sequence was not expected --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cf7c7508..9640976f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,4 +9,5 @@ jobs: - uses: actions/checkout@v2 - uses: gugod/actions-perlcritic@fun with: - entrypoint: ['perlcritic', '--quiet', '--profile', '.perlcriticrc', 'lib', 'script', 't', 'dev-bin'] + options: --quiet -p .perlcriticrc + paths: lib script t dev-bin From 0f8c8b35fd56f64ce130eabd42fb1c2eb835906c Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Fri, 12 Mar 2021 23:18:07 +0900 Subject: [PATCH 08/11] try an alternative --- .github/workflows/lint.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9640976f..393aa96f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,9 +5,8 @@ on: pull_request jobs: perlcritic: runs-on: ubuntu-latest + outputs: + perlcritic: ${{ steps.perlcritic.output }} steps: - uses: actions/checkout@v2 - - uses: gugod/actions-perlcritic@fun - with: - options: --quiet -p .perlcriticrc - paths: lib script t dev-bin + - uses: gugod/action-perlcritic@fun From 164b3a63d0a39a8289ffd55f79e1e19853173732 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Fri, 12 Mar 2021 23:25:27 +0900 Subject: [PATCH 09/11] unused. --- .github/workflows/lint.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 393aa96f..5dfcfb6e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,8 +5,6 @@ on: pull_request jobs: perlcritic: runs-on: ubuntu-latest - outputs: - perlcritic: ${{ steps.perlcritic.output }} steps: - uses: actions/checkout@v2 - uses: gugod/action-perlcritic@fun From 9c2c406980cdfc162f2f8d3511c25e1abba098c1 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Fri, 12 Mar 2021 23:26:49 +0900 Subject: [PATCH 10/11] add one violation. --- lib/App/perlbrew.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/App/perlbrew.pm b/lib/App/perlbrew.pm index 281391bb..0e1e3b90 100644 --- a/lib/App/perlbrew.pm +++ b/lib/App/perlbrew.pm @@ -30,6 +30,8 @@ use App::Perlbrew::Path::Root; ### global variables +my $unused_global_var; + # set $ENV{SHELL} to executable path of parent process (= shell) if it's missing # (e.g. if this script was executed by a daemon started with "service xxx start") # ref: https://github.com/gugod/App-perlbrew/pull/404 From 12032a8453acb9c327ceb19fa0d8ce8c6b41b342 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Sat, 13 Mar 2021 11:19:14 +0900 Subject: [PATCH 11/11] retry --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5dfcfb6e..a468434f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,3 +8,5 @@ jobs: steps: - uses: actions/checkout@v2 - uses: gugod/action-perlcritic@fun + with: + perlcritic_args: -p .perlcriticrc lib t scripts dev-bin