Skip to content

Commit

Permalink
qa: add todo-check to composer commands
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Jul 7, 2023
1 parent e8ca2ff commit 504d509
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/quality-assurance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
- uses: "ramsey/composer-install@v2"

- name: Checking for forgotten TODO
run: |
! git --no-pager grep --extended-regexp --ignore-case 'todo|fixme' -- ':!*/quality-assurance.yml'
run: composer check-todo

- name: Running Psalm (without plugin installed)
run: php vendor/bin/psalm --config=tests/StaticAnalysis/psalm-without-plugin.xml
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
"phpstan --configuration=tests/StaticAnalysis/phpstan-with-extension.neon.dist",
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
"php-cs-fixer fix --dry-run",
"rector --dry-run"
"rector --dry-run",
"@check-todo"
],
"check-todo": [
"! git --no-pager grep --extended-regexp --ignore-case 'todo|fixme' -- ':!composer.json' ':!*/quality-assurance.yml'"
],
"fix": [
"@putenv XDEBUG_MODE=off",
Expand Down

0 comments on commit 504d509

Please sign in to comment.