diff --git a/.commitlintrc b/.commitlintrc new file mode 100644 index 0000000..9e365a4 --- /dev/null +++ b/.commitlintrc @@ -0,0 +1,92 @@ +{ + "defaultIgnores": true, + "extends": "@commitlint/config-conventional", + "rules": { + "scope-enum": [ + 2, + "always", + [ + "symfony", + "doctrine", + "github", + "pwa", + "api", + "ci", + "deps", + "docker-image", + "github-action" + ] + ], + "scope-empty": [ + 0 + ], + "body-leading-blank": [ + 1, + "always" + ], + "body-max-line-length": [ + 2, + "always", + 100 + ], + "footer-leading-blank": [ + 1, + "always" + ], + "footer-max-line-length": [ + 2, + "always", + 100 + ], + "header-max-length": [ + 2, + "always", + 100 + ], + "subject-case": [ + 2, + "never", + [ + "sentence-case", + "start-case", + "pascal-case", + "upper-case" + ] + ], + "subject-empty": [ + 2, + "never" + ], + "subject-full-stop": [ + 2, + "never", + "." + ], + "type-case": [ + 2, + "always", + "lower-case" + ], + "type-empty": [ + 2, + "never" + ], + "type-enum": [ + 2, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test" + ] + ] + } +} \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fda4781..3c4cb8d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: jobs: static: name: Static Check - uses: kilip/gh-common/.github/workflows/php-lint.yaml@main + uses: kilip/gh-php-common/.github/workflows/static-check.yaml@main with: php_version: 8.3 secrets: inherit diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..cb24c22 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,26 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +HEADER; + +$finder = (new PhpCsFixer\Finder()) + ->in(__DIR__) + ->exclude('var') +; + +return (new PhpCsFixer\Config()) + ->setRules([ + '@Symfony' => true, + 'header_comment' => [ + 'header' => $header, + 'location' => 'after_open', + ], + ]) + ->setFinder($finder) +; \ No newline at end of file