Skip to content

Commit

Permalink
Revert ":bug: Be able to process FIELD rules" (#639)
Browse files Browse the repository at this point in the history
Reverts #628
  • Loading branch information
pranavgaikwad authored Jul 3, 2024
1 parent 6ecda83 commit d7ae107
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
13 changes: 0 additions & 13 deletions demo-output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -899,19 +899,6 @@
matchingXML: ""
effort: 1
insights:
field-rule-00001:
description: Sample field declaration rule
category: mandatory
incidents:
- uri: file:///examples/customers-tomcat-legacy/src/main/java/io/konveyor/demo/ordermanagement/service/CustomerService.java
message: Field found
codeSnip: " 8 import org.springframework.data.domain.Page;\n 9 import org.springframework.data.domain.Pageable;\n10 import org.springframework.stereotype.Service;\n11 import org.springframework.transaction.annotation.Transactional;\n12 \n13 @Service\n14 @Transactional\n15 public class CustomerService implements ICustomerService{\n16 \t\n17 \t@Autowired\n18 \tprivate CustomerRepository repository;\n19 \t\n20 \tprivate static Logger logger = Logger.getLogger( CustomerService.class.getName() );\n21 \t\n22 \tpublic Customer findById(Long id) {\n23 \t\tlogger.debug(\"Entering CustomerService.findById()\");\n24 \t\tCustomer c = repository.findById(id).orElse(null);\n25 \t\tlogger.debug(\"Returning element: \" + c);\n26 \t\treturn c;\n27 \t}\n28 \t"
lineNumber: 18
variables:
file: file:///examples/customers-tomcat-legacy/src/main/java/io/konveyor/demo/ordermanagement/service/CustomerService.java
kind: Field
name: repository
package: io.konveyor.demo.ordermanagement.service
java-downloaded-maven-artifact:
description: |
This rule tests the application downloaded from maven artifact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ var locationToCode = map[string]int{
"variable_declaration": 9,
"type": 10,
"package": 11,
"field": 12,
}

type javaProvider struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ func (p *javaServiceClient) Evaluate(ctx context.Context, cap string, conditionI
incidents, err = p.filterDefault(symbols)
case 11:
incidents, err = p.filterDefault(symbols)
case 12:
incidents, err = p.filterDefault(symbols)
default:

}
Expand Down
10 changes: 1 addition & 9 deletions rule-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,4 @@
ruleID: java-downloaded-maven-artifact
when:
java.referenced:
pattern: io.javaoperatorsdk.operator.Operator
- category: mandatory
description: Sample field declaration rule
message: "Field found"
ruleID: field-rule-00001
when:
java.referenced:
pattern: io.konveyor.demo.ordermanagement.repository.CustomerRepository
location: FIELD
pattern: io.javaoperatorsdk.operator.Operator

0 comments on commit d7ae107

Please sign in to comment.