-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Output files which will be linted as a group * Move to alpine image * Workaround for git v2.35.2 issue * Install rlwrap so clojure-tools works appropriately * Send multiple --lint args * Redact timing information * Log results of linting * Fix param passing * Simplify * Simplify * Update documentation
- Loading branch information
Showing
5 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Changelog | ||
|
||
## v2 - 2022-07-06 | ||
|
||
- Migrate to Alpine tools.deps image | ||
- Add an output group for files that will be linted | ||
|
||
## v1 - 2021-07-07 | ||
|
||
- Initial Implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
FROM nnichols/clojure-lint-action | ||
FROM clojure:temurin-18-tools-deps-alpine | ||
|
||
ENV REVIEWDOG_VERSION=v0.12.0 | ||
|
||
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION} | ||
|
||
RUN apk --no-cache add gcc ncurses-dev libc-dev readline-dev make \ | ||
&& cd /tmp \ | ||
&& wget https://github.com/hanslub42/rlwrap/releases/download/v0.43/rlwrap-0.43.tar.gz \ | ||
&& tar -xzvf rlwrap-0.43.tar.gz \ | ||
&& cd rlwrap-0.43 \ | ||
&& ./configure \ | ||
&& make install \ | ||
&& rm -rf rlwrap-0.43 \ | ||
&& apk del gcc ncurses-dev libc-dev readline-dev make | ||
|
||
COPY lint.sh /lint.sh | ||
|
||
ENTRYPOINT ["bash", "/lint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
#!/bin/bash | ||
|
||
cd "${GITHUB_WORKSPACE}" || exit | ||
cd "${GITHUB_WORKSPACE}" || exit 1 | ||
|
||
# https://github.com/reviewdog/reviewdog/issues/1158 | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" || exit 1 | ||
|
||
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" | ||
|
||
clj-kondo --lint $(find "${INPUT_PATH}" -not -path "${INPUT_EXCLUDE}" -type f -name "${INPUT_PATTERN}") \ | ||
sources=$(find "${INPUT_PATH}" -not -path "${INPUT_EXCLUDE}" -type f -name "${INPUT_PATTERN}") | ||
|
||
echo "::group::Files to lint" | ||
echo "${sources}" | ||
echo "::endgroup::" | ||
|
||
clj -Sdeps '{:deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}}' -M -m clj-kondo.main \ | ||
--lint $(find "${INPUT_PATH}" -not -path "${INPUT_EXCLUDE}" -type f -name "${INPUT_PATTERN}") \ | ||
--config "${INPUT_CLJ_KONDO_CONFIG}" \ | ||
--config '{:output {:pattern "{{filename}}:{{row}}:{{col}}: {{message}}"}}' \ | ||
--config '{:summary false}' \ | ||
| reviewdog \ | ||
-efm="%f:%l:%c: %m" \ | ||
-name="clj-kondo" \ | ||
-reporter="${INPUT_REPORTER}" \ | ||
-filter-mode="${INPUT_FILTER_MODE}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} | ||
"${INPUT_REVIEWDOG_FLAGS}" | ||
|
||
exit_code=$? | ||
|
||
exit $exit_code |