Add linter actions
This commit is contained in:
24
.gitea/workflows/smart-clinic-lint-backend.yml
Normal file
24
.gitea/workflows/smart-clinic-lint-backend.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Lint Java Backend
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- SmartClinicManagementSystem/**
|
||||
push:
|
||||
paths:
|
||||
- SmartClinicManagementSystem/**
|
||||
jobs:
|
||||
lint-java:
|
||||
runs-on: node20
|
||||
name: Checkstyle Java Linting
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '21'
|
||||
- name: Download Checkstyle
|
||||
run: curl -L -o checkstyle.jar https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.12.1/checkstyle-10.12.1-all.jar
|
||||
- name: Run Checkstyle
|
||||
run: |
|
||||
java -jar checkstyle.jar -c /google_checks.xml app/src/main/java/com/project/back_end || true
|
||||
Reference in New Issue
Block a user