|
@@ -1,3 +1,9 @@
|
|
|
|
+exclude: |
|
|
|
|
+ (?x)^(
|
|
|
|
+ .*thirdparty/.*|
|
|
|
|
+ .*-so_wrap\.(h|c)$
|
|
|
|
+ )
|
|
|
|
+
|
|
repos:
|
|
repos:
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
rev: v17.0.6
|
|
rev: v17.0.6
|
|
@@ -7,10 +13,8 @@ repos:
|
|
types_or: [text]
|
|
types_or: [text]
|
|
exclude: |
|
|
exclude: |
|
|
(?x)^(
|
|
(?x)^(
|
|
- tests/python_build.*|
|
|
|
|
- .*thirdparty.*|
|
|
|
|
- .*platform/android/java/lib/src/com.*|
|
|
|
|
- .*-so_wrap.*
|
|
|
|
|
|
+ tests/python_build/.*|
|
|
|
|
+ platform/android/java/lib/src/com/.*
|
|
)
|
|
)
|
|
|
|
|
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
@@ -19,33 +23,155 @@ repos:
|
|
- id: black
|
|
- id: black
|
|
files: (\.py$|SConstruct|SCsub)
|
|
files: (\.py$|SConstruct|SCsub)
|
|
types_or: [text]
|
|
types_or: [text]
|
|
- exclude: .*thirdparty.*
|
|
|
|
args:
|
|
args:
|
|
- --line-length=120
|
|
- --line-length=120
|
|
|
|
|
|
|
|
+ - repo: https://github.com/pre-commit/mirrors-mypy
|
|
|
|
+ rev: v0.971
|
|
|
|
+ hooks:
|
|
|
|
+ - id: mypy
|
|
|
|
+ files: \.py$
|
|
|
|
+ types_or: [text]
|
|
|
|
+ args: [--config-file=./misc/scripts/mypy.ini]
|
|
|
|
+
|
|
|
|
+ - repo: https://github.com/codespell-project/codespell
|
|
|
|
+ rev: v2.2.6
|
|
|
|
+ hooks:
|
|
|
|
+ - id: codespell
|
|
|
|
+ types_or: [text]
|
|
|
|
+ exclude: |
|
|
|
|
+ (?x)^(
|
|
|
|
+ .*\.desktop$|
|
|
|
|
+ .*\.gitignore$|
|
|
|
|
+ .*\.po$|
|
|
|
|
+ .*\.pot$|
|
|
|
|
+ .*\.rc$|
|
|
|
|
+ \.mailmap$|
|
|
|
|
+ AUTHORS.md$|
|
|
|
|
+ COPYRIGHT.txt$|
|
|
|
|
+ DONORS.md$|
|
|
|
|
+ core/input/gamecontrollerdb.txt$|
|
|
|
|
+ core/string/locales.h$|
|
|
|
|
+ editor/project_converter_3_to_4.cpp$|
|
|
|
|
+ platform/android/java/lib/src/com/.*|
|
|
|
|
+ platform/web/package-lock.json$
|
|
|
|
+ )
|
|
|
|
+ args:
|
|
|
|
+ - --enable-colors
|
|
|
|
+ - --write-changes
|
|
|
|
+ - --check-hidden
|
|
|
|
+ - --quiet-level
|
|
|
|
+ - '3'
|
|
|
|
+ - --ignore-words-list
|
|
|
|
+ - aesthetic,aesthetics,breaked,cancelled,colour,curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,thirdparty,vai
|
|
|
|
+ - --builtin
|
|
|
|
+ - clear,rare,en-GB_to_en-US
|
|
|
|
+
|
|
|
|
+ ### Requires Docker; look into alternative implementation.
|
|
|
|
+ # - repo: https://github.com/comkieffer/pre-commit-xmllint.git
|
|
|
|
+ # rev: 1.0.0
|
|
|
|
+ # hooks:
|
|
|
|
+ # - id: xmllint
|
|
|
|
+ # language: docker
|
|
|
|
+ # types_or: [text]
|
|
|
|
+ # files: ^(doc/classes|.*/doc_classes)/.*\.xml$
|
|
|
|
+ # args: [--schema, doc/class.xsd]
|
|
|
|
+
|
|
|
|
+ - repo: https://github.com/pre-commit/mirrors-eslint
|
|
|
|
+ rev: v8.46.0
|
|
|
|
+ hooks:
|
|
|
|
+ - id: eslint
|
|
|
|
+ name: eslint-engine
|
|
|
|
+ files: ^(platform/web/js/engine/|js/jsdoc2rst/).*\.js$
|
|
|
|
+ args: [--fix, --no-eslintrc, --config, platform/web/.eslintrc.engine.js]
|
|
|
|
+ additional_dependencies: &eslint-deps
|
|
|
|
+ - [email protected]
|
|
|
|
+ - [email protected]
|
|
|
|
+ - [email protected]
|
|
|
|
+ - [email protected]
|
|
|
|
+ - '@html-eslint/[email protected]'
|
|
|
|
+ - '@html-eslint/[email protected]'
|
|
|
|
+ - id: eslint
|
|
|
|
+ name: eslint-libs
|
|
|
|
+ files: ^(platform/web/js/libs/|modules/).*\.js$
|
|
|
|
+ args: [--fix, --no-eslintrc, --config, platform/web/.eslintrc.libs.js]
|
|
|
|
+ additional_dependencies: *eslint-deps
|
|
|
|
+ - id: eslint
|
|
|
|
+ name: eslint-sw
|
|
|
|
+ files: ^misc/dist/html/service-worker\.js$
|
|
|
|
+ args: [--fix, --no-eslintrc, --config, platform/web/.eslintrc.sw.js]
|
|
|
|
+ additional_dependencies: *eslint-deps
|
|
|
|
+ - id: eslint
|
|
|
|
+ name: eslint-html
|
|
|
|
+ files: ^misc/dist/html/.*\.html$
|
|
|
|
+ types: [html]
|
|
|
|
+ args: [--fix, --no-eslintrc, --config, platform/web/.eslintrc.html.js]
|
|
|
|
+ additional_dependencies: *eslint-deps
|
|
|
|
+
|
|
- repo: local
|
|
- repo: local
|
|
hooks:
|
|
hooks:
|
|
- id: make-rst
|
|
- id: make-rst
|
|
name: make-rst
|
|
name: make-rst
|
|
|
|
+ language: python
|
|
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
|
|
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
|
|
pass_filenames: false
|
|
pass_filenames: false
|
|
|
|
+ files: ^(doc/classes|.*/doc_classes)/.*\.xml$
|
|
|
|
+
|
|
|
|
+ - id: doc-status
|
|
|
|
+ name: doc-status
|
|
language: python
|
|
language: python
|
|
- files: ^(doc|modules|platform).*xml$
|
|
|
|
|
|
+ entry: python3 doc/tools/doc_status.py
|
|
|
|
+ files: ^(doc/classes|.*/doc_classes)/.*\.xml$
|
|
|
|
+
|
|
|
|
+ - id: jsdoc
|
|
|
|
+ name: jsdoc
|
|
|
|
+ language: node
|
|
|
|
+ entry: jsdoc
|
|
|
|
+ files: ^platform/web/js/engine/(engine|config|features)\.js$
|
|
|
|
+ args: [--template, platform/web/js/jsdoc2rst/, --destination, '', -d, dry-run]
|
|
|
|
+ additional_dependencies: ["[email protected]"]
|
|
|
|
|
|
- id: copyright-headers
|
|
- id: copyright-headers
|
|
name: copyright-headers
|
|
name: copyright-headers
|
|
language: python
|
|
language: python
|
|
- files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$
|
|
|
|
entry: python3 misc/scripts/copyright_headers.py
|
|
entry: python3 misc/scripts/copyright_headers.py
|
|
|
|
+ files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$
|
|
exclude: |
|
|
exclude: |
|
|
(?x)^(
|
|
(?x)^(
|
|
- .*thirdparty.*|
|
|
|
|
- .*-so_wrap.*|
|
|
|
|
core/math/bvh_.*\.inc$|
|
|
core/math/bvh_.*\.inc$|
|
|
- platform/android/java/lib/src/com.*|
|
|
|
|
- platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.*|
|
|
|
|
- platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper.*|
|
|
|
|
- platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.*
|
|
|
|
|
|
+ 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$
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ - id: header-guards
|
|
|
|
+ name: header-guards
|
|
|
|
+ language: python
|
|
|
|
+ entry: python3 misc/scripts/header_guards.py
|
|
|
|
+ files: \.(h|hpp)$
|
|
|
|
+ exclude: |
|
|
|
|
+ (?x)^(
|
|
|
|
+ .*/thread\.h$|
|
|
|
|
+ .*/platform_config\.h$|
|
|
|
|
+ .*/platform_gl\.$h
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ - id: file-format
|
|
|
|
+ name: file-format
|
|
|
|
+ language: python
|
|
|
|
+ entry: python3 misc/scripts/file_format.py
|
|
|
|
+ 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\.notest\.gd$|
|
|
|
|
+ modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.notest\.gd$|
|
|
|
|
+ platform/android/java/lib/src/com/google/.*
|
|
)
|
|
)
|
|
|
|
|
|
- id: dotnet-format
|
|
- id: dotnet-format
|