Package org.ossreviewtoolkit.model
Class RuleViolation
-
- All Implemented Interfaces:
public final class RuleViolation
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringruleprivate final Identifierpkgprivate final SpdxSingleLicenseExpressionlicenseprivate final LicenseSourcelicenseSourceprivate final Severityseverityprivate final Stringmessageprivate final StringhowToFix
-
Constructor Summary
Constructors Constructor Description RuleViolation(String rule, Identifier pkg, SpdxSingleLicenseExpression license, LicenseSource licenseSource, Severity severity, String message, String howToFix)
-
Method Summary
Modifier and Type Method Description final StringgetRule()The identifier of the rule that found this violation. final IdentifiergetPkg()The identifier of the package that caused this rule violation. final SpdxSingleLicenseExpressiongetLicense()The name of the license that caused this rule violation. final LicenseSourcegetLicenseSource()The source of the license. final SeveritygetSeverity()The severity of the rule violation. final StringgetMessage()A message explaining the rule violation. final StringgetHowToFix()A text explaining how the rule violation can be fixed. -
-
Constructor Detail
-
RuleViolation
RuleViolation(String rule, Identifier pkg, SpdxSingleLicenseExpression license, LicenseSource licenseSource, Severity severity, String message, String howToFix)
-
-
Method Detail
-
getPkg
final Identifier getPkg()
The identifier of the package that caused this rule violation.
-
getLicense
final SpdxSingleLicenseExpression getLicense()
The name of the license that caused this rule violation. Can be null if the rule does not work on licenses.
-
getLicenseSource
final LicenseSource getLicenseSource()
-
getSeverity
final Severity getSeverity()
The severity of the rule violation.
-
getMessage
final String getMessage()
A message explaining the rule violation.
-
getHowToFix
final String getHowToFix()
A text explaining how the rule violation can be fixed. Reporters rendering this string should support the Markdown syntax to allow formatting of the text.
-
-
-
-