microsoft / microsoft/tolerant-php-parser
Add PHP static analyzers (of element types) to build checks?
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 894
- Forks
- 85
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Similar to #83
Motivation:
- More likely that phpdoc will remain accurate when refactoring
- Improved autocompletion and error detection in projects using tolerant-php-parser
- Detect potential bugs in new commits/PRs that may be undetected by unit tests
There are several open source PHP static analyzers, such as https://github.com/phan/phan (which I maintain) and https://github.com/vimeo/psalm
-
https://github.com/Microsoft/tolerant-php-parser/pull/176/files and https://github.com/Microsoft/tolerant-php-parser/pull/177/files were (the more obvious) issues detected using phan while I was working on a project to convert this to another AST format.
-
An example of how this may be set up is https://github.com/TysonAndre/tolerant-php-parser/commit/daa503d776b52d609fa7b5fac010b6d6316df7c3 (example output at https://travis-ci.org/TysonAndre/tolerant-php-parser/jobs/277628702)
(Both phan and psalm have ways to suppress categories of issues and individual issues)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reviewing the repository's existing build checks, then compare the phan and psalm examples and linked analyzer-detected pull requests; define the analyzer, suppression policy, and CI success criteria before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100