nikitasavinov / checkstyle-action

Run Java checkstyle with reviewdog in github actions
MIT License
59 stars 36 forks source link

Update entrypoint.sh #36

Open kerwin612 opened 1 year ago

kerwin612 commented 1 year ago

Add precondition detection: The installation of reviewdog in the container will fail if there is a network timeout. Therefore, if reviewdog does not exist, exit directly to avoid finding the problem after downloading checkstyle, which is a waste of time.

Downloading checkstyle theory also takes time. Before time-consuming operation (non-real-time response), output log feedback current process.

Here's the real problem I had

Running check
//I waited here for six minutes because of the network.
wget: error getting response: Resource temporarily unavailable
//In other words, it would take six minutes for me to know that there was a problem(reviewdog: not found) with the image build. The six-minute wait was completely useless.
/entrypoint.sh: line 18: reviewdog: not found
Error: Invalid or corrupt jarfile /checkstyle.jar