Tools

Repository Author Commit message Committed SHA  
 
mcp-inspector by dg added project skeleton
code-checker by dg uses the Runner of nette/command-line
code-checker by dg trailingWhiteSpaceFixer: fixed negative byte count for missing newline at end of file
code-checker by dg utf8Checker: fixed crash on surrogates and overlong sequences
claude-code by dg Released version 2.0.0
claude-code by dg docs: updated from nette/docs
claude-code by dg php-coding-standards: the comments justifying @, == and != have one form, which the nette preset of DressCode accepts
claude-code by dg php-fixer: runs DressCode instead of nette/coding-standard 3 (BC break)

The hook runs the project's vendor/bin/dresscode, or the global one, DressCode 1.3 or newer, with the nearest dresscode.neon and the Nette coding standard when there is none: fix --format agent --skip-excluded --set mistakes.debugOutput=keep, from the directory of the configuration, with the opcache file cache kept between runs. A file of no PHP project, with neither a configuration nor composer.json above it, such as a scratch script of the agent, is left alone; a .git does not make a project, a home directory kept in Git would make one of every stray file. The text of the format agent goes to the agent as it is, as additionalContext or as an error when something is left; the hook adds its own words only where DressCode did not run (it could not start, it did not finish within 50 s). The hook no longer reads .nette-claude.json: exclusions, standards and decisions are the business of dresscode.neon. docs/php-fixer.md records the decisions.

DressCode gets the file before the edit as --before, so the file keeps the style it writes and what the edit broke of the decisions it follows is fixed wherever it reaches. What is left is listed for the lines the edit wrote, passed as --lines. The range comes from the hunks Claude Code sends as structuredPatch, or from the hunks of a Codex patch placed where their lines after the edit stand exactly once; a new file, a hunk of another shape and a Codex hunk found nowhere or twice give none, and DressCode then lists everything. Never from searching the edited text. hook-input.php hands the session_id to the child processes of a Codex patch, and each child its file as a one-file patch of the sections that edited it. A file Claude Code has just created gets --fix-risky=file.strictTypes.declaration, having no past behaviour the declaration would change.

A user of 1.x has only the global ecs, so the hook formats with it as 1.x did and tells the agent, once a session, to offer the new migrate-to-dresscode skill. The skill installs DressCode into the project when it has PHPStan and globally together with PHPStan otherwise, writes dresscode.neon with typeAnalysis: phpstan, shows the impact with dresscode check and offers to remove nette/coding-standard.

claude-code by dg hooks: extracted reading of .nette-claude.json into hookConfig()

Both isExcluded() and lint-json's jsonc lookup walked up to the config file
and decoded it on their own. hookConfig() now does it once and returns the
hook's section together with the config directory.

coding-standard by dg abandoned in favor of DressCode
claude-code by dg composer.json: updated description, keywords and homepage
phpstan-rules by dg added ExpectTypeReturnTypeExtension for Expect::type()

Expect::type() declares Type (Type|AnyOf since schema 2.0), while the element
it returns depends on the expression: 'int' is a NumberType with min() and
max(), 'int|string' an AnyOf. The extension resolves a constant expression by
asking Expect::type() itself, so it needs no knowledge of the expression
language and its answer follows whatever the installed nette/schema builds; a
non-constant expression, or one the installed version refuses, keeps the
declared type.

phpstan-rules by dg ExpectArrayReturnTypeExtension answers the plain array element instead of Type

Since nette/schema 1.4 an Expect::array() without a shape is an ArrayType,
not a plain Type, so the extension asks Expect::array() for the class the
same way the Expect::type() one does; up to 1.3 the answer stays Type.

phpstan-rules by dg fixed static analysis with PHPStan 2.3
phpstan-rules by dg uses dresscode
phpstan-rules by dg cs
phpstan-rules by dg cs: grouped use statements
phpstan-rules by dg cs: only compiler-optimized functions in use-function imports
phpstan-rules by dg updated github actions
phpstan-rules by dg composer.json: updated description, keywords and homepage
code-checker by dg Released version 3.5.0
code-checker by dg added AGENTS.md
code-checker by dg uses the handler and attributes of nette/command-line
code-checker by dg uses nette/command-line 2.0

The command line is defined by Command and read by Parser, the help is drawn by
HelpRenderer. The two ignored switches are defined as hidden switches. The
requirement reads dev-master until 2.0 is tagged.

Everything a person reads goes through one Console built in the bootstrap and
handed to Checker and to HelpRenderer, so the colors, the width and the answer
whether this is a terminal are decided once, by the stream itself; the static
Console::detectTerminal() the progress used to be gated on is gone. A fatal error
goes through it too, which is how it erases whatever was drawn in place.

The progress dots are a status of that console: it cuts them to the width of the
terminal, draws nothing when the output is redirected, gives the cursor back when
the process dies, and the next line written erases them, so neither the padding to
a fixed forty columns nor the carriage return is needed any more.

A message of a task is stripped of escape sequences before it is colored, since it
may quote the file being checked.

code-checker by dg uses dresscode
code-checker by dg cs: grouped use statements
code-checker by dg cs
code-checker by dg phpSyntaxChecker: understands @phpVersion with an operator, as Tester writes it
code-checker by dg tabIndentationChecker replaced by tabIndentationFixer

Indentation with spaces is converted to tabs and a tabulator inside a line
to a space. The indentation width is detected from the file, rare depths
are ignored so that a mistyped line does not shrink it. A file whose
indentation does not fit the detected width is reported as an error and
left untouched.

code-checker by dg removed tabIndentationPhpChecker
code-checker by dg removed docSyntaxtHinter
code-checker by dg removed invalidPhpDocChecker

Last synchronization: 2026-11-10 08:03:12