Skip to content

Commit

Permalink
LINT.md: Update super-linter version and escape find command
Browse files Browse the repository at this point in the history
Change-Id: Id8b1d950fe1a431378fb3d3f56f15b2d69d936a2
Signed-off-by: Joakim Roubert <[email protected]>
  • Loading branch information
joakimr-axis committed Feb 27, 2024
1 parent 29d0c89 commit a8f6838
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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
8 changes: 4 additions & 4 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,7 +36,7 @@ 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
Expand All @@ -47,10 +47,10 @@ base for different file types:
find "$PWD" \( -iname \*.c -or -iname \*.h \) -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 a8f6838

Please sign in to comment.