add actionlint script and fix linting errors (#358087)

This commit is contained in:
Jörg Thalheim
2024-11-22 15:07:24 +01:00
committed by GitHub
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ jobs:
echo "$errors"
else
# just print in plain text
echo "$errors" | sed 's/^:://'
echo "${errors/::/}"
echo # add one empty line
fi
failedFiles+=("$dest")
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz
- name: Checking EditorConfig
run: |
cat "$HOME/changed_files" | nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
< "$HOME/changed_files" nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash actionlint shellcheck -I nixpkgs=../..
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$SCRIPT_DIR/../.."
actionlint