fix: reduce false positives in checkpoints#18
Conversation
…eckpoints PM-01/PM-02: Use command type to check multiple PHPStan config paths (phpstan.neon, Build/phpstan.neon, phpstan.neon.dist) instead of file_exists/regex with brace expansion. PM-07/PM-08: Change from regex to contains type for strict_types check, removing implicit line-position requirement. PM-16/PM-17: Use composer show --dev to detect both direct and transitive dev dependencies instead of checking composer.json require-dev directly. Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines several checkpoint definitions within the PHP modernization skill to significantly reduce false positives and negatives. The changes involve migrating from less flexible checking mechanisms like Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request improves several checks in the checkpoints.yaml file to reduce false positives and make them more robust. The changes to use command type for checking PHPStan configuration (PM-01, PM-02) and dev dependencies (PM-16, PM-17) are solid improvements that correctly handle more project structures and transitive dependencies.
However, the change for strict_types checks (PM-07, PM-08) from regex to contains introduces a new risk of false negatives due to its rigid string matching. I've added comments with suggestions to use a command-based check instead, which would provide a more robust solution by allowing for flexible pattern matching across entire files.
Summary
file_exists/regexwith brace expansion tocommandtype, supportingphpstan.neon,Build/phpstan.neon, andphpstan.neon.distregextocontainstype, removing implicit line-position requirement that caused false negatives when declaration wasn't on expected linejson_pathoncomposer.jsontocomposer show --devcommand, catching both direct and transitive dependencies (e.g., via shared CI packages)Test plan
Build/phpstan.neonexists but rootphpstan.neondoes notdeclare(strict_types=1)appears in the file