Skip to content

Commit

Permalink
Merge pull request #916 from Spartan322/merge/bdf625b
Browse files Browse the repository at this point in the history
  • Loading branch information
Spartan322 authored Jan 4, 2025
2 parents 106ba51 + 4ffc9ac commit 13428bb
Show file tree
Hide file tree
Showing 376 changed files with 3,845 additions and 2,760 deletions.
10 changes: 5 additions & 5 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: Inline
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
Expand Down Expand Up @@ -88,7 +88,7 @@ BreakConstructorInitializers: AfterColon
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# CommentPragmas: "^ IWYU pragma:"
# CompactNamespaces: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Expand All @@ -114,7 +114,7 @@ IncludeCategories:
- Regex: ^<.*>$
Priority: 3
# IncludeIsMainRegex: (Test)?$
# IncludeIsMainSourceRegex: ''
# IncludeIsMainSourceRegex: ""
# IndentAccessModifiers: false
# IndentCaseBlocks: false
IndentCaseLabels: true
Expand Down Expand Up @@ -149,8 +149,8 @@ KeepEmptyLinesAtTheStartOfBlocks: false
# LambdaBodyIndentation: Signature
# Language: Cpp
# LineEnding: DeriveLF
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MacroBlockBegin: ""
# MacroBlockEnd: ""
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
Expand Down
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Checks:
- modernize-use-nullptr
- readability-braces-around-statements
- readability-redundant-member-init
HeaderFileExtensions: ['', h, hh, hpp, hxx, inc, glsl]
HeaderFileExtensions: ["", h, hh, hpp, hxx, inc, glsl]
ImplementationFileExtensions: [c, cc, cpp, cxx, m, mm, java]
HeaderFilterRegex: (core|doc|drivers|editor|main|modules|platform|scene|servers|tests)/
FormatStyle: file
Expand Down
31 changes: 31 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# https://clangd.llvm.org/config
---
# Default conditions, apply everywhere.

Diagnostics:
Includes:
IgnoreHeader:
- core/typedefs\.h # Our "main" header, featuring transitive includes; allow everywhere.
- \.compat\.inc
---
# Header-specific conditions.

If:
PathMatch: .*\.(h|hh|hpp|hxx|inc)

# Exclude certain, noisy warnings that lack full context. Replace with lowered severity if/when
# clangd gets diagnostic severity support. (See: https://github.com/clangd/clangd/issues/1937)
CompileFlags:
Add:
- -Wno-unneeded-internal-declaration
- -Wno-unused-const-variable
- -Wno-unused-function
- -Wno-unused-variable
---
# Suppress all third-party warnings.

If:
PathMatch: thirdparty/.*

Diagnostics:
Suppress: "*"
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indent_style = space
indent_size = 4

# YAML requires indentation with spaces instead of tabs.
[*.{yml,yaml}]
[{*.{yml,yaml},.clang{-format,-tidy,d}}]
indent_style = space
indent_size = 2

Expand Down
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ e8542b06acca3c1bdeee4b528411771f0819f084

# Style: Apply clang-tidy fixes (superficial)
bb5f390fb9b466be35a5df7651323d7e66afca31

# Style: Enforce `AllowShortFunctionsOnASingleLine`
e06d83860d798b6766b23d6eae48557387a7db85
2 changes: 1 addition & 1 deletion .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
required: false
sconsflags:
description: Additional SCons flags.
default: ''
default: ""
required: false
scons-cache:
description: The SCons cache path.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-android
cancel-in-progress: true

jobs:
build-android:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ env:
# Used for the godot-cpp checkout.
GODOT_CPP_BRANCH: 4.3

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-cpp-tests
cancel-in-progress: true

jobs:
godot-cpp-tests:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-ios
cancel-in-progress: true

jobs:
ios-template:
runs-on: macos-latest
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ env:
TSAN_OPTIONS: suppressions=misc/error_suppressions/tsan.txt
UBSAN_OPTIONS: suppressions=misc/error_suppressions/ubsan.txt

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-linux
cancel-in-progress: true

jobs:
build-linux:
# Stay one LTS before latest to increase portability of Linux artifacts.
Expand Down Expand Up @@ -129,7 +125,7 @@ jobs:
continue-on-error: true

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

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

- name: Compilation
uses: ./.github/actions/godot-build
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-macos
cancel-in-progress: true

jobs:
build-macos:
runs-on: macos-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: 🔗 GHA
on: [push, pull_request, merge_group]

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-runner
group: ${{ github.workflow }}|${{ github.ref_name }}
cancel-in-progress: true

jobs:
# First stage: Only static checks, fast and prevent expensive builds from running.

static-checks:
if: '!vars.DISABLE_GODOT_CI'
if: "!vars.DISABLE_GODOT_CI"
name: 📊 Static checks
uses: ./.github/workflows/static_checks.yml

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: 📊 Static Checks
on:
workflow_call:

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-static
cancel-in-progress: true

jobs:
static-checks:
name: Code style, file formatting, and docs
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ env:
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no use_closure_compiler=yes strict_checks=yes
EM_VERSION: 3.1.64

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-web
cancel-in-progress: true

jobs:
web-template:
runs-on: ubuntu-24.04
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ env:
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/"
SCONS_CACHE_MSVC_CONFIG: true

concurrency:
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-windows
cancel-in-progress: true

jobs:
build-windows:
# Windows 10 with latest image
Expand Down
76 changes: 27 additions & 49 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ default_language_version:
exclude: |
(?x)^(
.*thirdparty/.*|
.*-so_wrap\.(h|c)$
)
.*-so_wrap\.(h|c)|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/google/.*
)$
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
Expand All @@ -14,23 +16,13 @@ repos:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
exclude: ^tests/python_build/.*
- id: clang-format
name: clang-format-glsl
files: \.glsl$
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
args: ['-style=file:misc/utility/.clang-format-glsl']
exclude: ^tests/python_build/.*
args: [-style=file:misc/utility/clang_format_glsl.yml]

- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
Expand All @@ -39,12 +31,7 @@ repos:
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
args: [--fix, --quiet, --use-color]
types_or: [text]
exclude: |
(?x)^(
tests/python_build/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
exclude: ^tests/python_build/.*
additional_dependencies: [clang-tidy==19.1.0]
require_serial: true
stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy`
Expand All @@ -71,11 +58,6 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
exclude: |
(?x)^(
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*
)
additional_dependencies: [tomli]

- id: codespell
Expand Down Expand Up @@ -152,10 +134,10 @@ repos:
- --config
- platform/web/eslint.config.cjs
additional_dependencies:
- '@eslint/js@^9.3.0'
- '@html-eslint/eslint-plugin@^0.24.1'
- '@html-eslint/parser@^0.24.1'
- '@stylistic/eslint-plugin@^2.1.0'
- "@eslint/js@^9.3.0"
- "@html-eslint/eslint-plugin@^0.24.1"
- "@html-eslint/parser@^0.24.1"
- "@stylistic/eslint-plugin@^2.1.0"
- eslint@^9.3.0
- eslint-plugin-html@^8.1.1
- globals@^15.3.0
Expand All @@ -173,7 +155,7 @@ repos:
- platform/web/js/engine/config.js
- platform/web/js/engine/features.js
- --destination
- ''
- ""
- -d
- dry-run
pass_filenames: false
Expand All @@ -194,14 +176,12 @@ repos:
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java)$
exclude: |
(?x)^(
core/math/bvh_.*\.inc$|
core/math/bvh_.*\.inc|
platform/(?!android|ios|linuxbsd|macos|web|windows)\w+/.*|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/.*|
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java$|
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java$|
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix\.java$
)
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView\.java|
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper\.java|
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix\.java
)$
- id: header-guards
name: header-guards
Expand All @@ -217,17 +197,15 @@ repos:
types_or: [text]
exclude: |
(?x)^(
.*\.test\.txt$|
.*\.svg$|
.*\.patch$|
.*\.out$|
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/google/.*|
tests/data/.*\.bin$
)
.*\.test\.txt|
.*\.svg|
.*\.patch|
.*\.out|
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd|
tests/data/.*\.bin
)$
- id: dotnet-format
name: dotnet-format
Expand Down
2 changes: 1 addition & 1 deletion core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ ProjectSettings::ProjectSettings() {
// installed by the scripts provided in the repository
// (check `misc/scripts/install_d3d12_sdk_windows.py`).
// For example, if the script installs 1.613.3, the default value must be 613.
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version"), 613);
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_slider"), 613);

GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
Expand Down
14 changes: 9 additions & 5 deletions core/io/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@

class Node;

#define RES_BASE_EXTENSION(m_ext) \
public: \
static void register_custom_data_to_otdb() { ClassDB::add_resource_base_extension(m_ext, get_class_static()); } \
virtual String get_base_extension() const override { return m_ext; } \
\
#define RES_BASE_EXTENSION(m_ext) \
public: \
static void register_custom_data_to_otdb() { \
ClassDB::add_resource_base_extension(m_ext, get_class_static()); \
} \
virtual String get_base_extension() const override { \
return m_ext; \
} \
\
private:

class Resource : public RefCounted {
Expand Down
Loading

0 comments on commit 13428bb

Please sign in to comment.