diff --git a/.github/workflows/demo-testing.yml b/.github/workflows/demo-testing.yml
index cafda174..77f2efe2 100644
--- a/.github/workflows/demo-testing.yml
+++ b/.github/workflows/demo-testing.yml
@@ -35,7 +35,7 @@ jobs:
with:
fetch-depth: 0
repository: konveyor/tackle2-addon-analyzer
- ref: main
+ ref: release-0.3
path: tackle2-addon-analyzer
- name: Build addon and save image
@@ -56,3 +56,5 @@ jobs:
uses: konveyor/ci/.github/workflows/global-ci.yml@main
with:
component_name: tackle2-addon-analyzer
+ api_tests_ref: release-0.3
+
\ No newline at end of file
diff --git a/cmd/analyzer/main.go b/cmd/analyzer/main.go
index b1664076..85d038e6 100644
--- a/cmd/analyzer/main.go
+++ b/cmd/analyzer/main.go
@@ -137,20 +137,13 @@ func main() {
os.Exit(1)
}
- //start up the rule eng
- eng := engine.CreateRuleEngine(ctx,
- 10,
- log,
- engine.WithIncidentLimit(limitIncidents),
- engine.WithCodeSnipLimit(limitCodeSnips),
- engine.WithContextLines(contextLines),
- engine.WithIncidentSelector(incidentSelector),
- )
-
providers := map[string]provider.InternalProviderClient{}
-
+ providerLocations := []string{}
for _, config := range configs {
config.ContextLines = contextLines
+ for _, ind := range config.InitConfig {
+ providerLocations = append(providerLocations, ind.Location)
+ }
// IF analsyis mode is set from the CLI, then we will override this for each init config
if analysisMode != "" {
inits := []provider.InitConfig{}
@@ -173,6 +166,16 @@ func main() {
}
}
}
+ //start up the rule eng
+ eng := engine.CreateRuleEngine(ctx,
+ 10,
+ log,
+ engine.WithIncidentLimit(limitIncidents),
+ engine.WithCodeSnipLimit(limitCodeSnips),
+ engine.WithContextLines(contextLines),
+ engine.WithIncidentSelector(incidentSelector),
+ engine.WithLocationPrefixes(providerLocations),
+ )
parser := parser.RuleParser{
ProviderNameToClient: providers,
diff --git a/demo-output.yaml b/demo-output.yaml
index 5cbee6f1..fec281e3 100644
--- a/demo-output.yaml
+++ b/demo-output.yaml
@@ -10,7 +10,7 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: ch.qos.logbacklogback-classic1.1.7
codeSnip: "108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql"
lineNumber: 117
@@ -18,7 +18,7 @@
data: dependency
innerText: "\n\t\t\tch.qos.logback\n\t\t\tlogback-classic\n\t\t\t1.1.7\n\t\t"
matchingXML: ch.qos.logbacklogback-classic1.1.7
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: com.fasterxml.jackson.corejackson-core
codeSnip: "59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 "
lineNumber: 68
@@ -26,7 +26,7 @@
data: dependency
innerText: "\n\t\t\tcom.fasterxml.jackson.core\n\t\t\tjackson-core\n\t\t"
matchingXML: com.fasterxml.jackson.corejackson-core
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: com.fasterxml.jackson.corejackson-databind
codeSnip: "63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}"
lineNumber: 72
@@ -34,7 +34,7 @@
data: dependency
innerText: "\n\t\t\tcom.fasterxml.jackson.core\n\t\t\tjackson-databind\n\t\t"
matchingXML: com.fasterxml.jackson.corejackson-databind
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: com.fasterxml.jacksonjackson-bom${jackson.version}importpom
codeSnip: "36 \t\t\tdemo-config\n37 \t\t\tAzure DevOps\n38 \t\t\thttps://pkgs.dev.azure.com/ShawnHurley21/demo-config-utils/_packaging/demo-config/maven/v1\n39 \t\t\n40 \t\n41 \n42 \t\n43 \t\t\n44 \t\t\t\n45 \t\t\t\tcom.fasterxml.jackson\n46 \t\t\t\tjackson-bom\n47 \t\t\t\t${jackson.version}\n48 \t\t\t\timport\n49 \t\t\t\tpom\n50 \t\t\t\n51 \t\t\t\n52 \t\t\t\torg.springframework.data\n53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom"
lineNumber: 45
@@ -42,7 +42,7 @@
data: dependency
innerText: "\n\t\t\t\tcom.fasterxml.jackson\n\t\t\t\tjackson-bom\n\t\t\t\t${jackson.version}\n\t\t\t\timport\n\t\t\t\tpom\n\t\t\t"
matchingXML: com.fasterxml.jacksonjackson-bom${jackson.version}importpom
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: com.oracle.database.jdbcojdbc821.1.0.0
codeSnip: "113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo"
lineNumber: 122
@@ -50,7 +50,7 @@
data: dependency
innerText: "\n\t\t\tcom.oracle.database.jdbc\n\t\t\tojdbc8\n\t\t\t21.1.0.0\n\t\t"
matchingXML: com.oracle.database.jdbcojdbc821.1.0.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: io.konveyor.democonfig-utils1.0.0
codeSnip: "124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo\n134 \t\t\tconfig-utils\n135 \t\t\t1.0.0\n136 \t\t\n137 \n138 \t\n139 \t\n140 \t\t\n141 \t\t\t\n142 \t\t\t\torg.apache.maven.plugins\n143 \t\t\t\tmaven-compiler-plugin\n144 \t\t\t\t${maven-compiler-plugin.version}"
lineNumber: 133
@@ -58,7 +58,7 @@
data: dependency
innerText: "\n\t\t\tio.konveyor.demo\n\t\t\tconfig-utils\n\t\t\t1.0.0\n\t\t"
matchingXML: io.konveyor.democonfig-utils1.0.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.apache.tomcattomcat-jdbc${tomcat.version}runtime
codeSnip: " 92 \t\t\tspring-web\n 93 \t\t\t${spring-framework.version}\n 94 \t\t\n 95 \t\t\n 96 \t\t\torg.springframework.boot\n 97 \t\t\tspring-boot-starter-actuator\n 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator"
lineNumber: 101
@@ -66,7 +66,7 @@
data: dependency
innerText: "\n\t\t\torg.apache.tomcat\n\t\t\ttomcat-jdbc\n\t\t\t${tomcat.version}\n\t\t\truntime\n\t\t"
matchingXML: org.apache.tomcattomcat-jdbc${tomcat.version}runtime
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.apache.tomcattomcat-servlet-api${tomcat.version}provided
codeSnip: "53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom\n57 \t\t\t\n58 \t\t\n59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind"
lineNumber: 62
@@ -74,7 +74,7 @@
data: dependency
innerText: "\n\t\t\torg.apache.tomcat\n\t\t\ttomcat-servlet-api\n\t\t\t${tomcat.version}\n\t\t\tprovided\n\t\t"
matchingXML: org.apache.tomcattomcat-servlet-api${tomcat.version}provided
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.hibernate.validatorhibernate-validator${hibernate-validator.version}
codeSnip: "103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8"
lineNumber: 112
@@ -82,7 +82,7 @@
data: dependency
innerText: "\n\t\t\torg.hibernate.validator\n\t\t\thibernate-validator\n\t\t\t${hibernate-validator.version}\n\t\t"
matchingXML: org.hibernate.validatorhibernate-validator${hibernate-validator.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.hibernatehibernate-entitymanager${hibernate.version}
codeSnip: " 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic"
lineNumber: 107
@@ -90,7 +90,7 @@
data: dependency
innerText: "\n\t\t\torg.hibernate\n\t\t\thibernate-entitymanager\n\t\t\t${hibernate.version}\n\t\t"
matchingXML: org.hibernatehibernate-entitymanager${hibernate.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.postgresqlpostgresql42.2.23
codeSnip: "118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo\n134 \t\t\tconfig-utils\n135 \t\t\t1.0.0\n136 \t\t\n137 \n138 \t"
lineNumber: 127
@@ -98,7 +98,7 @@
data: dependency
innerText: "\n\t\t\torg.postgresql\n\t\t\tpostgresql\n\t\t\t42.2.23\n\t\t"
matchingXML: org.postgresqlpostgresql42.2.23
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframework.bootspring-boot-starter-actuator2.5.0
codeSnip: " 87 \t\t\tspring-webmvc\n 88 \t\t\t${spring-framework.version}\n 89 \t\t\n 90 \t\t\n 91 \t\t\torg.springframework\n 92 \t\t\tspring-web\n 93 \t\t\t${spring-framework.version}\n 94 \t\t\n 95 \t\t\n 96 \t\t\torg.springframework.boot\n 97 \t\t\tspring-boot-starter-actuator\n 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate"
lineNumber: 96
@@ -106,7 +106,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-actuator\n\t\t\t2.5.0\n\t\t"
matchingXML: org.springframework.bootspring-boot-starter-actuator2.5.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframework.dataspring-data-bom${spring-data.version}importpom
codeSnip: "43 \t\t\n44 \t\t\t\n45 \t\t\t\tcom.fasterxml.jackson\n46 \t\t\t\tjackson-bom\n47 \t\t\t\t${jackson.version}\n48 \t\t\t\timport\n49 \t\t\t\tpom\n50 \t\t\t\n51 \t\t\t\n52 \t\t\t\torg.springframework.data\n53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom\n57 \t\t\t\n58 \t\t\n59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api"
lineNumber: 52
@@ -114,7 +114,7 @@
data: dependency
innerText: "\n\t\t\t\torg.springframework.data\n\t\t\t\tspring-data-bom\n\t\t\t\t${spring-data.version}\n\t\t\t\timport\n\t\t\t\tpom\n\t\t\t"
matchingXML: org.springframework.dataspring-data-bom${spring-data.version}importpom
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframework.dataspring-data-jpa
codeSnip: "67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc"
lineNumber: 76
@@ -122,7 +122,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework.data\n\t\t\tspring-data-jpa\n\t\t"
matchingXML: org.springframework.dataspring-data-jpa
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframeworkspring-jdbc${spring-framework.version}
codeSnip: "72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web"
lineNumber: 81
@@ -130,7 +130,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-jdbc\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-jdbc${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframeworkspring-web${spring-framework.version}
codeSnip: "77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web\n93 \t\t\t${spring-framework.version}\n94 \t\t\n95 \t\t\n96 \t\t\torg.springframework.boot\n97 \t\t\tspring-boot-starter-actuator"
lineNumber: 86
@@ -138,7 +138,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-web\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-web${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: org.springframeworkspring-webmvc${spring-framework.version}
codeSnip: "77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web\n93 \t\t\t${spring-framework.version}\n94 \t\t\n95 \t\t\n96 \t\t\torg.springframework.boot\n97 \t\t\tspring-boot-starter-actuator"
lineNumber: 86
@@ -146,7 +146,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-webmvc\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-webmvc${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/java/dummy/pom.xml
+ - uri: file:///examples/java/dummy/pom.xml
message: |-
javaxjavaee-api${javaee-api.version}provided
@@ -156,7 +156,7 @@
matchingXML: |-
javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/example/pom.xml
+ - uri: file:///examples/java/example/pom.xml
message: |-
javaxjavaee-api${javaee-api.version}provided
@@ -166,7 +166,7 @@
matchingXML: |-
javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: io.fabric8kubernetes-client-api6.0.0
codeSnip: |-
31 4.11
@@ -195,7 +195,7 @@
data: dependency
innerText: "\n io.fabric8\n kubernetes-client-api\n 6.0.0\n "
matchingXML: io.fabric8kubernetes-client-api6.0.0
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: io.fabric8kubernetes-client6.0.0
codeSnip: "26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8\n41 kubernetes-client-api\n42 6.0.0\n43 \n44 \n45 javax\n46 javaee-api"
lineNumber: 35
@@ -203,7 +203,7 @@
data: dependency
innerText: "\n io.fabric8\n kubernetes-client\n 6.0.0\n "
matchingXML: io.fabric8kubernetes-client6.0.0
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: io.nettynetty-transport-native-epoll4.1.76.Finallinux-x86_64runtime
codeSnip: "43 \n44 \n45 javax\n46 javaee-api\n47 ${javaee-api.version}\n48 provided\n49 \n50 \n51 \n52 io.netty\n53 netty-transport-native-epoll\n54 4.1.76.Final\n55 linux-x86_64\n56 runtime\n57 \n58 \n59 \n60 \n61 \n62 \n63 "
lineNumber: 52
@@ -211,7 +211,7 @@
data: dependency
innerText: "\n io.netty\n netty-transport-native-epoll\n 4.1.76.Final\n linux-x86_64\n runtime\n "
matchingXML: io.nettynetty-transport-native-epoll4.1.76.Finallinux-x86_64runtime
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: javaxjavaee-api${javaee-api.version}provided
codeSnip: |-
36 kubernetes-client
@@ -240,7 +240,7 @@
data: dependency
innerText: "\n javax\n javaee-api\n ${javaee-api.version}\n provided\n "
matchingXML: javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: junitjunit4.11test
codeSnip: "20 \n21 UTF-8\n22 1.7\n23 1.7\n24 7.0\n25 \n26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8"
lineNumber: 29
@@ -255,9 +255,9 @@
- test
- testing
incidents:
- - uri: file:///analyzer-lsp/examples/golang/dummy/test_functions.go
+ - uri: file:///examples/golang/dummy/test_functions.go
message: all go files
- - uri: file:///analyzer-lsp/examples/golang/main.go
+ - uri: file:///examples/golang/main.go
message: all go files
links:
- url: https://go.dev
@@ -267,7 +267,7 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/Dockerfile
+ - uri: file:///examples/customers-tomcat-legacy/Dockerfile
message: Found usage of openjdk base image
codeSnip: " 1 ########################################\n 2 # Build Image\n 3 ########################################\n 4 # FROM maven:3.6-jdk-8-slim as build\n 5 FROM maven:3.8-openjdk-11 as build\n 6 \n 7 WORKDIR /app\n 8 \n 9 # Establish the dependency layer\n10 COPY pom.xml .\n11 RUN mvn dependency:resolve\n12 \n13 # Add the source code and package\n14 COPY src ./src\n15 RUN mvn package\n16 "
lineNumber: 5
@@ -277,26 +277,26 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/golang/main.go
- message: golang apiextensions/v1/customresourcedefinitions found file:///analyzer-lsp/examples/golang/main.go:10
+ - uri: file:///examples/golang/main.go
+ message: golang apiextensions/v1/customresourcedefinitions found file:///examples/golang/main.go:10
lineNumber: 10
variables:
- file: file:///analyzer-lsp/examples/golang/main.go
+ file: file:///examples/golang/main.go
golang-gomod-dependencies:
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/golang/go.mod
+ - uri: file:///examples/golang/go.mod
message: dependency golang.org/x/text with v0.3.7 is bad and you should feel bad for using it
variables:
name: golang.org/x/text
version: v0.3.7
- - uri: file:///analyzer-lsp/examples/golang/go.mod
+ - uri: file:///examples/golang/go.mod
message: dependency k8s.io/apimachinery with v0.24.4 is bad and you should feel bad for using it
variables:
name: k8s.io/apimachinery
version: v0.24.4
- - uri: file:///analyzer-lsp/examples/golang/go.mod
+ - uri: file:///examples/golang/go.mod
message: dependency sigs.k8s.io/structured-merge-diff/v4 with v4.2.1 is bad and you should feel bad for using it
variables:
name: sigs.k8s.io/structured-merge-diff/v4
@@ -305,14 +305,14 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: dependency io.fabric8.kubernetes-client with 6.0.0 is bad and you should feel bad for using it
codeSnip: "26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8\n41 kubernetes-client-api\n42 6.0.0\n43 \n44 \n45 javax\n46 javaee-api"
lineNumber: 35
variables:
name: io.fabric8.kubernetes-client
version: 6.0.0
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: dependency junit.junit with 4.11 is bad and you should feel bad for using it
codeSnip: "20 \n21 UTF-8\n22 1.7\n23 1.7\n24 7.0\n25 \n26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8"
lineNumber: 29
@@ -323,7 +323,7 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/jboss-app.xml
+ - uri: file:///examples/java/jboss-app.xml
message: JBoss 5.x EAR descriptor (jboss-app.xml) was found with public-id
variables:
data: module
@@ -333,26 +333,26 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/golang/main.go
+ - uri: file:///examples/golang/main.go
message: apiextensions/v1beta1/customresourcedefinitions is deprecated, apiextensions/v1/customresourcedefinitions should be used instead
lineNumber: 10
variables:
- file: file:///analyzer-lsp/examples/golang/main.go
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/golang/main.go
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/App.java
message: apiextensions/v1beta1/customresourcedefinitions is deprecated, apiextensions/v1/customresourcedefinitions should be used instead
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition;\n 4 \n 5 public class App \n 6 {\n 7 \n 8 /**\n 9 * {@link CustomResourceDefinition}\n10 * @param args\n11 */\n12 public static void main( String[] args )\n13 {"
lineNumber: 3
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/App.java
kind: Module
name: io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition
package: com.example.apps
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/App.java
message: apiextensions/v1beta1/customresourcedefinitions is deprecated, apiextensions/v1/customresourcedefinitions should be used instead
codeSnip: " 4 \n 5 public class App \n 6 {\n 7 \n 8 /**\n 9 * {@link CustomResourceDefinition}\n10 * @param args\n11 */\n12 public static void main( String[] args )\n13 {\n14 CustomResourceDefinition crd = new CustomResourceDefinition();\n15 System.out.println( crd );\n16 \n17 GenericClass element = new GenericClass(\"Hello world!\");\n18 element.get();\n19 }\n20 }\n"
lineNumber: 14
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/App.java
kind: Method
name: main
package: com.example.apps
@@ -360,21 +360,21 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
- message: java found apiextensions/v1/customresourcedefinitions found file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java:14
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/App.java
+ message: java found apiextensions/v1/customresourcedefinitions found file:///examples/java/example/src/main/java/com/example/apps/App.java:14
codeSnip: " 4 \n 5 public class App \n 6 {\n 7 \n 8 /**\n 9 * {@link CustomResourceDefinition}\n10 * @param args\n11 */\n12 public static void main( String[] args )\n13 {\n14 CustomResourceDefinition crd = new CustomResourceDefinition();\n15 System.out.println( crd );\n16 \n17 GenericClass element = new GenericClass(\"Hello world!\");\n18 element.get();\n19 }\n20 }\n"
lineNumber: 14
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/App.java
kind: Method
name: main
package: com.example.apps
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
- message: java found apiextensions/v1/customresourcedefinitions found file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java:3
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/App.java
+ message: java found apiextensions/v1/customresourcedefinitions found file:///examples/java/example/src/main/java/com/example/apps/App.java:3
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition;\n 4 \n 5 public class App \n 6 {\n 7 \n 8 /**\n 9 * {@link CustomResourceDefinition}\n10 * @param args\n11 */\n12 public static void main( String[] args )\n13 {"
lineNumber: 3
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/App.java
kind: Module
name: io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition
package: com.example.apps
@@ -382,13 +382,13 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/App.java
message: found generic call
codeSnip: " 8 /**\n 9 * {@link CustomResourceDefinition}\n10 * @param args\n11 */\n12 public static void main( String[] args )\n13 {\n14 CustomResourceDefinition crd = new CustomResourceDefinition();\n15 System.out.println( crd );\n16 \n17 GenericClass element = new GenericClass(\"Hello world!\");\n18 element.get();\n19 }\n20 }\n"
lineNumber: 18
variables:
VariableName: element
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/App.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/App.java
kind: Method
name: main
package: com.example.apps
@@ -405,58 +405,58 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/python/file_a.py
+ - uri: file:///examples/python/file_a.py
message: python sample rule 001
lineNumber: 2
variables:
- file: file:///analyzer-lsp/examples/python/file_a.py
- - uri: file:///analyzer-lsp/examples/python/file_b.py
+ file: file:///examples/python/file_a.py
+ - uri: file:///examples/python/file_b.py
message: python sample rule 001
lineNumber: 0
variables:
- file: file:///analyzer-lsp/examples/python/file_b.py
+ file: file:///examples/python/file_b.py
python-sample-rule-002:
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/python/file_a.py
+ - uri: file:///examples/python/file_a.py
message: python sample rule 002
lineNumber: 5
variables:
- file: file:///analyzer-lsp/examples/python/file_a.py
- - uri: file:///analyzer-lsp/examples/python/file_b.py
+ file: file:///examples/python/file_a.py
+ - uri: file:///examples/python/file_b.py
message: python sample rule 002
lineNumber: 7
variables:
- file: file:///analyzer-lsp/examples/python/file_b.py
+ file: file:///examples/python/file_b.py
python-sample-rule-003:
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/python/main.py
+ - uri: file:///examples/python/main.py
message: python sample rule 003
lineNumber: 27
variables:
- file: file:///analyzer-lsp/examples/python/main.py
+ file: file:///examples/python/main.py
singleton-sessionbean-00001:
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
message: condition entries should evaluate out of order
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import javax.ejb.SessionBean;\n 4 import javax.ejb.Singleton;\n 5 \n 6 @Singleton\n 7 public abstract class Bean implements SessionBean {\n 8 }\n"
lineNumber: 6
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Singleton
package: com.example.apps
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
message: condition entries should evaluate out of order
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import javax.ejb.SessionBean;\n 4 import javax.ejb.Singleton;\n 5 \n 6 @Singleton\n 7 public abstract class Bean implements SessionBean {\n 8 }\n"
lineNumber: 7
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Bean
package: com.example.apps
@@ -464,21 +464,21 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
message: condition entries should evaluate in order
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import javax.ejb.SessionBean;\n 4 import javax.ejb.Singleton;\n 5 \n 6 @Singleton\n 7 public abstract class Bean implements SessionBean {\n 8 }\n"
lineNumber: 6
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Singleton
package: com.example.apps
- - uri: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ - uri: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
message: condition entries should evaluate in order
codeSnip: " 1 package com.example.apps;\n 2 \n 3 import javax.ejb.SessionBean;\n 4 import javax.ejb.Singleton;\n 5 \n 6 @Singleton\n 7 public abstract class Bean implements SessionBean {\n 8 }\n"
lineNumber: 7
variables:
- file: file:///analyzer-lsp/examples/java/example/src/main/java/com/example/apps/Bean.java
+ file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Bean
package: com.example.apps
@@ -501,7 +501,7 @@
description: ""
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'ch.qos.logbacklogback-classic1.1.7'
codeSnip: "108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql"
lineNumber: 117
@@ -509,7 +509,7 @@
data: dependency
innerText: "\n\t\t\tch.qos.logback\n\t\t\tlogback-classic\n\t\t\t1.1.7\n\t\t"
matchingXML: ch.qos.logbacklogback-classic1.1.7
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'com.fasterxml.jackson.corejackson-core'
codeSnip: "59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 "
lineNumber: 68
@@ -517,7 +517,7 @@
data: dependency
innerText: "\n\t\t\tcom.fasterxml.jackson.core\n\t\t\tjackson-core\n\t\t"
matchingXML: com.fasterxml.jackson.corejackson-core
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'com.fasterxml.jackson.corejackson-databind'
codeSnip: "63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}"
lineNumber: 72
@@ -525,7 +525,7 @@
data: dependency
innerText: "\n\t\t\tcom.fasterxml.jackson.core\n\t\t\tjackson-databind\n\t\t"
matchingXML: com.fasterxml.jackson.corejackson-databind
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'com.fasterxml.jacksonjackson-bom${jackson.version}importpom'
codeSnip: "36 \t\t\tdemo-config\n37 \t\t\tAzure DevOps\n38 \t\t\thttps://pkgs.dev.azure.com/ShawnHurley21/demo-config-utils/_packaging/demo-config/maven/v1\n39 \t\t\n40 \t\n41 \n42 \t\n43 \t\t\n44 \t\t\t\n45 \t\t\t\tcom.fasterxml.jackson\n46 \t\t\t\tjackson-bom\n47 \t\t\t\t${jackson.version}\n48 \t\t\t\timport\n49 \t\t\t\tpom\n50 \t\t\t\n51 \t\t\t\n52 \t\t\t\torg.springframework.data\n53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom"
lineNumber: 45
@@ -533,7 +533,7 @@
data: dependency
innerText: "\n\t\t\t\tcom.fasterxml.jackson\n\t\t\t\tjackson-bom\n\t\t\t\t${jackson.version}\n\t\t\t\timport\n\t\t\t\tpom\n\t\t\t"
matchingXML: com.fasterxml.jacksonjackson-bom${jackson.version}importpom
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'com.oracle.database.jdbcojdbc821.1.0.0'
codeSnip: "113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo"
lineNumber: 122
@@ -541,7 +541,7 @@
data: dependency
innerText: "\n\t\t\tcom.oracle.database.jdbc\n\t\t\tojdbc8\n\t\t\t21.1.0.0\n\t\t"
matchingXML: com.oracle.database.jdbcojdbc821.1.0.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'io.konveyor.democonfig-utils1.0.0'
codeSnip: "124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo\n134 \t\t\tconfig-utils\n135 \t\t\t1.0.0\n136 \t\t\n137 \n138 \t\n139 \t\n140 \t\t\n141 \t\t\t\n142 \t\t\t\torg.apache.maven.plugins\n143 \t\t\t\tmaven-compiler-plugin\n144 \t\t\t\t${maven-compiler-plugin.version}"
lineNumber: 133
@@ -549,7 +549,7 @@
data: dependency
innerText: "\n\t\t\tio.konveyor.demo\n\t\t\tconfig-utils\n\t\t\t1.0.0\n\t\t"
matchingXML: io.konveyor.democonfig-utils1.0.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.apache.tomcattomcat-jdbc${tomcat.version}runtime'
codeSnip: " 92 \t\t\tspring-web\n 93 \t\t\t${spring-framework.version}\n 94 \t\t\n 95 \t\t\n 96 \t\t\torg.springframework.boot\n 97 \t\t\tspring-boot-starter-actuator\n 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator"
lineNumber: 101
@@ -557,7 +557,7 @@
data: dependency
innerText: "\n\t\t\torg.apache.tomcat\n\t\t\ttomcat-jdbc\n\t\t\t${tomcat.version}\n\t\t\truntime\n\t\t"
matchingXML: org.apache.tomcattomcat-jdbc${tomcat.version}runtime
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.apache.tomcattomcat-servlet-api${tomcat.version}provided'
codeSnip: "53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom\n57 \t\t\t\n58 \t\t\n59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api\n64 \t\t\t${tomcat.version}\n65 \t\t\tprovided\n66 \t\t\n67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind"
lineNumber: 62
@@ -565,7 +565,7 @@
data: dependency
innerText: "\n\t\t\torg.apache.tomcat\n\t\t\ttomcat-servlet-api\n\t\t\t${tomcat.version}\n\t\t\tprovided\n\t\t"
matchingXML: org.apache.tomcattomcat-servlet-api${tomcat.version}provided
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.hibernate.validatorhibernate-validator${hibernate-validator.version}'
codeSnip: "103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8"
lineNumber: 112
@@ -573,7 +573,7 @@
data: dependency
innerText: "\n\t\t\torg.hibernate.validator\n\t\t\thibernate-validator\n\t\t\t${hibernate-validator.version}\n\t\t"
matchingXML: org.hibernate.validatorhibernate-validator${hibernate-validator.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.hibernatehibernate-entitymanager${hibernate.version}'
codeSnip: " 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate\n108 \t\t\thibernate-entitymanager\n109 \t\t\t${hibernate.version}\n110 \t\t\n111 \t\t\n112 \t\t\torg.hibernate.validator\n113 \t\t\thibernate-validator\n114 \t\t\t${hibernate-validator.version}\n115 \t\t\n116 \t\t\n117 \t\t\tch.qos.logback\n118 \t\t\tlogback-classic"
lineNumber: 107
@@ -581,7 +581,7 @@
data: dependency
innerText: "\n\t\t\torg.hibernate\n\t\t\thibernate-entitymanager\n\t\t\t${hibernate.version}\n\t\t"
matchingXML: org.hibernatehibernate-entitymanager${hibernate.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.postgresqlpostgresql42.2.23'
codeSnip: "118 \t\t\tlogback-classic\n119 \t\t\t1.1.7\n120 \t\t\n121 \t\t\n122 \t\t\tcom.oracle.database.jdbc\n123 \t\t\tojdbc8\n124 \t\t\t21.1.0.0\n125 \t\t\n126 \t\t\n127 \t\t\torg.postgresql\n128 \t\t\tpostgresql\n129 \t\t\t42.2.23\n130 \t\t\n131 \t\t\n132 \t\t\n133 \t\t\tio.konveyor.demo\n134 \t\t\tconfig-utils\n135 \t\t\t1.0.0\n136 \t\t\n137 \n138 \t"
lineNumber: 127
@@ -589,7 +589,7 @@
data: dependency
innerText: "\n\t\t\torg.postgresql\n\t\t\tpostgresql\n\t\t\t42.2.23\n\t\t"
matchingXML: org.postgresqlpostgresql42.2.23
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframework.bootspring-boot-starter-actuator2.5.0'
codeSnip: " 87 \t\t\tspring-webmvc\n 88 \t\t\t${spring-framework.version}\n 89 \t\t\n 90 \t\t\n 91 \t\t\torg.springframework\n 92 \t\t\tspring-web\n 93 \t\t\t${spring-framework.version}\n 94 \t\t\n 95 \t\t\n 96 \t\t\torg.springframework.boot\n 97 \t\t\tspring-boot-starter-actuator\n 98 \t\t\t2.5.0\n 99 \t\t\n100 \t\t\n101 \t\t\torg.apache.tomcat\n102 \t\t\ttomcat-jdbc\n103 \t\t\t${tomcat.version}\n104 \t\t\truntime\n105 \t\t\n106 \t\t\n107 \t\t\torg.hibernate"
lineNumber: 96
@@ -597,7 +597,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework.boot\n\t\t\tspring-boot-starter-actuator\n\t\t\t2.5.0\n\t\t"
matchingXML: org.springframework.bootspring-boot-starter-actuator2.5.0
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframework.dataspring-data-bom${spring-data.version}importpom'
codeSnip: "43 \t\t\n44 \t\t\t\n45 \t\t\t\tcom.fasterxml.jackson\n46 \t\t\t\tjackson-bom\n47 \t\t\t\t${jackson.version}\n48 \t\t\t\timport\n49 \t\t\t\tpom\n50 \t\t\t\n51 \t\t\t\n52 \t\t\t\torg.springframework.data\n53 \t\t\t\tspring-data-bom\n54 \t\t\t\t${spring-data.version}\n55 \t\t\t\timport\n56 \t\t\t\tpom\n57 \t\t\t\n58 \t\t\n59 \t\n60 \t\n61 \t\t\n62 \t\t\torg.apache.tomcat\n63 \t\t\ttomcat-servlet-api"
lineNumber: 52
@@ -605,7 +605,7 @@
data: dependency
innerText: "\n\t\t\t\torg.springframework.data\n\t\t\t\tspring-data-bom\n\t\t\t\t${spring-data.version}\n\t\t\t\timport\n\t\t\t\tpom\n\t\t\t"
matchingXML: org.springframework.dataspring-data-bom${spring-data.version}importpom
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframework.dataspring-data-jpa'
codeSnip: "67 \t\t\n68 \t\t\tcom.fasterxml.jackson.core\n69 \t\t\tjackson-core\n70 \t\t\n71 \t\t\n72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc"
lineNumber: 76
@@ -613,7 +613,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework.data\n\t\t\tspring-data-jpa\n\t\t"
matchingXML: org.springframework.dataspring-data-jpa
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframeworkspring-jdbc${spring-framework.version}'
codeSnip: "72 \t\t\tcom.fasterxml.jackson.core\n73 \t\t\tjackson-databind\n74 \t\t\n75 \t\t\n76 \t\t\torg.springframework.data\n77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web"
lineNumber: 81
@@ -621,7 +621,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-jdbc\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-jdbc${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframeworkspring-web${spring-framework.version}'
codeSnip: "77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web\n93 \t\t\t${spring-framework.version}\n94 \t\t\n95 \t\t\n96 \t\t\torg.springframework.boot\n97 \t\t\tspring-boot-starter-actuator"
lineNumber: 86
@@ -629,7 +629,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-web\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-web${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/customers-tomcat-legacy/pom.xml
+ - uri: file:///examples/customers-tomcat-legacy/pom.xml
message: POM XML dependencies - 'org.springframeworkspring-webmvc${spring-framework.version}'
codeSnip: "77 \t\t\tspring-data-jpa\n78 \t\t\n79 \n80 \t\t\n81 \t\t\torg.springframework\n82 \t\t\tspring-jdbc\n83 \t\t\t${spring-framework.version}\n84 \t\t\n85 \t\t\n86 \t\t\torg.springframework\n87 \t\t\tspring-webmvc\n88 \t\t\t${spring-framework.version}\n89 \t\t\n90 \t\t\n91 \t\t\torg.springframework\n92 \t\t\tspring-web\n93 \t\t\t${spring-framework.version}\n94 \t\t\n95 \t\t\n96 \t\t\torg.springframework.boot\n97 \t\t\tspring-boot-starter-actuator"
lineNumber: 86
@@ -637,7 +637,7 @@
data: dependency
innerText: "\n\t\t\torg.springframework\n\t\t\tspring-webmvc\n\t\t\t${spring-framework.version}\n\t\t"
matchingXML: org.springframeworkspring-webmvc${spring-framework.version}
- - uri: file:///analyzer-lsp/examples/java/dummy/pom.xml
+ - uri: file:///examples/java/dummy/pom.xml
message: |-
POM XML dependencies - 'javaxjavaee-api${javaee-api.version}provided'
@@ -647,7 +647,7 @@
matchingXML: |-
javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/example/pom.xml
+ - uri: file:///examples/java/example/pom.xml
message: |-
POM XML dependencies - 'javaxjavaee-api${javaee-api.version}provided'
@@ -657,7 +657,7 @@
matchingXML: |-
javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: POM XML dependencies - 'io.fabric8kubernetes-client-api6.0.0'
codeSnip: |-
31 4.11
@@ -686,7 +686,7 @@
data: dependency
innerText: "\n io.fabric8\n kubernetes-client-api\n 6.0.0\n "
matchingXML: io.fabric8kubernetes-client-api6.0.0
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: POM XML dependencies - 'io.fabric8kubernetes-client6.0.0'
codeSnip: "26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8\n41 kubernetes-client-api\n42 6.0.0\n43 \n44 \n45 javax\n46 javaee-api"
lineNumber: 35
@@ -694,7 +694,7 @@
data: dependency
innerText: "\n io.fabric8\n kubernetes-client\n 6.0.0\n "
matchingXML: io.fabric8kubernetes-client6.0.0
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: POM XML dependencies - 'io.nettynetty-transport-native-epoll4.1.76.Finallinux-x86_64runtime'
codeSnip: "43 \n44 \n45 javax\n46 javaee-api\n47 ${javaee-api.version}\n48 provided\n49 \n50 \n51 \n52 io.netty\n53 netty-transport-native-epoll\n54 4.1.76.Final\n55 linux-x86_64\n56 runtime\n57 \n58 \n59 \n60 \n61 \n62 \n63 "
lineNumber: 52
@@ -702,7 +702,7 @@
data: dependency
innerText: "\n io.netty\n netty-transport-native-epoll\n 4.1.76.Final\n linux-x86_64\n runtime\n "
matchingXML: io.nettynetty-transport-native-epoll4.1.76.Finallinux-x86_64runtime
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: POM XML dependencies - 'javaxjavaee-api${javaee-api.version}provided'
codeSnip: |-
36 kubernetes-client
@@ -731,7 +731,7 @@
data: dependency
innerText: "\n javax\n javaee-api\n ${javaee-api.version}\n provided\n "
matchingXML: javaxjavaee-api${javaee-api.version}provided
- - uri: file:///analyzer-lsp/examples/java/pom.xml
+ - uri: file:///examples/java/pom.xml
message: POM XML dependencies - 'junitjunit4.11test'
codeSnip: "20 \n21 UTF-8\n22 1.7\n23 1.7\n24 7.0\n25 \n26 \n27 \n28 \n29 junit\n30 junit\n31 4.11\n32 test\n33 \n34 \n35 io.fabric8\n36 kubernetes-client\n37 6.0.0\n38 \n39 \n40 io.fabric8"
lineNumber: 29
@@ -743,7 +743,7 @@
description: Test code snippets when match is a key of a XML node
category: potential
incidents:
- - uri: file:///analyzer-lsp/examples/java/beans.xml
+ - uri: file:///examples/java/beans.xml
message: The code snippet should point to in the beans.xml file
codeSnip: " 8 *\n 9 * http://www.apache.org/licenses/LICENSE-2.0\n10 *\n11 * Unless required by applicable law or agreed to in writing, software\n12 * distributed under the License is distributed on an \"AS IS\" BASIS,\n13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n14 * See the License for the specific language governing permissions and\n15 * limitations under the License.\n16 -->\n17 \n22 \n"
lineNumber: 17
diff --git a/engine/engine.go b/engine/engine.go
index a272f790..51c31a25 100644
--- a/engine/engine.go
+++ b/engine/engine.go
@@ -5,6 +5,7 @@ import (
"context"
"fmt"
"os"
+ "path/filepath"
"regexp"
"strconv"
"strings"
@@ -53,6 +54,7 @@ type ruleEngine struct {
codeSnipLimit int
contextLines int
incidentSelector string
+ locationPrefixes []string
}
type Option func(engine *ruleEngine)
@@ -81,6 +83,12 @@ func WithIncidentSelector(selector string) Option {
}
}
+func WithLocationPrefixes(location []string) Option {
+ return func(engine *ruleEngine) {
+ engine.locationPrefixes = location
+ }
+}
+
func CreateRuleEngine(ctx context.Context, workers int, log logr.Logger, options ...Option) RuleEngine {
// Only allow for 10 rules to be waiting in the buffer at once.
// Adding more workers will increase the number of rules running at once.
@@ -403,6 +411,31 @@ func processRule(ctx context.Context, rule Rule, ruleCtx ConditionContext, log l
}
+func (r *ruleEngine) getRelativePathForViolation(fileURI uri.URI) (uri.URI, error) {
+ var sourceLocation string
+ if fileURI != "" {
+ file := fileURI.Filename()
+ // get the correct source from config
+ for _, locationPrefix := range r.locationPrefixes {
+ if strings.Contains(file, locationPrefix) {
+ sourceLocation = locationPrefix
+ break
+ }
+ }
+ absPath, err := filepath.Abs(sourceLocation)
+ if err != nil {
+ return fileURI, nil
+ }
+ // given a relative path for source
+ if absPath != sourceLocation {
+ relPath := filepath.Join(sourceLocation, strings.TrimPrefix(file, absPath))
+ newURI := fmt.Sprintf("file:///%s", filepath.Join(strings.TrimPrefix(relPath, "/")))
+ return uri.URI(newURI), nil
+ }
+ }
+ return fileURI, nil
+}
+
func (r *ruleEngine) createViolation(ctx context.Context, conditionResponse ConditionResponse, rule Rule) (konveyor.Violation, error) {
incidents := []konveyor.Incident{}
fileCodeSnipCount := map[string]int{}
@@ -420,8 +453,19 @@ func (r *ruleEngine) createViolation(ctx context.Context, conditionResponse Cond
if r.incidentLimit != 0 && len(incidents) == r.incidentLimit {
break
}
+ trimmedUri, err := r.getRelativePathForViolation(m.FileURI)
+ if err != nil {
+ return konveyor.Violation{}, err
+ }
+
+ for val := range m.Variables {
+ if val == "file" {
+ m.Variables["file"] = trimmedUri
+ }
+ }
+
incident := konveyor.Incident{
- URI: m.FileURI,
+ URI: trimmedUri,
LineNumber: m.LineNumber,
// This allows us to change m.Variables and it will be set
// because it is a pointer.