|
9 | 9 |
|
10 | 10 | import UnusedMavenDependencies |
11 | 11 |
|
12 | | -/* |
| 12 | +/** |
13 | 13 | * A whitelist of binary dependencies that should never be highlighted as unusued. |
14 | 14 | */ |
15 | 15 | predicate whitelist(Dependency d) { |
16 | | - /* |
17 | | - * jsr305 contains package annotations. If a project uses those exclusively, we will |
18 | | - * consider it "unused". |
19 | | - */ |
| 16 | + // jsr305 contains package annotations. If a project uses those exclusively, we will |
| 17 | + // consider it "unused". |
20 | 18 | d.getShortCoordinate() = "com.google.code.findbugs:jsr305" |
21 | 19 | } |
22 | 20 |
|
23 | 21 | from PomDependency d, Pom source |
24 | 22 | where |
25 | 23 | source.getADependency() = d and |
26 | | -/* |
27 | | - * There is not a Pom file for the target of this dependency, so we assume that it was resolved by |
28 | | - * a binary file in the local maven repository. |
29 | | - */ |
| 24 | +// There is not a Pom file for the target of this dependency, so we assume that it was resolved by |
| 25 | +// a binary file in the local maven repository. |
30 | 26 | not exists(Pom target | target = d.getPom()) and |
31 | | -/* |
32 | | - * In order to accurately identify whether this binary dependency is required, we must have identified |
33 | | - * a Maven repository. If we have not found a repository, it's likely that it has a custom path of |
34 | | - * which we are unaware, so do not report any problems. |
35 | | - */ |
| 27 | +// In order to accurately identify whether this binary dependency is required, we must have identified |
| 28 | +// a Maven repository. If we have not found a repository, it's likely that it has a custom path of |
| 29 | +// which we are unaware, so do not report any problems. |
36 | 30 | exists(MavenRepo mr) and |
37 | | -/* |
38 | | - * We either haven't indexed a relevant jar file, which suggests that nothing statically depended upon |
39 | | - * it, or we have indexed the relevant jar file, but no source code in the project defined by the pom |
40 | | - * depends on any code within the detected jar. |
41 | | - */ |
| 31 | +// We either haven't indexed a relevant jar file, which suggests that nothing statically depended upon |
| 32 | +// it, or we have indexed the relevant jar file, but no source code in the project defined by the pom |
| 33 | +// depends on any code within the detected jar. |
42 | 34 | not pomDependsOnContainer(source, d.getJar()) and |
43 | | -/* |
44 | | - * If something that depends on us depends on the jar represented by this dependency, and it doesn't |
45 | | - * depend directly on the jar itself, we don't consider it to be "unused". |
46 | | - */ |
| 35 | +// If something that depends on us depends on the jar represented by this dependency, and it doesn't |
| 36 | +// depend directly on the jar itself, we don't consider it to be "unused". |
47 | 37 | not exists(Pom pomThatDependsOnSource | |
48 | 38 | pomThatDependsOnSource.getAnExportedPom+() = source |
49 | 39 | | |
|
0 commit comments