Code inspections unofficial specifications?

I'm building a plugin and part of it will map code inspections for the resulting violations found. Is there any documentation beyond the API (http://javadoc.jetbrains.net/teamcity/openapi/8.0/jetbrains/buildServer/agent/inspections/InspectionInstance.html) for InspectionInstance and InspectionTypeInfo and how these are used to display inspection results in the Code Inspection tab?

Specifically here are a few questions I have:

  • I noticed that when a description has a URL in it, the code inspection tab attempts to link to it with a "?" mark instead of showing the description. But it's not linking properly in my case, so the link is broken. What are the rules for including links so they are parsed properly?
  • I noticed that duplicate inspections are only imported as one into the database, is there any rule as to how this works? There are situations where a Class for example may violate a rule twice, the class name will be all that is in the InspectionInstance.Message but I'd still like it to count as two inspection violations, not one. Is this possible?
  • If there is no file path for an inspection instance, what's the best way to get the inspection to display? Currently I'm setting file path to "Unknown". If I leave the path blank the inspections won't show.
  • The FxCop plugin does something different with file path, it seems to build a scope and then append the file path afterward. Is there some way to put something in file path besides just a file path? Is there a specification for these formats? Here's an example of a file path from FxCop:
    • Project.exe/Project/Startup :: src|Code|Startup.cs
    • Whenever I use this format, the "src|Code|Startup.cs" part shows in the tree drill down, but that's not the case for FxCop



Anyways, curious if there is any unofficial documentation that might help better map code inspections.

Thanks
-Wes

2 comments
Comment actions Permalink

Wes, sorry for delay with replying. If the problem is still actual, I'd suggest taking a look at XML Test Reporter plugin, specifically at it's inspections part: http://svn.jetbrains.org/teamcity/plugins/xml-tests-reporting/trunk/agent/src/jetbrains/buildServer/xmlReportPlugin/inspections/
You can also use FxCop plugin as example: http://svn.jetbrains.org/teamcity/plugins/fxcop/

0
Comment actions Permalink

Hey Pavel, I resolved my issue for the most part but still couldn't quite figure out how all of the inspection reporting API works. Perhaps in the future that API will be documented further.

0

Please sign in to leave a comment.