| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Tested briefly, seems fine to me.
We need to update our documentation on how to set-up prek.
I was worried it would require users to have cargo to compile it, but it seems there's a lot of options (too many?) for binary installs: https://github.com/j178/prek#installation
We should figure out what to recommend for our contributors so the steps to set up prek aren't more complex than pre-commit (especially regarding having it in PATH). It seems it's provided as a pip package so pip install prek is at least something we can expect all contributors with a Python/SCons setup to be able to run.
Sorry, something went wrong.
|
For future reference, these are the hook runtimes on my system with prek using prek run --all-files --verbose: check that executables have shebangs.....................................Passed - hook id: check-executables-have-shebangs - duration: 0.01s check that scripts with shebangs are executable..........................Passed - hook id: check-shebang-scripts-are-executable - duration: 0.11s clang-format.............................................................Passed - hook id: clang-format - duration: 5.07s clang-format-glsl........................................................Passed - hook id: clang-format - duration: 28.29s ruff check...............................................................Passed - hook id: ruff-check - duration: 0.03s All checks passed! ruff format..............................................................Passed - hook id: ruff-format - duration: 0.06s 342 files left unchanged mypy.....................................................................Passed - hook id: mypy - duration: 0.10s Success: no issues found in 131 source files codespell................................................................Passed - hook id: codespell - duration: 0.51s Validate files with jsonschema...........................................Passed - hook id: check-jsonschema - duration: 0.19s ok -- validation done make-rst.................................................................Passed - hook id: make-rst - duration: 0.60s Checking for errors in the XML class reference... Generating the RST class reference... Generating the index file... 286 code samples failed parity check. Use --verbose to get more information. No warnings or errors found in the class reference XML. doc-status...............................................................Passed - hook id: doc-status - duration: 0.20s No classes suitable for printing! validate-builders........................................................Passed - hook id: validate-builders - duration: 0.04s validate-xml.............................................................Passed - hook id: validate-xml - duration: 0.46s validate-codeowners......................................................Passed - hook id: validate-codeowners - duration: 0.10s validate-includes........................................................Passed - hook id: validate-includes - duration: 0.10s eslint...................................................................Passed - hook id: eslint - duration: 0.46s jsdoc....................................................................Passed - hook id: jsdoc - duration: 0.15s Dry run... Okay! svgo.....................................................................Passed - hook id: svgo - duration: 0.33s copyright-headers........................................................Passed - hook id: copyright-headers - duration: 0.48s header-guards............................................................Passed - hook id: header-guards - duration: 0.04s file-format..............................................................Passed - hook id: file-format - duration: 0.20s dotnet-format............................................................Passed - hook id: dotnet-format - duration: 49.78s The two hooks that take the most time by a wide margin are dotnet-format, followed by clang-format-glsl. I wonder what we could do to speed those up, especially clang-format-glsl which is much slower than clang-format. Regarding the installation process, pip install prek works well on my end. The dotnet format hook prints a bunch of warnings in verbose mode: Details
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `dotnet format modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests --include modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AllWriteOnly_ScriptProperties.generated.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/AbstractGenericNode(Of T)_ScriptProperties.generated.cs'
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `dotnet format modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests --include modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Foo.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/Generic(Of T)_ScriptPath.generated.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/GenericClass(Of T).NestedClass_ScriptMethods.generated.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/ExportDiagnosticsTests.cs modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/OuterClassPartialModifierAnalyzer.GD0002.cs'
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
|
Sorry, something went wrong.
|
Cherry-picked for 4.6.3. |
Sorry, something went wrong.
|
Cherry-picked for 4.5.3. |
Sorry, something went wrong.
|
This seems to cause a problem in Godot forks. A failure occurs whenever there is a large diff between the branch's previous state and the new state, resulting in an "Argument list too long" error. So essentially, if anyone has a Godot fork, and they just... don't sync their master branch for awhile, then they sync their master branch, prek explodes.
For reference, see this CI run: https://github.com/godot-dimensions/godot/actions/runs/30243286140/job/89904801550 Also, another problem: When a brand new branch is created, the list of changed files is reported as nothing... so the checks completely skip everything, and a style problem would go unchecked until after the user submits that branch as a PR.
EDIT: I submitted #121819 to fix it. |
Sorry, something went wrong.
CI: Replace `pre-commit` with `prek`
CI: Replace `pre-commit` with `prek`
CI: Replace `pre-commit` with `prek`
| Back | FazBrowse Home | New Git URL |
Prek is the latest in a line of toolkits written in Rust meant to serve as drop-in replacements for industry-standard tools. This time, it's a replacement for pre-commit itself, and a damn good one at that. Comparing this repo's action runs, prek's action from a clean base took ~14 seconds, while pre-commit's cached action took ~25 seconds
Prek was ~11 seconds faster without a cache than pre-commit with a cache
It truly is a drop-in replacement, as the tool reads from .pre-commit-config.yaml without issue. This means that users utilizing pre-commit directly may continue to do so at this time. It's entirely capable of reading from its own dedicated file—prek.toml—and supports unique configurations which aren't supported by pre-commit, but this PR aims to be as painless of a drop-in replacement as possible. It's unique options and dedicated file can be pursued in a followup, if desired