Skip to content

Commit

Permalink
chore: PHPInsights 設定
Browse files Browse the repository at this point in the history
  • Loading branch information
ucan-lab committed May 5, 2024
1 parent 8b268e7 commit c7fd1ae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/testing-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
run: ./vendor/bin/pint --verbose --test
- name: PHPStan Analyse
run: ./vendor/bin/phpstan analyse --no-progress
- name: Insights Analyse
run: php artisan insights --no-interaction --no-ansi --format=github-action
- name: Pest Testing
run: |
cp .env.example .env
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ pint-test:
docker compose exec app ./vendor/bin/pint -v --test
stan:
docker compose exec app ./vendor/bin/phpstan analyse
insights:
docker compose exec app php artisan insight --no-interaction --fix
insights-test:
docker compose exec app php artisan insight --no-interaction
12 changes: 12 additions & 0 deletions src/config/insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@
ForbiddenPrivateMethods::class => [
'title' => 'The usage of private methods is not idiomatic in Laravel.',
],
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff::class => [
'lineLimit' => 160,
'absoluteLineLimit' => 180,
],
SlevomatCodingStandard\Sniffs\Commenting\DocCommentSpacingSniff::class => [
'linesCountBeforeFirstContent' => 0,
'linesCountBetweenDescriptionAndAnnotations' => 0,
'linesCountBetweenDifferentAnnotationsTypes' => 0,
'linesCountBetweenAnnotationsGroups' => 0,
'linesCountAfterLastContent' => 0,
'annotationsGroups' => [],
]
],

/*
Expand Down

0 comments on commit c7fd1ae

Please sign in to comment.