generated from tighten/php-package-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pint, PHP-CS-Fixer, and reconfigure #43
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
driftingly
changed the title
[WIP] Add Pint and PHP-CS-Fixer and reconfigure
Add Pint and PHP-CS-Fixer and reconfigure
Oct 4, 2022
driftingly
changed the title
Add Pint and PHP-CS-Fixer and reconfigure
Add Pint, PHP-CS-Fixer, and reconfigure
Oct 4, 2022
driftingly
requested review from
mattstauffer,
damiani,
bakerkretzmar and
sbine
October 4, 2022 20:27
Add the ability to accept n number of paths which can be passed down to the included linters
sbine
approved these changes
Oct 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 👍 from me as soon as the one suggestion is addressed
Co-authored-by: Sara Bine <sara@sarabine.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves Duster's coding standards away from Tighten Coding Standard and introduces Laravel Pint.
Laravel Pint has appeared as the de facto standard for code style and fixes for the Laravel community. We extend Pint's Laravel preset to add some Tighten-specific rules.
Since Pint is built around rules that can be automatically fixed, we'll still rely on PHP_CodeSniffer to catch issues that require manual intervention. Most of these come from PSR1.
This PR also relies on a custom PHP-CS-Fixer rule to order class elements. This can be removed as soon as this PR from @bakerkretzmar is merged or Pint allows additional customizations.
Notable Changes
The
duster init
command is no longer required. Duster will use any config files if they exist but will fall back to passing Duster's own config file.To replace generating GitHub Actions via the
init
command a newgithub-actions
command has been added.Duster now accepts path arguments which can be passed in when using Duster with Husky and lint-staged:
Supplied paths with a specific tool:
The GitHub action stub now runs
duster
instead of each tool separately.The help command received colours:
Once merged it will deprecate Tighten Coding Standard and allows TLint to focus on things these tools cannot do.
Closes tighten/tlint#294
Closes tighten/tlint#290
Closes tighten/tlint#280
Closes tighten/tlint#161