From b27c6d3345da85d7a138ca662bc20961cda43791 Mon Sep 17 00:00:00 2001
From: Luca Di Maio <luca.dimaio1@gmail.com>
Date: Mon, 6 May 2024 09:01:12 +0200
Subject: [PATCH] CI: update lint rules to new style

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
---
 .github/workflows/main.yml | 2 +-
 CONTRIBUTING.md            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c55dff5569..1ff688cc3a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -46,7 +46,7 @@ jobs:
           for file in $(find . -type f -not -path "*.git*"); do
             if file "$file" | grep -qi shell; then
               echo "### Checking file $file..."
-              podman run --rm -v "$PWD:/mnt" docker.io/peterdavehello/shfmt:latest shfmt -d -s -ci -sr -kp /mnt/$file
+              podman run --rm -v "$PWD:/mnt" docker.io/peterdavehello/shfmt:latest shfmt -d -s -ci -sr -kp -fn -i=0 -p /mnt/$file
               result=$(( result + $? ))
             fi
           done
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a0b52143de..a3bbacc93a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -89,7 +89,7 @@ done
   - `shellcheck -s sh -a -o all -Sstyle -Calways -x -e SC2310,SC2311,SC2312`
 - use `shfmt` to style the code using:
   - install from [HERE](https://github.com/mvdan/sh) using `go install mvdan.cc/sh/v3/cmd/shfmt@latest`
-  - `shfmt -d -s -ci -sr -kp`
+  - `shfmt shfmt -d -s -ci -sr -kp`
 - use `bashate` to check the code:
   - install using `pip3 install bashate`
   - `bashate -i E002,E003,E010,E011 --max-line-length 120`