stickee / canary
Canary provides linting and static analysis for Stickee Laravel projects
Installs: 11 305
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Type:metapackage
Requires
- php: ^8.3
- composer-runtime-api: ^2.2.2
- stickee/larastan-config: ^3.0.0
- stickee/php-cs-fixer-config: ^3.0.0
- stickee/rector-config: ^4.0.0
Requires (Dev)
- roave/security-advisories: dev-latest
- dev-main
- v4.x-dev
- v4.0.0
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/composer/main/stickee/php-cs-fixer-config-tw-3.0.1
- dev-feat/composer-metapackage
- dev-chore/deps-larastan-config
- dev-chore/deps-php-cs-fixer-config
- dev-feat/install-in-root
This package is auto-updated.
Last update: 2025-02-06 13:45:33 UTC
README
Introduction
Canary provides linting and static analysis for stickee Laravel projects.
It includes:
- the stickee PHP CS Fixer config to adhere to our code styles
- the stickee Larastan config to analyse your code
- the stickee Rector config to refactor your code
Installation
Composer
composer require --dev stickee/canary
Config
cp vendor/stickee/php-cs-fixer-config/dist/.php-cs-fixer.php . cp vendor/stickee/larastan-config/dist/phpstan.dist.neon . cp vendor/stickee/larastan-config/dist/phpstan.ci.neon . cp vendor/stickee/rector-config/dist/rector.php .
You should commit these config files.
.gitignore
if grep -q '.php-cs-fixer.cache' .gitignore; then echo ".gitignore contains .php-cs-fixer.cache"; else echo "Adding .php-cs-fixer.cache to .gitignore"; echo ".php-cs-fixer.cache" >> .gitignore; echo "Done"; fi
Usage
Canary provides a unified package that brings together powerful linting and static analysis tools that we make heavy use of at stickee.
Tools
analyse
vendor/bin/phpstan analyse -c phpstan.dist.neon
This command will perform static-analysis of your whole project.
It could be ran as part of a pre-commit
hook.
See stickee/larastan-config for more details.
fix
vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php
This command will attempt to fix minor code style issues.
It can be ran against a single file.
It could be ran against staged files as part of a pre-commit
hook.
See stickee/php-cs-fixer-config for more details.
improve
vendor/bin/rector
This command will refactor your code in an attempt to improve it.
Any improve
d code must be checked before committing.
It can be ran against a single file.
It should not be ran as part of a pre-commit
hook.
See stickee/rector-config for more details.
suggest
Rector in --dry-run
mode
vendor/bin/rector --dry-run
This command will suggest improvements as diffs in the terminal.
See stickee/rector-config for more details.
Contributions
Contributions are welcome!
Improvements to any of the amalgamated open source tools should be directed towards their respective repositories.
License
Canary is open source software licensed under the MIT license.