removing empty statement and unused imports #755
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
name: lint | |
on: [push] | |
jobs: | |
run-checkstyle-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Lint code base | |
uses: dbelyaev/action-checkstyle@v0.9.5 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: github-check | |
checkstyle_config: .github/config/checks.xml | |
fail_on_error: true | |
update-lint-badges: | |
if: ${{ always() && github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
needs: run-checkstyle-lint | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Get lint result | |
run: | | |
if [[ ${{ needs.run-checkstyle-lint.result }} == "success" || ${{ needs.run-checkstyle-lint.result }} == "skipped" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
- name: Generate passing badge | |
if: success() | |
uses: knightdave/anybadge-action@v1.1.0 | |
with: | |
file: docs/badges/lint.svg | |
label: lint | |
value: passing | |
color: green | |
template: docs/badges/template.svg | |
overwrite: true | |
- name: Generate failing badge | |
if: failure() | |
uses: knightdave/anybadge-action@v1.1.0 | |
with: | |
file: docs/badges/lint.svg | |
label: lint | |
value: failing | |
color: red | |
template: docs/badges/template.svg | |
overwrite: true | |
- name: Publish badge | |
if: success() || failure() | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs/badges | |
target-folder: badges | |
clean: false |