mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Update the pre-commit hooks
With v3.12.0 shfmt changed the behavior of the `--simplify` option to ignore any EditorConfig when it's provided. Therefore, this option is now moved to the EditorConfig as suggested by the shfmt author. See https://github.com/mvdan/sh/issues/1173 for details.
This commit is contained in:
parent
4dace890cf
commit
f43f4ae1b1
5 changed files with 10 additions and 10 deletions
|
|
@ -19,6 +19,7 @@ indent_style = space
|
||||||
[*.sh]
|
[*.sh]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
function_next_line = true
|
function_next_line = true
|
||||||
|
simplify = true
|
||||||
switch_case_indent = true
|
switch_case_indent = true
|
||||||
|
|
||||||
[*.{yaml,yml}]
|
[*.{yaml,yml}]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
args:
|
args:
|
||||||
|
|
@ -34,7 +34,7 @@ repos:
|
||||||
\.patch$
|
\.patch$
|
||||||
)
|
)
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.11.11
|
rev: v0.12.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
args:
|
args:
|
||||||
|
|
@ -56,15 +56,14 @@ repos:
|
||||||
files: ^binaries/
|
files: ^binaries/
|
||||||
exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$)
|
exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$)
|
||||||
- repo: https://github.com/scop/pre-commit-shfmt
|
- repo: https://github.com/scop/pre-commit-shfmt
|
||||||
rev: v3.11.0-1
|
rev: v3.12.0-2
|
||||||
hooks:
|
hooks:
|
||||||
- id: shfmt
|
- id: shfmt
|
||||||
args:
|
args:
|
||||||
- --diff
|
- --diff
|
||||||
- --simplify
|
|
||||||
stages: [pre-commit]
|
stages: [pre-commit]
|
||||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
rev: v0.10.0.1
|
rev: v0.11.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||||
|
|
@ -84,7 +83,7 @@ repos:
|
||||||
args:
|
args:
|
||||||
- --strict
|
- --strict
|
||||||
- repo: https://github.com/eslint/eslint
|
- repo: https://github.com/eslint/eslint
|
||||||
rev: v9.27.0
|
rev: v9.33.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: eslint
|
- id: eslint
|
||||||
language_version: 22.14.0
|
language_version: 22.14.0
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ class CheckRefs:
|
||||||
self.inError = True
|
self.inError = True
|
||||||
|
|
||||||
if args.validate_meshes:
|
if args.validate_meshes:
|
||||||
from validate_dae import DaeValidator
|
from validate_dae import DaeValidator # noqa: PLC0415
|
||||||
|
|
||||||
dv = DaeValidator(self.vfs_root, self.mods)
|
dv = DaeValidator(self.vfs_root, self.mods)
|
||||||
self.inError = self.inError or not dv.run()
|
self.inError = self.inError or not dv.run()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Copyright (C) 2024 Wildfire Games.
|
# Copyright (C) 2025 Wildfire Games.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
@ -166,7 +166,7 @@ def compile_and_reflect(input_mod_path, dependencies, stage, path, out_path, def
|
||||||
preprocessor_output_path = os.path.abspath(
|
preprocessor_output_path = os.path.abspath(
|
||||||
os.path.join(os.path.dirname(__file__), "preprocessed_file.glsl")
|
os.path.join(os.path.dirname(__file__), "preprocessed_file.glsl")
|
||||||
)
|
)
|
||||||
execute(command[:-2] + ["-g", "-E", "-o", preprocessor_output_path])
|
execute([*command[:-2], "-g", "-E", "-o", preprocessor_output_path])
|
||||||
raise ValueError(err)
|
raise ValueError(err)
|
||||||
|
|
||||||
spirv_reflect = get_spirv_reflect_location()
|
spirv_reflect = get_spirv_reflect_location()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
# ruff: noqa: SIM115
|
# ruff: noqa: FURB122,SIM115
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue