Package | Description |
---|---|
org.sonar.api.batch | |
org.sonar.api.checks | |
org.sonar.api.rules |
Modifier and Type | Method and Description |
---|---|
List<Violation> |
DecoratorContext.getViolations()
Returns all the active (= non switched-off) violations found on the current resource.
|
List<Violation> |
SonarIndex.getViolations(Resource resource)
Returns all the active (= non switched-off) violations found on the given resource.
|
abstract List<Violation> |
SonarIndex.getViolations(ViolationQuery violationQuery)
Returns the violations that match the
ViolationQuery parameters. |
List<Violation> |
DecoratorContext.getViolations(ViolationQuery violationQuery)
Returns the violations that match the
ViolationQuery parameters. |
Modifier and Type | Method and Description |
---|---|
void |
SonarIndex.addViolation(Violation violation) |
abstract void |
SonarIndex.addViolation(Violation violation,
boolean force) |
void |
SensorContext.saveViolation(Violation violation)
Save a coding rule violation.
|
DecoratorContext |
DecoratorContext.saveViolation(Violation violation)
Save a coding rule violation.
|
void |
SensorContext.saveViolation(Violation violation,
boolean force)
Save a coding rule violation.
|
DecoratorContext |
DecoratorContext.saveViolation(Violation violation,
boolean force)
Save a coding rule violation.
|
Modifier and Type | Method and Description |
---|---|
void |
SensorContext.saveViolations(Collection<Violation> violations)
Saves a list of violations.
|
Modifier and Type | Method and Description |
---|---|
boolean |
NoSonarFilter.isIgnored(Violation violation) |
Modifier and Type | Method and Description |
---|---|
static Violation |
Violation.create(ActiveRule activeRule,
Resource resource) |
static Violation |
Violation.create(Rule rule,
Resource resource) |
Violation |
Violation.setChecksum(String s)
For internal use only.
|
Violation |
Violation.setCost(Double d)
The cost to fix a violation can't be precisely computed without this information.
|
Violation |
Violation.setCreatedAt(Date createdAt)
For internal use only
|
Violation |
Violation.setLineId(Integer lineId)
Sets the violation line.
|
Violation |
Violation.setManual(boolean b)
For internal use only.
|
Violation |
Violation.setMessage(String message)
Sets the violation message
|
Violation |
Violation.setNew(boolean b)
For internal use only.
|
Violation |
Violation.setPermanentId(Integer i)
For internal use only.
|
Violation |
Violation.setPersonId(Integer i)
For internal use only.
|
Violation |
Violation.setPriority(RulePriority priority)
Deprecated.
since 2.5 use
setSeverity(RulePriority) instead. See http://jira.codehaus.org/browse/SONAR-1829 |
Violation |
Violation.setResource(Resource resource)
Sets the resource the violation applies to
|
Violation |
Violation.setRule(Rule rule)
Sets the rule violated
|
Violation |
Violation.setSeverity(RulePriority severity)
For internal use only.
|
Violation |
Violation.setSwitchedOff(boolean b)
Switches off the current violation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ViolationFilter.isIgnored(Violation violation)
Return true if the violation must be ignored, else it's saved into database.
|
Copyright © 2009-2013 SonarSource. All Rights Reserved.