Skip to content

Commit

Permalink
Update super-linter/super-linter action to v6
Browse files Browse the repository at this point in the history
Change-Id: Ie9803ce230beb4736b2458b671e14599b08443e8
Signed-off-by: Joakim Roubert <joakimr@axis.com>
  • Loading branch information
renovate[bot] authored and joakimr-axis committed Feb 27, 2024
1 parent c9a3c01 commit 11486a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/super-linter.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DEFAULT_BRANCH=main
LINTER_RULES_PATH=/
VALIDATE_ALL_CODEBASE=true
IGNORE_GITIGNORED_FILES=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: cat .github/super-linter.env >> "$GITHUB_ENV"

- name: Lint Code Base
uses: super-linter/super-linter/slim@v5
uses: super-linter/super-linter/slim@v6
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions LINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docker run --rm \
-v "$PWD":/tmp/lint \
-e RUN_LOCAL=true \
--env-file .github/super-linter.env \
ghcr.io/super-linter/super-linter:slim-v5
ghcr.io/super-linter/super-linter:slim-v6
```

## Run super-linter interactively
Expand All @@ -36,21 +36,21 @@ docker run -it --rm \
-w /tmp/lint \
--env-file .github/super-linter.env \
--entrypoint /bin/bash \
ghcr.io/super-linter/super-linter:slim-v5
ghcr.io/super-linter/super-linter:slim-v6
```

Then from the container terminal, the following commands can lint the the code
base for different file types:

```sh
# Lint C code (format)
find "$PWD" \( -iname \*.c -or -iname \*.h \) -exec clang-format --dry-run --Werror --verbose {} +
# Lint C++ code (format)
find "$PWD" \( -iname \*.cpp -or -iname \*.hpp \) -exec clang-format --dry-run --Werror --verbose {} +

# Lint Dockerfile files
hadolint $(find -type f -name Dockerfile*)
hadolint $(find -type f -name Dockerfile\*)

# Lint Dockerfile files (alternative command)
find -type f -name Dockerfile* -exec hadolint {} +
find -type f -name Dockerfile\* -exec hadolint {} +

# Lint JSON files
eslint --no-eslintrc -c /action/lib/.automation/.eslintrc.yml --ext .json .
Expand Down

0 comments on commit 11486a3

Please sign in to comment.