简体   繁体   中英

Convert FindBugs custom rule to SonarQube

Last year I wrote a custom FindBugs rule with requirements as described in this Stackoverflow post . I would like to write this rule using the new SonarQube Java rules. I located general custom rule documentation on SonarQube's site which links to samples, etc.

Is there documentation describing how to convert a custom FindBugs rule written in Java to SonarQube format? Given the number of rules the SonarQube team has converted, I was hoping there might be basic guidance to use as a starting point, but I haven't located anything in my Google searching.

The hardest part about rewriting a FindBugs rule in a SonarQube plugin is understanding what the rule does. After that it's just a matter of implementing the proper logic.

Since you wrote the logic of the original rule, you've already won half the battle. The rest is pure implementation & unfortunately there are no shortcuts. If you have specific API questions, though you can get them answered in the SonarQube Google group

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM