Skip to content

Commit

Permalink
Add demo output
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
  • Loading branch information
jmle committed May 21, 2024
1 parent 0a753ec commit 0258f98
Showing 1 changed file with 10 additions and 33 deletions.
43 changes: 10 additions & 33 deletions demo-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,22 +306,13 @@
description: ""
category: potential
incidents:
- uri: file:///examples/gradle-multi-project-example/build.gradle
message: dependency junit.junit with 4.12 is bad and you should feel bad for using it
variables:
name: junit.junit
version: "4.12"
- 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 <dependencies>\n28 <dependency>\n29 <groupId>junit</groupId>\n30 <artifactId>junit</artifactId>\n31 <version>4.11</version>\n32 <scope>test</scope>\n33 </dependency>\n34 <dependency>\n35 <groupId>io.fabric8</groupId>\n36 <artifactId>kubernetes-client</artifactId>\n37 <version>6.0.0</version>\n38 </dependency>\n39 <dependency>\n40 <groupId>io.fabric8</groupId>\n41 <artifactId>kubernetes-client-api</artifactId>\n42 <version>6.0.0</version>\n43 </dependency>\n44 <dependency>\n45 <groupId>javax</groupId>\n46 <artifactId>javaee-api</artifactId>"
lineNumber: 35
variables:
name: io.fabric8.kubernetes-client
version: 6.0.0
- 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 <properties>\n21 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n22 <maven.compiler.source>1.7</maven.compiler.source>\n23 <maven.compiler.target>1.7</maven.compiler.target>\n24 <javaee-api.version>7.0</javaee-api.version>\n25 </properties>\n26 \n27 <dependencies>\n28 <dependency>\n29 <groupId>junit</groupId>\n30 <artifactId>junit</artifactId>\n31 <version>4.11</version>\n32 <scope>test</scope>\n33 </dependency>\n34 <dependency>\n35 <groupId>io.fabric8</groupId>\n36 <artifactId>kubernetes-client</artifactId>\n37 <version>6.0.0</version>\n38 </dependency>\n39 <dependency>\n40 <groupId>io.fabric8</groupId>"
lineNumber: 29
variables:
name: junit.junit
version: "4.11"
Expand Down Expand Up @@ -433,29 +424,6 @@
incidents:
- uri: file:///examples/java/pom.xml
message: If you migrate your application to JBoss EAP 7.3, or later, and want to ensure its Maven building, running or testing works as expected, use instead the Jakarta EE dependency with groupId `com.sun.activation`
codeSnip: |-
36 <artifactId>kubernetes-client</artifactId>
37 <version>6.0.0</version>
38 </dependency>
39 <dependency>
40 <groupId>io.fabric8</groupId>
41 <artifactId>kubernetes-client-api</artifactId>
42 <version>6.0.0</version>
43 </dependency>
44 <dependency>
45 <groupId>javax</groupId>
46 <artifactId>javaee-api</artifactId>
47 <version>${javaee-api.version}</version>
48 <scope>provided</scope>
49 </dependency>
50 <!-- This currently leads to https://github.com/konveyor/analyzer-lsp/issues/392 -->
51 <dependency>
52 <groupId>io.netty</groupId>
53 <artifactId>netty-transport-native-epoll</artifactId>
54 <version>4.1.76.Final</version>
55 <classifier>linux-x86_64</classifier>
56 <scope>runtime</scope>
lineNumber: 45
variables:
name: javax.activation.activation
version: "1.1"
Expand Down Expand Up @@ -489,6 +457,16 @@
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 Down Expand Up @@ -810,4 +788,3 @@
unmatched:
- file-002
- lang-ref-002
- python-sample-rule-003

0 comments on commit 0258f98

Please sign in to comment.