Details
Description
In my project I have two files in the same folder:
vsct_previews.module
vsct_previews.inc
The two suffixes (module, inc) are considered as PHP suffix so the two files are analysed but it seems the plugin is using the filename (without suffix) as identifier for measure (see filename=vsct_previews in the error stack) and it produces the following error:
... [INFO] pdepend ended with returned code '0'. [INFO] Collecting measures... [WARN] The following file doesn't belong to current project sources or tests : [ERROR] Report file is invalid or can't be found, plugin will stop. java.lang.IllegalArgumentException: This measure has already been saved: org.sonar.api.measures.Measure@19fca0c[id=<null>,metric=org.sonar.api.measures.Metric@189ff97[key=class_complexity_distribution,name=Classes distribution /complexity,type=DISTRIB,enabled=true,qualitative=true,direction=0,domain=Complexity,worstValue=<null>,bestValue=<null>,optimizedBestValue=<null>,hidden=false],value=<null>,data=0=0;5=0;10=0;20=0;30=0;60=0;90=0,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,diff1=<null>,diff2=<null>,diff3=<null>],resource: PhpFile[filename=vsct_previews,longName=vsct_previews.vsct_previews,packageKey=vsct_previews,parent=<null>,unitTest=false] at org.sonar.batch.indexer.DefaultSonarIndex.addMeasure(DefaultSonarIndex.java:266) [sonar-batch-2.1.2.jar:na] at org.sonar.batch.indexer.DefaultSonarIndex.saveMeasure(DefaultSonarIndex.java:257) [sonar-batch-2.1.2.jar:na] at org.sonar.batch.DefaultSensorContext.saveMeasure(DefaultSensorContext.java:94) [sonar-batch-2.1.2.jar:na] ...
So I think you should take the whole filename (including suffix) as identifier for a measure.
Activity
Frédéric Leroy
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Frédéric Leroy [ fleroy ] | |
| Fix Version/s | PHP-0.3 [ 16522 ] | |
| Resolution | Fixed [ 1 ] |
Evgeny Mandrikov
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |