Skip to content

Commit

Permalink
Allow configuring checkstyle version (#18)
Browse files Browse the repository at this point in the history
* Add "checkstyle_version" config element to action

* Use the checkstyle version config option

* Add default checkstyle version inside Dockerfile

Use version 8.37 as a default

* Check checkstyle version

* Remove print of checkstyle version

Co-authored-by: Nikita <savinovnickita@gmail.com>

Co-authored-by: Nikita <savinovnickita@gmail.com>
  • Loading branch information
JesFot and nikitasavinov authored Dec 6, 2020
1 parent 61104b8 commit f53e0ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM openjdk:8-alpine

ENV REVIEWDOG_VERSION=v0.10.0
ENV INPUT_CHECKSTYLE_VERSION=8.37

RUN wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.36.2/checkstyle-8.36.2-all.jar > /checkstyle.jar
RUN wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${INPUT_CHECKSTYLE_VERSION}/checkstyle-${INPUT_CHECKSTYLE_VERSION}-all.jar > /checkstyle.jar
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
RUN apk add --no-cache git
COPY entrypoint.sh /entrypoint.sh
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ inputs:
description: 'Checkstyle config file'
required: true
default: 'google_checks.xml'
checkstyle_version:
description: 'Checkstyle version'
default: '8.37'
workdir:
description: 'Working directory relative to the root directory.'
default: '.'
Expand Down

0 comments on commit f53e0ef

Please sign in to comment.