Skip to content

Add shipmonk/dead-code-detector to PHPStan config#91

Merged
spaze merged 3 commits into
mainfrom
spaze/dead-code-detector
Apr 11, 2026
Merged

Add shipmonk/dead-code-detector to PHPStan config#91
spaze merged 3 commits into
mainfrom
spaze/dead-code-detector

Conversation

@spaze

@spaze spaze commented Apr 11, 2026

Copy link
Copy Markdown
Owner

And fix some problems so that it runs with no errors or warnings.

https://github.com/shipmonk-rnd/dead-code-detector

Close #87

@spaze spaze self-assigned this Apr 11, 2026
Copilot AI review requested due to automatic review settings April 11, 2026 14:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates ShipMonk’s dead-code-detector into the existing PHPStan setup and makes small supporting adjustments so the static analysis configuration runs cleanly in this repository.

Changes:

  • Add shipmonk/dead-code-detector as a dev dependency and include its PHPStan ruleset.
  • Tighten a test phpdoc type to improve static analysis signal.
  • Ignore GnuPG agent socket files created during signature-related tests.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
composer.json Adds shipmonk/dead-code-detector to require-dev to enable dead-code analysis tooling.
phpstan.neon Includes dead-code-detector’s rules.neon so its rules run as part of composer phpstan.
tests/SecurityTxtTest.phpt Updates phpdoc typing (and import) to better inform PHPStan about the $fieldClass parameter.
.gitignore Ignores S.gpg-agent* artifacts produced under the gnupg test directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/SecurityTxtTest.phpt
@spaze
spaze force-pushed the spaze/dead-code-detector branch from c8be72f to 9fdc645 Compare April 11, 2026 15:00
@spaze
spaze requested a review from Copilot April 11, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spaze
spaze merged commit 244b671 into main Apr 11, 2026
10 checks passed
@spaze
spaze deleted the spaze/dead-code-detector branch April 11, 2026 15:03
@spaze spaze mentioned this pull request Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Dead code detector

2 participants