From fdbc06d5f3a97c2d3849ec4d767318f422d28e38 Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Mon, 3 Jun 2024 22:06:30 -0300 Subject: [PATCH] Add SVG pre-commit check to avoid fill/stroke in style tags --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12240aef939d..b0b431523443 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -174,6 +174,13 @@ repos: entry: python misc/scripts/dotnet_format.py types_or: [c#] + - id: svg-check + name: svg-check + args: [--multiline] + entry: (?si)style=(\"|\')(.+)?(fill|stop-color|stroke)( +)?:(.+)?(\1) + language: pygrep + types: [svg] + # End of upstream Godot pre-commit hooks. # # Keep this separation to let downstream forks add their own hooks to this file,