Skip to content

Commit 01eb00e

Browse files
authored
Add CLAUDE.md (#403)
2 parents 7187876 + 76dfa01 commit 01eb00e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# PHPStan Disallowed Calls
2+
3+
## Running tests
4+
5+
```bash
6+
composer test
7+
```
8+
9+
Runs lint, neon lint, phpcs, phpstan, and phpunit in sequence. PHPStan is at `vendor/phpstan/phpstan/phpstan.phar`.
10+
11+
## Test structure
12+
13+
Rule-analysis tests extend `RuleTestCase`. The rule configuration is passed inline in `getRule()`, not via neon files. `$this->analyse()` takes a fixture file and an array of expected errors as `[message, line]` or `[message, line, tip]` tuples. Some tests load `extension.neon` via `getAdditionalConfigFiles()`.
14+
15+
Test classes live in `tests/Calls/`, `tests/Usages/`, `tests/ControlStructures/` etc. Fixture files (PHP files analysed by the tests) live in `tests/src/`.
16+
17+
## Project structure
18+
19+
`extension.neon` is the entry point wiring all rules together. Each feature has its own documentation file in `docs/` — new features get their own doc or extend an existing one.
20+
21+
`disallow*` config keys are generally aliases for their `allowExcept*` counterparts, handled in `AllowedConfigFactory`.
22+
23+
## Commit message style
24+
25+
No "fix" in titles. The extended message explains why, not how.
26+
27+
## PR description style
28+
29+
No bullet points, no `## Summary` header. Write in sentences. No test plan section.

0 commit comments

Comments
 (0)