diff --git a/.gitattributes b/.gitattributes index 7811fd5d1..c475f468f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,60 +1,2 @@ -# Drupal git normalization -# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html -# @see https://www.drupal.org/node/1542048 -# Normally these settings would be done with macro attributes for improved -# readability and easier maintenance. However macros can only be defined at the -# repository root directory. Drupal avoids making any assumptions about where it -# is installed. -# Define text file attributes. -# - Treat them as text. -# - Ensure no CRLF line-endings, neither on checkout nor on checkin. -# - Detect whitespace errors. -# - Exposed by default in `git diff --color` on the CLI. -# - Validate with `git diff --check`. -# - Deny applying with `git apply --whitespace=error-all`. -# - Fix automatically with `git apply --whitespace=fix`. -*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html -*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php -*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 -# PHPStan's baseline uses tabs instead of spaces. -core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php -# Define binary file attributes. -# - Do not treat them as text. -# - Include binary diff in patches instead of "binary files differ." -*.avif -text diff -*.eot -text diff -*.exe -text diff -*.gif -text diff -*.gz -text diff -*.ico -text diff -*.jpeg -text diff -*.jpg -text diff -*.otf -text diff -*.phar -text diff +# Git LFS *.png filter=lfs diff=lfs merge=lfs -text -*.svgz -text diff -*.ttf -text diff -*.woff -text diff -*.woff2 -text diff diff --git a/composer.json b/composer.json index 93ec45136..29988b2ea 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ }, "require-dev": { "ext-dom": "*", + "aarongilmartinez/gitattributes-guard": "dev-OEL-4914", "composer/installers": "^1.11", "drupal/config_devel": "^1.10", "drupal/core-composer-scaffold": "^10.3 || ^11", @@ -37,6 +38,10 @@ { "type": "git", "url": "https://github.com/openeuropa/code-review-drupal.git" + }, + { + "type": "git", + "url": "https://github.com/AaronGilMartinez/gitattributes-guard.git" } ], "autoload": { @@ -73,6 +78,7 @@ "config": { "sort-packages": true, "allow-plugins": { + "aarongilmartinez/gitattributes-guard": true, "composer/installers": true, "cweagans/composer-patches": true, "dealerdirect/phpcodesniffer-composer-installer": true, @@ -81,6 +87,7 @@ "php-http/discovery": false, "phpro/grumphp-shim": true, "phpstan/extension-installer": true, + "symfony/runtime": true, "tbachert/spi": false } }