From 14b9d3e813643d22a1b90ec78c8768d24bc25abc Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:08:32 -0700 Subject: [PATCH 01/22] chore: update bin file mode --- script.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script.sh b/script.sh index 3476806..163f7b6 100755 --- a/script.sh +++ b/script.sh @@ -8,6 +8,7 @@ cd "${TEMP_PATH}" || exit curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJf - mkdir bin cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin +chmod +x bin/shellcheck PATH="${TEMP_PATH}/bin:$PATH" echo '::endgroup::' From f6620629e2cb852a0be0f2f73dd89358ac380b28 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:10:39 -0700 Subject: [PATCH 02/22] Update reviewdog.yml --- .github/workflows/reviewdog.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 1ffb42a..18ee2b4 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -3,7 +3,10 @@ on: [pull_request] jobs: shellcheck: name: runner / shellcheck - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v3 - name: shellcheck-github-pr-check From 19922513357827e80b8b8e85a993e320be1b95c5 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:24:07 -0700 Subject: [PATCH 03/22] Update script.sh --- script.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 163f7b6..3219543 100755 --- a/script.sh +++ b/script.sh @@ -5,7 +5,20 @@ set -u echo '::group:: Installing shellcheck ... https://github.com/koalaman/shellcheck' TEMP_PATH="$(mktemp -d)" cd "${TEMP_PATH}" || exit -curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJf - + +# Download the latest version +WINDOWS_TARGET=zip +LINUX_TARGET=linux.x86_64.tar.xz +MACOS_TARGET=darwin.x86_64.tar.xz + +if [[ $(uname -s) == "Linux" ]]; then + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${LINUX_TARGET}" | tar -xJf - +elif [[ $(uname -s) == "Darwin" ]]; then + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - +else + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -q - +fi + mkdir bin cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin chmod +x bin/shellcheck From 0cd359bfafe373b622c4cf278a470e30d2dcc865 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:24:31 -0700 Subject: [PATCH 04/22] Update script.sh --- script.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/script.sh b/script.sh index 3219543..6158c24 100755 --- a/script.sh +++ b/script.sh @@ -6,7 +6,6 @@ echo '::group:: Installing shellcheck ... https://github.com/koalaman/shellcheck TEMP_PATH="$(mktemp -d)" cd "${TEMP_PATH}" || exit -# Download the latest version WINDOWS_TARGET=zip LINUX_TARGET=linux.x86_64.tar.xz MACOS_TARGET=darwin.x86_64.tar.xz From 290060b09b9704c644267143db1b6327927bffbe Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:27:13 -0700 Subject: [PATCH 05/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 6158c24..a5b468a 100755 --- a/script.sh +++ b/script.sh @@ -15,7 +15,7 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -q - + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -q fi mkdir bin From 967fe80126e0c60b56126d2a1fdf0fa5db01fbe1 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:31:18 -0700 Subject: [PATCH 06/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index a5b468a..a9ba2dd 100755 --- a/script.sh +++ b/script.sh @@ -15,7 +15,7 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -q + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -qp fi mkdir bin From a8f7833a10be7d3f2bf004d46e824cb219da2715 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:39:27 -0700 Subject: [PATCH 07/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index a9ba2dd..3824732 100755 --- a/script.sh +++ b/script.sh @@ -15,7 +15,7 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -qp + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -c - fi mkdir bin From ef81c8eb63dd84b68887b7f285faef5b49078328 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 12:57:31 -0700 Subject: [PATCH 08/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 3824732..b41c50c 100755 --- a/script.sh +++ b/script.sh @@ -15,7 +15,7 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" | unzip -c - + unzip <(curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}") fi mkdir bin From a1cdb77725036af3d14a9aba12984c9ee6686140 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:32:35 -0700 Subject: [PATCH 09/22] Update script.sh --- script.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script.sh b/script.sh index b41c50c..92038ff 100755 --- a/script.sh +++ b/script.sh @@ -15,12 +15,11 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - unzip <(curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}") + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.zip" -o shellcheck-v${SHELLCHECK_VERSION}.zip && unzip shellcheck-v${SHELLCHECK_VERSION}.zip && rm shellcheck-v${SHELLCHECK_VERSION}.zip fi mkdir bin cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin -chmod +x bin/shellcheck PATH="${TEMP_PATH}/bin:$PATH" echo '::endgroup::' From 8179a9760c41c32656f0ecbd3ea1e6d5df63572f Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:36:37 -0700 Subject: [PATCH 10/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 92038ff..08d3913 100755 --- a/script.sh +++ b/script.sh @@ -15,7 +15,7 @@ if [[ $(uname -s) == "Linux" ]]; then elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.zip" -o shellcheck-v${SHELLCHECK_VERSION}.zip && unzip shellcheck-v${SHELLCHECK_VERSION}.zip && rm shellcheck-v${SHELLCHECK_VERSION}.zip + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" fi mkdir bin From d193d052b0564b5f68b055ccd312650ebf9e9556 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:39:00 -0700 Subject: [PATCH 11/22] Update script.sh --- script.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script.sh b/script.sh index 08d3913..7459a53 100755 --- a/script.sh +++ b/script.sh @@ -5,6 +5,7 @@ set -u echo '::group:: Installing shellcheck ... https://github.com/koalaman/shellcheck' TEMP_PATH="$(mktemp -d)" cd "${TEMP_PATH}" || exit +mkdir bin WINDOWS_TARGET=zip LINUX_TARGET=linux.x86_64.tar.xz @@ -12,14 +13,15 @@ MACOS_TARGET=darwin.x86_64.tar.xz if [[ $(uname -s) == "Linux" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${LINUX_TARGET}" | tar -xJf - + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin elif [[ $(uname -s) == "Darwin" ]]; then curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin else curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck.exe" ./bin fi -mkdir bin -cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin PATH="${TEMP_PATH}/bin:$PATH" echo '::endgroup::' From 7e2728c61b1386b208adf0ab84873d11b90b4e4c Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:40:14 -0700 Subject: [PATCH 12/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 7459a53..23df8bc 100755 --- a/script.sh +++ b/script.sh @@ -19,7 +19,7 @@ elif [[ $(uname -s) == "Darwin" ]]; then cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin else curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" - cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck.exe" ./bin + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck.exe" ./bin/shellcheck fi PATH="${TEMP_PATH}/bin:$PATH" From 625f08dcd6b93fc0e43d547d589052e80f850afb Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:44:41 -0700 Subject: [PATCH 13/22] Update script.sh --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 23df8bc..cc02c3f 100755 --- a/script.sh +++ b/script.sh @@ -19,7 +19,7 @@ elif [[ $(uname -s) == "Darwin" ]]; then cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin else curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" - cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck.exe" ./bin/shellcheck + cp "shellcheck.exe" ./bin fi PATH="${TEMP_PATH}/bin:$PATH" From a4e5194672a02f7089983b81900dd5ef66017faf Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 13:47:34 -0700 Subject: [PATCH 14/22] Update script.sh --- script.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script.sh b/script.sh index cc02c3f..04371af 100755 --- a/script.sh +++ b/script.sh @@ -12,14 +12,14 @@ LINUX_TARGET=linux.x86_64.tar.xz MACOS_TARGET=darwin.x86_64.tar.xz if [[ $(uname -s) == "Linux" ]]; then - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${LINUX_TARGET}" | tar -xJf - - cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${LINUX_TARGET}" | tar -xJf - + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin elif [[ $(uname -s) == "Darwin" ]]; then - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - - cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${MACOS_TARGET}" | tar -xJf - + cp "shellcheck-v$SHELLCHECK_VERSION/shellcheck" ./bin else - curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" - cp "shellcheck.exe" ./bin + curl -sL "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" -o "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && unzip "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" && rm "shellcheck-v${SHELLCHECK_VERSION}.${WINDOWS_TARGET}" + cp "shellcheck.exe" ./bin fi PATH="${TEMP_PATH}/bin:$PATH" From 5e03fdb5bbc846fad92afdbeee57e28d89c8797f Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 14:03:17 -0700 Subject: [PATCH 15/22] Updated line endings --- script.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 script.sh diff --git a/script.sh b/script.sh old mode 100755 new mode 100644 From c04689df1eeb4d19dab89587c53b64f95837ffba Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 14:05:09 -0700 Subject: [PATCH 16/22] Updated the permission --- script.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 script.sh diff --git a/script.sh b/script.sh old mode 100644 new mode 100755 From 3b8d14fa0a87d68b54782edf9432dba3b3355008 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 14:17:09 -0700 Subject: [PATCH 17/22] Added .gitattributes --- .gitattributes | 1 + script.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2125666 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/script.sh b/script.sh index 04371af..86432a9 100755 --- a/script.sh +++ b/script.sh @@ -47,7 +47,6 @@ while read -r pattern; do [[ -n ${pattern} ]] && excludes+=(-not -path "${pattern}") done <<< "${INPUT_EXCLUDE:-}" - # Match all files matching the pattern files_with_pattern=$(find "${paths[@]}" "${excludes[@]}" -type f "${names[@]}") From e26b5fecedda13d385cd7a2ddf4ade1daa548561 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 14:24:24 -0700 Subject: [PATCH 18/22] Update .gitattributes --- .gitattributes | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 2125666..7093cae 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,17 @@ -* text=auto \ No newline at end of file +# Add support for running the script on Windows, Linux and MacOs +* text=auto + +# Set the default behavior, in case people don't have core.autocrlf set. +* text eol=lf + +# Denote files that are text and should be normalized (Convert crlf -> lf) +# but should not be converted to native line endings on checkout. +*.md text + +# Denote files that are text and should be normalized (Convert crlf -> lf) +# and should be converted to native line endings on checkout. +*.sh text eol=lf + +# Denote files that are text and should be normalized (Convert crlf -> lf) +# and should be converted to native line endings on checkout. +*.yml text eol=lf From 0b8e88bc72869fcca1bb99d312a94d889b47981e Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 15:02:27 -0700 Subject: [PATCH 19/22] Updated README. --- .gitattributes | 13 ------------- README.md | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7093cae..4efd26e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,17 +1,4 @@ -# Add support for running the script on Windows, Linux and MacOs * text=auto # Set the default behavior, in case people don't have core.autocrlf set. -* text eol=lf - -# Denote files that are text and should be normalized (Convert crlf -> lf) -# but should not be converted to native line endings on checkout. -*.md text - -# Denote files that are text and should be normalized (Convert crlf -> lf) -# and should be converted to native line endings on checkout. *.sh text eol=lf - -# Denote files that are text and should be normalized (Convert crlf -> lf) -# and should be converted to native line endings on checkout. -*.yml text eol=lf diff --git a/README.md b/README.md index 1bbed04..8f16c7d 100644 --- a/README.md +++ b/README.md @@ -112,3 +112,16 @@ jobs: exclude: "./.git/*" # Optional. check_all_files_with_shebangs: "false" # Optional. ``` + +## Known issue + +> Running `shellcheck.exe` on Windows might fail with the following error: +`SC1017: Literal carriage return. Run script through tr -d '\r'` +> +> This is due to the presence of a carriage return character (`\r`) in the script. +> +> To fix this, you can add a `.gitattributes` file to your repository with the following contents: +> ``` +> *.sh text eol=lf +> ``` +> This will ensure that the scripts are checked out with the correct line endings. \ No newline at end of file From c305eb571a0172bdb88b92c8f1b2de1549918cdf Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 15:07:10 -0700 Subject: [PATCH 20/22] Added comment --- .gitattributes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 4efd26e..ded29a7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ * text=auto -# Set the default behavior, in case people don't have core.autocrlf set. +# Denote files that are shell scripts and should be normalized (convert crlf -> lf) +# and should be converted to unix line endings on checkout. *.sh text eol=lf From f229d8bd923ca7153a830869b66b4be638b0a9ba Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 15:09:22 -0700 Subject: [PATCH 21/22] Updated .gitattributes --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index ded29a7..2b2bb35 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,8 @@ * text=auto +# Set the default behavior, in case people don't have core.autocrlf set. +* text eol=lf + # Denote files that are shell scripts and should be normalized (convert crlf -> lf) # and should be converted to unix line endings on checkout. *.sh text eol=lf From fd9376d0bbd5da5278a703a270954a76cc703ec6 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 21 Jan 2023 15:10:11 -0700 Subject: [PATCH 22/22] Updated .gitattributes --- .gitattributes | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 2b2bb35..73518c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,3 @@ -* text=auto - -# Set the default behavior, in case people don't have core.autocrlf set. -* text eol=lf - # Denote files that are shell scripts and should be normalized (convert crlf -> lf) # and should be converted to unix line endings on checkout. *.sh text eol=lf