Skip to content

Commit 048f844

Browse files
committed
Style: Minor pre-commit & yaml adjustments
1 parent efa1443 commit 048f844

File tree

7 files changed

+36
-58
lines changed

7 files changed

+36
-58
lines changed

.clang-format

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ BreakConstructorInitializers: AfterColon
8888
# BreakInheritanceList: BeforeColon
8989
# BreakStringLiterals: true
9090
ColumnLimit: 0
91-
# CommentPragmas: '^ IWYU pragma:'
91+
# CommentPragmas: "^ IWYU pragma:"
9292
# CompactNamespaces: false
9393
ConstructorInitializerIndentWidth: 8
9494
ContinuationIndentWidth: 8
@@ -114,7 +114,7 @@ IncludeCategories:
114114
- Regex: ^<.*>$
115115
Priority: 3
116116
# IncludeIsMainRegex: (Test)?$
117-
# IncludeIsMainSourceRegex: ''
117+
# IncludeIsMainSourceRegex: ""
118118
# IndentAccessModifiers: false
119119
# IndentCaseBlocks: false
120120
IndentCaseLabels: true
@@ -149,8 +149,8 @@ KeepEmptyLinesAtTheStartOfBlocks: false
149149
# LambdaBodyIndentation: Signature
150150
# Language: Cpp
151151
# LineEnding: DeriveLF
152-
# MacroBlockBegin: ''
153-
# MacroBlockEnd: ''
152+
# MacroBlockBegin: ""
153+
# MacroBlockEnd: ""
154154
# MaxEmptyLinesToKeep: 1
155155
# NamespaceIndentation: None
156156
# ObjCBinPackProtocolList: Auto

.clang-tidy

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Checks:
77
- modernize-use-nullptr
88
- readability-braces-around-statements
99
- readability-redundant-member-init
10-
HeaderFileExtensions: ['', h, hh, hpp, hxx, inc, glsl]
10+
HeaderFileExtensions: ["", h, hh, hpp, hxx, inc, glsl]
1111
ImplementationFileExtensions: [c, cc, cpp, cxx, m, mm, java]
1212
HeaderFilterRegex: (core|doc|drivers|editor|main|modules|platform|scene|servers|tests)/
1313
FormatStyle: file

.github/actions/godot-build/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
required: false
1515
sconsflags:
1616
description: Additional SCons flags.
17-
default: ''
17+
default: ""
1818
required: false
1919
scons-cache:
2020
description: The SCons cache path.

.github/workflows/linux_builds.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
continue-on-error: true
130130

131131
- name: Setup Python and SCons
132-
if: '!matrix.legacy-scons'
132+
if: "!matrix.legacy-scons"
133133
uses: ./.github/actions/godot-deps
134134

135135
- name: Setup Python and SCons (legacy versions)
@@ -150,7 +150,7 @@ jobs:
150150
uses: actions/setup-dotnet@v4
151151
with:
152152
# Targeting the oldest version we want to support to ensure it still builds.
153-
dotnet-version: '8.0.100'
153+
dotnet-version: 8.0.100
154154

155155
- name: Compilation
156156
uses: ./.github/actions/godot-build

.github/workflows/runner.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
# First stage: Only static checks, fast and prevent expensive builds from running.
1010

1111
static-checks:
12-
if: '!vars.DISABLE_GODOT_CI'
12+
if: "!vars.DISABLE_GODOT_CI"
1313
name: 📊 Static checks
1414
uses: ./.github/workflows/static_checks.yml
1515

.pre-commit-config.yaml

+27-49
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ default_language_version:
44
exclude: |
55
(?x)^(
66
.*thirdparty/.*|
7-
.*-so_wrap\.(h|c)$
8-
)
7+
.*-so_wrap\.(h|c)|
8+
platform/android/java/editor/src/main/java/com/android/.*|
9+
platform/android/java/lib/src/com/google/.*
10+
)$
911
1012
repos:
1113
- repo: https://github.com/pre-commit/mirrors-clang-format
@@ -14,23 +16,13 @@ repos:
1416
- id: clang-format
1517
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
1618
types_or: [text]
17-
exclude: |
18-
(?x)^(
19-
tests/python_build/.*|
20-
platform/android/java/editor/src/main/java/com/android/.*|
21-
platform/android/java/lib/src/com/.*
22-
)
19+
exclude: ^tests/python_build/.*
2320
- id: clang-format
2421
name: clang-format-glsl
2522
files: \.glsl$
2623
types_or: [text]
27-
exclude: |
28-
(?x)^(
29-
tests/python_build/.*|
30-
platform/android/java/editor/src/main/java/com/android/.*|
31-
platform/android/java/lib/src/com/.*
32-
)
33-
args: ['-style=file:misc/utility/.clang-format-glsl']
24+
exclude: ^tests/python_build/.*
25+
args: [-style=file:misc/utility/clang_format_glsl.yml]
3426

3527
- repo: https://github.com/pocc/pre-commit-hooks
3628
rev: v1.3.5
@@ -39,12 +31,7 @@ repos:
3931
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
4032
args: [--fix, --quiet, --use-color]
4133
types_or: [text]
42-
exclude: |
43-
(?x)^(
44-
tests/python_build/.*|
45-
platform/android/java/editor/src/main/java/com/android/.*|
46-
platform/android/java/lib/src/com/.*
47-
)
34+
exclude: ^tests/python_build/.*
4835
additional_dependencies: [clang-tidy==19.1.0]
4936
require_serial: true
5037
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
@@ -71,11 +58,6 @@ repos:
7158
rev: v2.3.0
7259
hooks:
7360
- id: codespell
74-
exclude: |
75-
(?x)^(
76-
platform/android/java/editor/src/main/java/com/android/.*|
77-
platform/android/java/lib/src/com/.*
78-
)
7961
additional_dependencies: [tomli]
8062

8163
### Requires Docker; look into alternative implementation.
@@ -118,10 +100,10 @@ repos:
118100
- --config
119101
- platform/web/eslint.config.cjs
120102
additional_dependencies:
121-
- '@eslint/js@^9.3.0'
122-
- '@html-eslint/eslint-plugin@^0.24.1'
123-
- '@html-eslint/parser@^0.24.1'
124-
- '@stylistic/eslint-plugin@^2.1.0'
103+
- "@eslint/js@^9.3.0"
104+
- "@html-eslint/eslint-plugin@^0.24.1"
105+
- "@html-eslint/parser@^0.24.1"
106+
- "@stylistic/eslint-plugin@^2.1.0"
125107
- eslint@^9.3.0
126108
- eslint-plugin-html@^8.1.1
127109
- globals@^15.3.0
@@ -139,7 +121,7 @@ repos:
139121
- platform/web/js/engine/config.js
140122
- platform/web/js/engine/features.js
141123
- --destination
142-
- ''
124+
- ""
143125
- -d
144126
- dry-run
145127
pass_filenames: false
@@ -160,14 +142,12 @@ repos:
160142
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
161143
exclude: |
162144
(?x)^(
163-
core/math/bvh_.*\.inc$|
145+
core/math/bvh_.*\.inc|
164146
platform/(?!android|ios|linuxbsd|macos|web|windows)\w+/.*|
165-
platform/android/java/editor/src/main/java/com/android/.*|
166-
platform/android/java/lib/src/com/.*|
167-
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java$|
168-
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java$|
169-
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix\.java$
170-
)
147+
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java|
148+
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java|
149+
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix\.java
150+
)$
171151
172152
- id: header-guards
173153
name: header-guards
@@ -183,17 +163,15 @@ repos:
183163
types_or: [text]
184164
exclude: |
185165
(?x)^(
186-
.*\.test\.txt$|
187-
.*\.svg$|
188-
.*\.patch$|
189-
.*\.out$|
190-
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$|
191-
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$|
192-
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$|
193-
platform/android/java/editor/src/main/java/com/android/.*|
194-
platform/android/java/lib/src/com/google/.*|
195-
tests/data/.*\.bin$
196-
)
166+
.*\.test\.txt|
167+
.*\.svg|
168+
.*\.patch|
169+
.*\.out|
170+
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd|
171+
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd|
172+
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd|
173+
tests/data/.*\.bin
174+
)$
197175
198176
- id: dotnet-format
199177
name: dotnet-format
File renamed without changes.

0 commit comments

Comments
 (0)