Repository navigation
devops: check php style with dresscode, so an agent's edit can be fixed as it is written - #232
Merged
Merged
Conversation
… fixed as it is written
…no shell and windows finds its binary
4 tasks
This file contains hidden or 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
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.
phpcs with slevomat only reported, so a style mistake surfaced at
make qa. dresscode checks the same rules and can fix them, which lets an agent's edit be corrected as it is written.dresscode.neonkeeps phpcs's three rules and takes over tabs, trailing whitespace, the final newline andstrict_typesfromcli/lint.php. No coding standard is on, so nothing gets reformatted. Those four now needapp/vendor;lint.phpkeeps the parse check, which still runs on a fresh clone. They also cover all ofcli/now, not onlylint.php.Why phpstan moved: dresscode 1.3.1 conflicts with phpstan below 2.3.4, and with the old pin composer quietly resolved 1.3.0.
Why
--jobs 1: dresscode starts its workers throughPHP_BINARY, which underphp-cliis frankenphp, and it takescheckfor a command of its own.Why not nette's
php-fixerplugin: it needs aphpon PATH and has the samePHP_BINARYproblem.make dresscode-hookrunscli/dresscode-hook.phpafter anEditorWriteof a PHP file with the plugin's flags. It leaves rules the file already broke alone and never touches excluded files.dresscode is young, 1.0.0 is from 2026-10-22, but it is a dev dependency, stripped from the package.
make qa,make checkandmake e2epass (171, 40 and 3 scenarios). The rules were proven on a deliberately bad file, and each branch of the hook by piping its JSON in by hand; it has not yet run from a real agent session.