bblfsh / bblfshd

A self-hosted server for source code parsing

Home Page:https://doc.bblf.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate integrating analysis results from PMD

creachadair opened this issue · comments

The PMD tool does a lightweight rules-based static analysis of source code to detect bugs and other potential issues. I had a conversation with @rsoesemann, one of the maintainers of PMD, about some possibilities for integrating analysis results from the tool with UASTs.

I created this issue to track an investigation of what is possible and/or feasible. PMD can be run as a standalone tool on a per-repository basis, so it may be worthwhile for us to use it as a test case for merging annotations with UASTs, as it may be easier to set up than a full static analysis pipeline like Kythe.

Here is the corresponding PMD issue pmd/pmd#2028

@creachadair to get started in PMD you should probably start in https://github.com/pmd/pmd/tree/master/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex where you find als the AST nodes, rules and infrastructure.

The closed source (will be eventually open sourced) parser JORJE for Apex can be found here https://github.com/pmd/pmd/tree/master/pmd-apex-jorje/repo/apex/apex-jorje-lsp-minimized/2019-01-18-a041d7