mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Add automatic linter (#4214)
This commit is contained in:
16
.github/workflows/clang-format-lint.yml
vendored
Normal file
16
.github/workflows/clang-format-lint.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Clang format linter
|
||||
on:
|
||||
push: {}
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||
with:
|
||||
source: './src'
|
||||
extensions: 'java'
|
||||
clangFormatVersion: 12
|
||||
30
.github/workflows/prettify.yml
vendored
30
.github/workflows/prettify.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: Prettify
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- '**.yml'
|
||||
- '**.xml'
|
||||
- '**.Dockerfile'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/**'
|
||||
- '**.yml'
|
||||
- '**.xml'
|
||||
- '**.Dockerfile'
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Prettify code
|
||||
uses: creyD/prettier_action@v3.3
|
||||
with:
|
||||
prettier_options: --write **/*.java
|
||||
commit_message: 'Prettify code'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user