Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
permissions:
actions: read
contents: read
pull-requests: write
security-events: write

steps:
Expand All @@ -33,8 +34,21 @@ jobs:
run: ./gradlew build

- name: Lint
run: |
./gradlew lint || echo "::warning::Checkstyle found violations. See the checkstyle-report artifact for details."
id: lint
continue-on-error: true
run: ./gradlew lint

- name: Comment on PR if lint failed
if: steps.lint.outcome == 'failure' && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: ':warning: **Checkstyle found style violations.** See the **checkstyle-report** artifact for details.'
})

- name: Determine artifact name
id: find_artifact
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/tanks/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ public int hashCode()
// Value is set before Game.game.window is initialized
public boolean fullscreen = false;

private Game()
{
private Game() {
Game.game = this;
input = new InputBindings();
}
Expand Down
Loading