Update tooling and config

This commit is contained in:
Timothy Warren 2023-05-19 16:34:07 -04:00
parent 48076eedcd
commit b59e476b87
3 changed files with 48 additions and 15 deletions

View File

@ -2,13 +2,25 @@
default:
@just --list
# Runs rector, showing what changes will be make
rector-dry-run:
tools/vendor/bin/rector process --config=tools/rector.php --dry-run src tests
# -------------------------------------------------------------------
# Front-end stuff
# -------------------------------------------------------------------
# Runs rector, and updates the source files
rector:
tools/vendor/bin/rector process --config=tools/rector.php src tests
# Builds/optimizes JS and CSS
build:
cd frontEndSrc && npm run build && cd ..
# Builds/optimizes CSS
css:
composer run-script build:css
# Builds/optimizes JS
js:
composer run-script build:js
# -------------------------------------------------------------------
# Code Quality and Formatting
# -------------------------------------------------------------------
# Check code formatting
check-fmt:
@ -18,6 +30,22 @@ check-fmt:
fmt:
tools/vendor/bin/php-cs-fixer fix --verbose
# Runs phpstan code check
phpstan:
composer run-script phpstan
# Runs rector, showing what changes will be make
rector-dry-run:
tools/vendor/bin/rector process --config=tools/rector.php --dry-run src tests
# Runs rector, and updates the source files
rector:
tools/vendor/bin/rector process --config=tools/rector.php src tests
# -------------------------------------------------------------------
# Testing
# -------------------------------------------------------------------
# Run tests
test:
composer run-script test
@ -26,10 +54,14 @@ test:
test-update:
composer run-script test-update
# Update the per-file header comments
update-headers:
php tools/update_header_comments.php
# Run unit tests and generate test-coverage report
coverage:
composer run-script coverage
composer run-script coverage
# -------------------------------------------------------------------
# Misc
# -------------------------------------------------------------------
# Update the per-file header comments
update-headers:
php tools/update_header_comments.php

View File

@ -9,11 +9,12 @@ parameters:
- ./console
- index.php
ignoreErrors:
- "#Offset 'fields' does not exist on array#"
- '#Function imagepalletetotruecolor not found#'
- '#Unable to resolve the template type T#'
- '#imagepalletetotruecolor not found#'
- '#Call to an undefined method Aura\\\Html\\\HelperLocator::[a-zA-Z0-9_]+\(\)#'
- '#Call to an undefined method Query\\QueryBuilderInterface::[a-zA-Z0-9_]+\(\)#'
excludes_analyse:
excludePaths:
- src/Ion/Type/Stringy.php
- tests/mocks.php
- vendor
# These are objects that basically can return anything

View File

@ -1,6 +1,6 @@
{
"require": {
"friendsofphp/php-cs-fixer": "^3.6",
"rector/rector": "^0.15.21"
"rector/rector": "^0.16.0"
}
}