Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert ":bug: Be able to process FIELD rules" #639

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading