Skip to content

Commit

Permalink
chore: Add Laravel Pint Setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ucan-lab committed May 4, 2024
1 parent 188471c commit cf30dd5
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/testing-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Testing Pull Request
on:
pull_request:
types: [synchronize, opened, reopened]
jobs:
pint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-scripts --no-ansi
- name: Pint Testing
run: ./vendor/bin/pint -v --test
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.phpunit.cache
/.pint.cache
/node_modules
/public/build
/public/hot
Expand Down
32 changes: 32 additions & 0 deletions src/pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"preset": "laravel",
"cache-file": ".pint.cache",
"exclude": [
"database/migrations"
],
"rules": {
"concat_space": false,
"date_time_immutable": true,
"declare_parentheses": true,
"declare_strict_types": true,
"final_class": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"mb_str_functions": true,
"new_with_braces": true,
"no_superfluous_phpdoc_tags": true,
"not_operator_with_successor_space": true,
"phpdoc_align": {
"align": "left"
},
"phpdoc_separation": false,
"php_unit_test_case_static_method_calls": {
"call_type": "this"
},
"simplified_if_return": true,
"simplified_null_return": true
}
}

0 comments on commit cf30dd5

Please sign in to comment.