- Remove deprecation on
status
valuesTO_REVIEW
,REVIEWED
and related usages - Remove deprecation on
resolution
valuesFIXED
,SAFE
,ACKNOWLEDGED
and related usages - Indicate that
status
andresolution
are not deprecated for hotspots
- Remove usage of
javax-servlet-api
:- Remove
org.sonar.api.web.ServletFilter
- Remove
javax.servlet.http.HttpServletRequest
- Remove
javax.servlet.http.HttpServletResponse
- Remove
- Remove deprecation on
org.sonar.api.rules.RuleType
,org.sonar.api.batch.rule.Severity
,org.sonar.api.rule.Severity
and related usages. - Remove deprecation on
org.sonar.api.server.rule.internal.ImpactMapper
andorg.sonar.api.server.rule.RuleTagsToTypeConverter
. - Remove deprecation on metrics
org.sonar.api.measures.CoreMetrics.BLOCKER_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.CRITICAL_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.MAJOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.MINOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.INFO_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_BLOCKER_VIOLATIONS
, ,org.sonar.api.measures.CoreMetrics.NEW_CRITICAL_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_MAJOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_MINOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_INFO_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.CODE_SMELLS
,org.sonar.api.measures.CoreMetrics.NEW_CODE_SMELLS
,org.sonar.api.measures.CoreMetrics.BUGS
,org.sonar.api.measures.CoreMetrics.NEW_BUGS
,org.sonar.api.measures.CoreMetrics.VULNERABILITIES
,org.sonar.api.measures.CoreMetrics.NEW_VULNERABILITIES
. - Deprecate
org.sonar.api.server.rule.internal.ImpactMapper.convertToDeprecatedSeverity
. Useorg.sonar.api.server.rule.internal.ImpactMapper.convertToRuleSeverity
instead.
- Deprecate
org.sonar.api.resources.Qualifiers
andorg.sonar.api.resources.Scopes
- Add a specialized
ConfigScope
enum onorg.sonar.api.config.PropertyDefinition
, and provide replacements for allonQualifiers
methods accordingly - Change the name of
high_impact_accepted_issues
toBlocker and High Severity Accepted Issues
- Deprecate metrics
org.sonar.api.measures.CoreMetrics.RELIABILITY_ISSUES
,org.sonar.api.measures.CoreMetrics.MAINTAINABILITY_ISSUES
,org.sonar.api.measures.CoreMetrics.SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.NEW_RELIABILITY_ISSUES
,org.sonar.api.measures.CoreMetrics.NEW_MAINTAINABILITY_ISSUES
andorg.sonar.api.measures.CoreMetrics.NEW_SECURITY_ISSUES
- Introduce new impact severities
org.sonar.api.issue.impact.Severity.INFO
andorg.sonar.api.issue.impact.Severity.BLOCKER
- Introduce
org.sonar.api.server.rule.RulesDefinition.addStig
to support STIG security standards
- Fixed an issue where WebService which was not meant to return any response still showed the warning in the logs when response example was not set.
- Introduce 'org.sonar.api.server.ws.WebService.NewAction.setContentType' for optionally setting a response type of Action.
- Replace internal library
commons-lang:commons-lang
byorg.apache.commons:commons-lang3
. - Do not throw an exception when a rule parameter is not known in
org.sonar.api.batch.rule.Checks
- Change domain of metrics
org.sonar.api.measures.CoreMetrics.SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.MAINTAINABILITY_ISSUES
,org.sonar.api.measures.CoreMetrics.RELIABILITY_ISSUES
,org.sonar.api.measures.CoreMetrics.NEW_SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.NEW_MAINTAINABILITY_ISSUES
andorg.sonar.api.measures.CoreMetrics.NEW_RELIABILITY_ISSUES
toSECURITY
,MAINTAINABILITY
andRELIABILITY
domains instead ofISSUES
domain. - Add new metrics
org.sonar.api.measures.CoreMetrics.NEW_SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.NEW_MAINTAINABILITY_ISSUES
andorg.sonar.api.measures.CoreMetrics.NEW_RELIABILITY_ISSUES
. - Deprecate metrics
org.sonar.api.measures.CoreMetrics.BLOCKER_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.CRITICAL_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.MAJOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.MINOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.INFO_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_BLOCKER_VIOLATIONS
, ,org.sonar.api.measures.CoreMetrics.NEW_CRITICAL_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_MAJOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_MINOR_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.NEW_INFO_VIOLATIONS
,org.sonar.api.measures.CoreMetrics.CODE_SMELLS
,org.sonar.api.measures.CoreMetrics.NEW_CODE_SMELLS
,org.sonar.api.measures.CoreMetrics.BUGS
,org.sonar.api.measures.CoreMetrics.NEW_BUGS
,org.sonar.api.measures.CoreMetrics.VULNERABILITIES
,org.sonar.api.measures.CoreMetrics.NEW_VULNERABILITIES
. Useorg.sonar.api.measures.CoreMetrics.SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.MAINTAINABILITY_ISSUES
andorg.sonar.api.measures.CoreMetrics.RELIABILITY_ISSUES
instead.
- Deprecate metric
org.sonar.api.measures.CoreMetrics.HIGH_IMPACT_ACCEPTED_ISSUES
. - Add new metrics
org.sonar.api.measures.CoreMetrics.SECURITY_ISSUES
,org.sonar.api.measures.CoreMetrics.MAINTAINABILITY_ISSUES
andorg.sonar.api.measures.CoreMetrics.RELIABILITY_ISSUES
.
- Introduce
org.sonar.api.issue.IssueStatus
to simplifystatus
andresolution
on issues. - Deprecate
org.sonar.api.ce.measure.Issue.status()
andorg.sonar.api.ce.measure.Issue.resolution()
. Useorg.sonar.api.ce.measure.Issue.issueStatus()
method instead. - Deprecate
org.sonar.api.issue.Issue.status()
andorg.sonar.api.issue.Issue.resolution()
. No replacement. - Deprecate
STATUS_OPEN
,STATUS_CONFIRMED
,STATUS_REOPENED
,STATUS_RESOLVED
,STATUS_CLOSED
,RESOLUTION_FIXED
,RESOLUTION_FALSE_POSITIVE
,RESOLUTION_REMOVED
,RESOLUTION_WONT_FIX
, useorg.sonar.api.issue.IssueStatus
enum instead - Deprecate
RESOLUTION_SAFE
,RESOLUTION_ACKNOWLEDGED
,STATUS_TO_REVIEW
,STATUS_REVIEWED
. No replacement. - Deprecate
org.sonar.api.measures.CoreMetrics.REOPENED_ISSUES
,org.sonar.api.measures.CoreMetrics.OPEN_ISSUES
. Useorg.sonar.api.measures.CoreMetrics.VIOLATIONS
instead. - Deprecate
org.sonar.api.measures.CoreMetrics.CONFIRMED_ISSUES
. No replacement.
- Add new metrics
org.sonar.api.measures.CoreMetrics.NEW_ACCEPTED_ISSUES
andorg.sonar.api.measures.CoreMetrics.HIGH_IMPACT_ACCEPTED_ISSUES
. - Add new metric
org.sonar.api.measures.CoreMetrics.PULL_REQUEST_FIXED_ISSUES
to represent issues that would be fixed by the pull request. - Fixed misleading javadoc of
org.sonar.api.config.Configuration
to make it clear that at Compute Engine level project configuration is not provided. - Deprecate
org.sonar.api.issue.DefaultTransitions.UNCOMFIRM
. There is no replacement asorg.sonar.api.issue.DefaultTransitions.CONFIRM
is subject to removal in the future. - Deprecate
org.sonar.api.issue.DefaultTransitions.CONFIRM
. Useorg.sonar.api.issue.DefaultTransitions.ACCEPT
instead.
- Deprecate
org.sonar.api.measures.CoreMetrics.WONT_FIX_ISSUES
metric and related key. - Introduce
org.sonar.api.measures.CoreMetrics.ACCEPTED_ISSUES
which effectively replacesorg.sonar.api.measures.CoreMetrics.WONT_FIX_ISSUES
- Introduce
org.sonar.api.issue.DefaultTransitions.ACCEPT
which effectively replacesorg.sonar.api.issue.DefaultTransitions.WONT_FIX
. - Deprecate
org.sonar.api.issue.DefaultTransitions.WONT_FIX
. Useorg.sonar.api.issue.DefaultTransitions.ACCEPT
instead.
- Introduce email property type:
org.sonar.api.PropertyType.EMAIL
- Remove @Beta Code Characteristics
org.sonar.api.code.CodeCharacteristic
- Introduce
org.sonar.api.issue.impact.SoftwareQuality
andorg.sonar.api.issue.impact.Severity
to define impacts of rules and issues - Introduce
org.sonar.api.rules.CleanCodeAttribute
to define clean code attribute on rules. - Deprecate
org.sonar.api.rules.RuleType
,org.sonar.api.batch.rule.Severity
andorg.sonar.api.rule.Severity
. Use impacts withorg.sonar.api.issue.impact.SoftwareQuality
andorg.sonar.api.issue.impact.Severity
instead - Deprecate
org.sonar.api.server.rule.RuleTagsToTypeConverter
- Moved out tester classes to the dedicated test-fixtures artifact
- Remove
org.sonar.api.SonarQubeVersion
. - Deprecate
org.sonar.api.Plugin.Context.getSonarQubeVersion()
. The name is confusing: the API version is different from the SonarQube version since the extraction. Useorg.sonar.api.SonarRuntime.getApiVersion()
instead. - Remove
org.sonar.api.SonarPlugin
. Useorg.sonar.api.Plugin
instead - Remove
org.sonar.api.SonarQubeVersion
. No replacement - Remove
org.sonar.api.security.LoginPasswordAuthenticator
andorg.sonar.api.CoreProperties.CORE_AUTHENTICATOR_CLASS
. Useorg.sonar.api.security.Authenticator
instead. Makeorg.sonar.api.security.SecurityRealm.doGetAuthenticator()
abstract - Remove
org.sonar.api.web.UserRole.VIEWER
. Useorg.sonar.api.web.UserRole.USER
instead - Remove
org.sonar.api.measures.Metric
constructors. Useorg.sonar.api.measures.Metric.Builder.create
instead - Remove
org.sonar.api.rules.Rule
constructors. Use theorg.sonar.api.rules.Rule.create()
methods instead - Remove
org.sonar.api.rules.RuleParam
constructors. Use theorg.sonar.api.rules.Rule.createParameter()
methods instead - Remove
org.sonar.api.rules.AnnotationRuleParser
. Useorg.sonar.api.server.rule.RulesDefinitionAnnotationLoader
instead - Remove
org.sonar.api.PropertyType.METRIC
,org.sonar.api.PropertyType.METRIC_LEVEL
,org.sonar.api.PropertyType.LICENSE
andorg.sonar.api.PropertyType.LONG
. There is no replacement as those settings are not used anymore - Remove
org.sonar.api.profiles.XMLProfileSerializer
andorg.sonar.api.profiles.XMLProfileParser
. No replacement - Remove
org.sonar.api.utils.ZipUtils.ZipEntryFilter
. Usejava.util.function.Predicate<ZipEntry>
instead - Remove
org.sonar.api.Property.propertySetKey()
. No replacement - Remove
org.sonar.api.platform.Server.isSecured()
. Useorg.sonar.api.server.http.HttpRequest.isSecure()
instead - Remove
org.sonar.api.resources.ResourceType.Builder.availableForFilters()
. Useorg.sonar.api.resources.ResourceType.Builder.setProperty(java.lang.String, java.lang.String)
instead - Remove
org.sonar.api.ce.posttask.QualityGate.Condition.getWarningThreshold()
andorg.sonar.api.ce.posttask.QualityGate.Condition.isOnLeakPeriod()
. No replacement - Remove
org.sonar.api.ce.posttask.QualityGate.Operator.EQUALS
andorg.sonar.api.ce.posttask.QualityGate.Operator.NOT_EQUALS
. No replacement - Remove
org.sonar.api.ce.posttask.QualityGate.EvaluationStatus.WARN
. No replacement - Remove
org.sonar.api.ce.posttask.QualityGate.Status.WARN
. No replacement - Remove
org.sonar.api.measures.Metric.Level.WARN
. No replacement - Remove
org.sonar.api.measures.CoreMetrics.DOMAIN_DUPLICATION
. Useorg.sonar.api.measures.CoreMetrics.DOMAIN_DUPLICATIONS
instead - Remove
org.sonar.api.measures.CoreMetrics.DIRECTORIES_KEY
andorg.sonar.api.measures.CoreMetrics.DIRECTORIES
. No replacement - Remove
org.sonar.api.utils.HttpDownloader.TIMEOUT_MILLISECONDS
. Useorg.sonar.api.utils.HttpDownloader.DEFAULT_READ_TIMEOUT_IN_MILLISECONDS
ororg.sonar.api.utils.HttpDownloader.DEFAULT_CONNECT_TIMEOUT_IN_MILLISECONDS
instead - Remove
org.sonar.api.resources.Qualifiers.LIBRARY
. No replacement - Remove
org.sonar.api.resources.Scopes.PROGRAM_UNIT
andorg.sonar.api.resources.Scopes.BLOCK_UNIT
. No replacement - Remove
org.sonar.api.CoreProperties.CORE_AUTHENTICATOR_CREATE_USERS
,org.sonar.api.CoreProperties.CORE_AUTHENTICATOR_UPDATE_USER_ATTRIBUTES
,org.sonar.api.CoreProperties.CORE_AUTHENTICATOR_REALM
,org.sonar.api.CoreProperties.LINKS_SOURCES_DEV
andorg.sonar.api.CoreProperties.CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE
. No replacement - Remove
org.sonar.api.issue.IssueComment
andorg.sonar.api.issue.Issue.comments()
. No replacement - Remove
org.sonar.api.batch.rule.Rules
. No replacement - Remove
org.sonar.api.notifications.NotificationChannel
andorg.sonar.api.notifications.Notification
. No replacement - Remove
org.sonar.api.scan.filesystem.PathResolver.RelativePath
andorg.sonar.api.scan.filesystem.PathResolver.relativePath(java.util.Collection<java.io.File>, java.io.File)
. No replacement - Remove
org.sonar.api.platform.Server.getPermanentServerId()
. Useorg.sonar.api.platform.Server.getId()
instead - Remove
org.sonar.api.rules.RulePriority.valueOfString(String)
. Useorg.sonar.api.rules.RulePriority.valueOf(String)
instead - Deprecate
org.sonar.api.Plugin.Context.getSonarQubeVersion()
. The name is confusing: the API version is different from the SonarQube version since the extraction. Useorg.sonar.api.SonarRuntime.getApiVersion()
instead.
- Introduce
org.sonar.api.batch.sensor.issue.NewIssue.setCodeVariants(Iterable<String>)
for analyzers to contribute issues for given variants (e.g. different target platforms) - Introduce 'org.sonar.api.issue.Issue.codeVariants()'
- Improvements on
org.sonar.api.testfixtures.log.LogTester
:- intercepts logged exceptions
- thread-safe
- Extension point
org.sonar.api.resources.Language
now supportsfilenamePatterns
to detect files' language based on more complex filename patterns than only filename extensions. - Usage of
javax-servlet-api
is now deprecated in favor of custom, framework-agnostic API:- Replace
byorg.sonar.api.web.ServletFilter
org.sonar.api.server.web.HttpFilter
- Replace
byjavax.servlet.http.HttpServletRequest
org.sonar.api.server.http.HttpRequest
- Replace
byjavax.servlet.http.HttpServletResponse
org.sonar.api.server.http.HttpResponse
- Other added classes:
org.sonar.api.web.FilterChain
,org.sonar.api.web.UrlPattern
andorg.sonar.api.server.http.Cookie
- Replace
org.sonar.api.utils.log.Loggers
andorg.sonar.api.utils.log.Logger
are now deprecated in favor of the direct use of SLF4J:- Replace
byorg.sonar.api.utils.log.Loggers
org.slf4j.LoggerFactory
- Replace
byorg.sonar.api.utils.log.Logger
org.slf4j.Logger
- Replace
- Utility classes used to test logs have been moved to a separate artifact
org.sonarsource.api.plugin:sonar-plugin-api-test-fixtures
and moved to a new package:org.sonar.api.utils.log.LogTester
→org.sonar.api.testfixtures.log.LogTester
org.sonar.api.utils.log.LogTesterJUnit5
→org.sonar.api.testfixtures.log.LogTesterJUnit5
- Breaking change for tests: the default log level when using
LogTester
is nowINFO
. This is consistent with the default behavior of Sonar products. If you want to assertDEBUG
orTRACE
logs in your tests, you should first change the log level by using for examplelogTester.setLevel(Level.DEBUG)
.
- Properties
sonar.tests.inclusions
andsonar.tests.exclusions
added toorg.sonar.api.CoreProperties
as alias forsonar.test.inclusions
andsonar.test.exclusion
- Support for plugins to add messages to issue locations with formatting:
- Added interface
org.sonar.api.batch.sensor.issue.MessageFormatting
- Added interface
org.sonar.api.batch.sensor.issue.NewMessageFormatting
- Added method
org.sonar.api.batch.sensor.issue.IssueLocation.messageFormattings()
- Added method
org.sonar.api.batch.sensor.issue.NewIssueLocation.message(String, List<NewMessageFormatting>)
- Added method
org.sonar.api.batch.sensor.issue.NewIssueLocation.newMessageFormatting
- Added interface
- Support for plugins to add quick fixes to issues:
- Added interface
org.sonar.api.batch.sensor.issue.fix.InputFileEdit
- Added interface
org.sonar.api.batch.sensor.issue.fix.NewInputFileEdit
- Added interface
org.sonar.api.batch.sensor.issue.fix.NewQuickFix
- Added interface
org.sonar.api.batch.sensor.issue.fix.NewTextEdit
- Added interface
org.sonar.api.batch.sensor.issue.fix.QuickFix
- Added interface
org.sonar.api.batch.sensor.issue.fix.TextEdit
- Added method
org.sonar.api.batch.sensor.issue.Issue.quickFixes()
- Added method
org.sonar.api.batch.sensor.issue.NewIssue.newQuickFix()
- Added method
org.sonar.api.batch.sensor.issue.NewIssue.addQuickFix(NewQuickFix)
- Added interface
- Added a new property type:
org.sonar.api.PropertyType.FORMATTED_TEXT