forked from GoDaddy-Hosting/ruby-sonar-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCaneComplexityViolation.java
More file actions
40 lines (31 loc) · 897 Bytes
/
CaneComplexityViolation.java
File metadata and controls
40 lines (31 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.godaddy.sonar.ruby.metricfu;
public class CaneComplexityViolation extends CaneViolation {
private String method;
private int complexity;
public CaneComplexityViolation(String file, String method, int complexity) {
super(file);
this.method = method;
this.complexity = complexity;
}
public CaneComplexityViolation() {
}
public String getKey() {
return "ComplexityViolation";
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public int getComplexity() {
return complexity;
}
public void setComplexity(int complexity) {
this.complexity = complexity;
}
@Override
public String toString() {
return "file: " + getFile() + " line: " + complexity + " method: " + method;
}
}