Skip to content

Commit

Permalink
add spotless GitHub action
Browse files Browse the repository at this point in the history
disable existing linter so we don't double-lint with diff rules
  • Loading branch information
dejabot committed Nov 23, 2023
1 parent 0d5d990 commit f74ee4f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:

steps:

- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Checkout Code
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

- name: Lint Code Base
uses: super-linter/[email protected]
env:
# Only lints new/edited files
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
VALIDATE_GOOGLE_JAVA_FORMAT: false
VALIDATE_JSCPD: false
VALIDATE_MARKDOWN: false
JAVA_FILE_NAME: 'checkstyle.xml'
# - name: Lint Code Base
# uses: super-linter/[email protected]
# env:
# # Only lints new/edited files
# VALIDATE_ALL_CODEBASE: false
# DEFAULT_BRANCH: main
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# IGNORE_GITIGNORED_FILES: true
# VALIDATE_GOOGLE_JAVA_FORMAT: false
# VALIDATE_JSCPD: false
# VALIDATE_MARKDOWN: false
# JAVA_FILE_NAME: 'checkstyle.xml'
24 changes: 24 additions & 0 deletions .github/workflows/spotless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Spotless

on:
push:
branches-ignore: [master, main]
pull_request:
branches: [master, main]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
spotless:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- run: ./gradlew spotlessCheck

0 comments on commit f74ee4f

Please sign in to comment.