Open mousetraps opened 7 years ago
I'd recommend considering Drupal as well. It makes heavy use of namespaces, classes, interfaces, traits, etc. I'm pretty sure the old testing framework still has some legacy functional-style programming in there too.
Done! see #24.
BTW, if you want to analyze the failures, the easiest way to do so is to open the tests/output/drupal
folder using the syntax visualizer extension after running the validation tests - you'll see error squigglies wherever we fail to parse correctly (presuming the code is indeed valid) and can inspect the adjacent .ast
file for more info.
Also great call - Drupal is 3x bigger than WordPress, so it'll be a good perf optimization challenge.
@mousetraps Not sure if you saw or not, but there are a few extra file extensions that you need to look for in the Drupal codebase if you're going to parse every file that contains PHP code. Those extensions are: .theme, .profile, .module, and .engine. There may be a few .test files, but it's possible that those have been removed.
@cweagans I did not - thanks for the heads up. Currently it only tests *.php files - https://github.com/Microsoft/tolerant-php-parser/blob/master/tests/ParserFrameworkValidationTests.php#L27
We continually run tests on:
We should add more frameworks to the list (and feel free to make a PR - to add another submodule:
git submodule add <git url> validation/frameworks/<framework-name>
)