Skip to content

Commit ec2147b

Browse files
Merge pull request #58 from asaasdev/DVT701
[DVT-701] Implementa análise incremental do CodeNarc com filtro de arquivos específicos
2 parents 9604394 + 325d623 commit ec2147b

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM codenarc/codenarc:2.2.0-groovy3.0.8
1+
FROM codenarc/codenarc:3.6.0-groovy3.0.23
22

33
RUN DEBIAN_FRONTEND=noninteractive \
44
apt-get update && \

entrypoint.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,25 @@ set -e
33

44
if [ -n "${GITHUB_WORKSPACE}" ] ; then
55
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit
6-
76
git config --global --add safe.directory "$GITHUB_WORKSPACE" || exit
87
fi
98

109
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
1110

12-
java -jar /lib/codenarc-all.jar \
13-
-report="${INPUT_REPORT:-compact:stdout}" \
14-
-rulesetfiles="${INPUT_RULESETFILES}" \
15-
> result.txt
11+
if [ -n "$INPUT_SOURCE_FILES" ]; then
12+
java -jar /lib/codenarc-all.jar \
13+
-report="${INPUT_REPORT:-compact:stdout}" \
14+
-rulesetfiles="${INPUT_RULESETFILES}" \
15+
-basedir="." \
16+
-includes="${INPUT_SOURCE_FILES}" \
17+
> result.txt
18+
else
19+
java -jar /lib/codenarc-all.jar \
20+
-report="${INPUT_REPORT:-compact:stdout}" \
21+
-rulesetfiles="${INPUT_RULESETFILES}" \
22+
> result.txt
23+
fi
24+
1625

1726
< result.txt reviewdog -efm="%f:%l:%m" -efm="%f:%r:%m" \
1827
-name="codenarc" \

0 commit comments

Comments
 (0)