mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-10 20:09:58 +00:00
0a31de43c2
Had an issue last week where testFixtures had a couple of issues which I didn't pick up on, as the pre-commit hooks only check the main and test source set. We now add a per-project "checkstyle" task, which dependes on the per-source-set checkstyle tasks.
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
# SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
# See https://pre-commit.com for more information
|
|
# See https://pre-commit.com/hooks.html for more hooks
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-merge-conflict
|
|
|
|
# Quick syntax checkers
|
|
- id: check-xml
|
|
- id: check-yaml
|
|
- id: check-toml
|
|
- id: check-json
|
|
exclude: "tsconfig\\.json$"
|
|
|
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
|
rev: 2.7.2
|
|
hooks:
|
|
- id: editorconfig-checker
|
|
args: ['-disable-indentation']
|
|
exclude: "^(.*\\.(bat)|LICENSE)$"
|
|
|
|
- repo: https://github.com/fsfe/reuse-tool
|
|
rev: v2.1.0
|
|
hooks:
|
|
- id: reuse
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: license
|
|
name: Spotless
|
|
files: ".*\\.(java|kt|kts)$"
|
|
language: system
|
|
entry: ./gradlew spotlessApply
|
|
pass_filenames: false
|
|
require_serial: true
|
|
- id: checkstyle
|
|
name: Check Java codestyle
|
|
files: ".*\\.java$"
|
|
language: system
|
|
entry: ./gradlew checkstyle
|
|
pass_filenames: false
|
|
require_serial: true
|
|
- id: illuaminate
|
|
name: Check Lua code
|
|
files: ".*\\.(lua|java|md)"
|
|
language: system
|
|
entry: ./gradlew lintLua
|
|
pass_filenames: false
|
|
require_serial: true
|
|
|
|
exclude: |
|
|
(?x)^(
|
|
projects/[a-z]+/src/generated|
|
|
projects/core/src/test/resources/test-rom/data/json-parsing/|
|
|
.*\.dfpwm
|
|
)
|