Skip to content

Commit

Permalink
Fix gradle tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmle committed May 31, 2024
1 parent dd44352 commit bce4782
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
3 changes: 3 additions & 0 deletions demo-dep-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,9 @@
- name: xml-apis.xml-apis
version: 1.0.b2
indirect: true
- fileURI: file:///analyzer-lsp/examples/inclusion-tests/pom.xml
provider: java
dependencies: []
- fileURI: file:///analyzer-lsp/examples/java/pom.xml
provider: java
dependencies:
Expand Down
29 changes: 19 additions & 10 deletions demo-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -590,16 +590,6 @@
lineNumber: 6
variables:
file: file:///examples/python/file_a.py
python-sample-rule-003:
description: ""
category: potential
incidents:
- uri: file:///examples/python/main.py
message: python sample rule 003
codeSnip: "19 # Create an instance of the API class\n20 api_instance = kubernetes.client.ApiextensionsV1Api(api_client)\n21 body = kubernetes.client.V1CustomResourceDefinition() # V1CustomResourceDefinition | \n22 pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)\n23 dry_run = 'dry_run_example' # str | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)\n24 field_manager = 'field_manager_example' # str | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)\n25 field_validation = 'field_validation_example' # str | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional)\n26 \n27 try:\n28 api_response = api_instance.create_custom_resource_definition(body, pretty=pretty, dry_run=dry_run, field_manager=field_manager, field_validation=field_validation)\n29 pprint(api_response)\n30 except ApiException as e:\n31 print(\"Exception when calling ApiextensionsV1Api->create_custom_resource_definition: %s\\n\" % e)\n"
lineNumber: 28
variables:
file: file:///examples/python/main.py
singleton-sessionbean-00001:
description: ""
category: potential
Expand All @@ -613,6 +603,15 @@
kind: Class
name: Singleton
package: com.example.apps
- 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 9 }\n"
lineNumber: 7
variables:
file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Bean
package: com.example.apps
singleton-sessionbean-00002:
description: ""
category: potential
Expand All @@ -626,6 +625,15 @@
kind: Class
name: Singleton
package: com.example.apps
- 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 9 }\n"
lineNumber: 7
variables:
file: file:///examples/java/example/src/main/java/com/example/apps/Bean.java
kind: Class
name: Bean
package: com.example.apps
tech-tag-001:
description: ""
category: potential
Expand Down Expand Up @@ -903,3 +911,4 @@
unmatched:
- file-002
- lang-ref-002
- python-sample-rule-003
2 changes: 1 addition & 1 deletion provider_container_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"analysisMode": "source-only"
},
{
"location": "examples/gradle-multi-project-example",
"location": "/analyzer-lsp/examples/gradle-multi-project-example",
"providerSpecificConfig": {
"lspServerName": "java",
"lspServerPath": "/jdtls/bin/jdtls",
Expand Down
10 changes: 10 additions & 0 deletions provider_local_external_images.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@
"bundles": "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
},
"analysisMode": "source-only"
},
{
"location": "examples/gradle-multi-project-example",
"providerSpecificConfig": {
"lspServerName": "java",
"lspServerPath": "/jdtls/bin/jdtls",
"depOpenSourceLabelsFile": "/usr/local/etc/maven.default.index",
"bundles": "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
},
"analysisMode": "source-only"
}
]
},
Expand Down
10 changes: 10 additions & 0 deletions provider_pod_local_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@
"bundles": "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
},
"analysisMode": "source-only"
},
{
"location": "/analyzer-lsp/examples/gradle-multi-project-example",
"providerSpecificConfig": {
"lspServerName": "java",
"lspServerPath": "/jdtls/bin/jdtls",
"depOpenSourceLabelsFile": "/usr/local/etc/maven.default.index",
"bundles": "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar"
},
"analysisMode": "source-only"
}
]
},
Expand Down

0 comments on commit bce4782

Please sign in to comment.