Qodana 2022.3 Help

New in version 2022.3

This page provides the list features that were implemented in the version 2022.3 of Qodana.

New linters

Starting from 2022.3, Qodana provides support for .NET and Golang using the Qodana for .NET and Qodana for Go linters.

Qodana for JVM

Here is the list of new inspections that were implemented in the Qodana for JVM linter.

Inspection name

Severity

Description

CallingSubscribeInNonBlockingScope

Warning

Reactive: calling subscribe in "reactive" methods

DeclaringClassMigration

Warning

Deprecated Enum.declaringClass property

MultipleMethodDesignatorsInspection

Warning

REST: resource method with multiple HTTP method annotations

MutinyCallingSubscribeInNonBlockingScope

Warning

Reactive: calling subscribe in "reactive" methods

PathAnnotation

Warning

REST: Incorrect @Path URI template

ReactiveStreamsNullableInLambdaInTransform

Warning

Reactive: return null or something nullable from a lambda in transformation method

ReactiveStreamsPublisherImplementation

Warning

Reactive: class implements the com.intellij.reactivestreams publisher

ReactiveStreamsSubscriberImplementation

Warning

Reactive: class implements Subscriber

ReactiveStreamsThrowInOperator

Warning

Reactive: throw statement in Reactive operator.

Throwing exceptions from a Reactor or RxJava operator instead of returning designated error values prevents the errors from being processed further, for example by ignoring them or replacing them with a fallback value

ReactiveStreamsTooLongSameOperatorsChain

Warning

Reactive: too long same methods chain

ReactiveStreamsUnusedPublisher

Warning

Reactive: unused publisher

ReactorAutomaticDebugger

Weak Warning

Reactive: unnecessary debug initialization

ReplaceReadLineWithReadln

Weak Warning

readLine can be replaced with readln or readlnOrNull

RestParamTypeInspection

Error

REST: incorrect parameter type of resource method

RestResourceMethodInspection

Error

REST: @Path class without resource methods

RestWrongDefaultValueInspection

Warning

REST: incorrect value of the @DefaultValue parameter

SpringBootApplicationYaml

Warning

Invalid YAML configuration

SpringBootBootstrapConfigurationInspection

Weak Warning

Bootstrap configuration included in application context

SpringCloudStreamInconsistencyInspection

Warning

Stream handler method error

SpringCloudStreamMessageChannelInspection

Warning

Unresolved message channel

SpringDataMongoDBJsonFieldInspection

Error

Spring Data MongoDB JSON unresolved fields

TestInProductSource

Warning

Test in product source

UnfinishedStepVerifier

Warning

Unfinished StepVerifier

UnresolvedRestParam

Error

REST: unresolved @PathParam reference.

Reports @PathParam parameters that are declared in a method signature and missing in the URL path or visa versa. At runtime, these mismatches would throw an exception

VoidMethodAnnotatedWithGET

Warning

REST: the @GET annotated method returns void value

WadlDomInspection

Error

Incorrect WADL configuration

In version 2022.3 of Qodana, the following inspections were merged into the single SpringJavaInjectionPointsAutowiringInspection inspection:

  • SpringJavaConstructorAutowiringInspection

  • SpringJavaAutowiredMembersInspection

Here is the list of inspections that were removed from the Qodana for JVM linter.

Inspection name

Severity

Description

CollectorDetection

Information

Statistics collectors detection

EmptyWebServiceClass

Warning

Web service class has no methods

ImplicitlyExposedWebServiceMethods

Information

Implicitly exposed web service method

NonJaxWsWebServices

Warning

JAX-WS service not annotated with @WebService

OneWayWebMethod

Error

@Oneway methods should not return anything

SpringJavaAutowiredMembersInspection

Warning

Incorrect @Autowired member in a non-Spring component

SpringJavaConstructorAutowiringInspection

Error

Autowiring issues in a Spring bean class constructors

SpringMessageDispatcherWebXmlInspection

Error

Incorrect Spring Web Services servlet declaration in web.xml

SpringShellCommandInspection

Warning

Incorrect Spring Shell command declarations

SpringShellReferencesInspection

Warning

Invalid Spring Shell references

SpringWebServiceAnnotationsInconsistencyInspection

Warning

Incorrect Spring Web Services endpoint annotation

SpringWebServicesConfigurationsInspection

Error

Incorrect Spring Web Services configurations in xml application contexts

SpringWebSocketConfigurationInspection

Error

Incorrect Spring WebSocket XML-based application context

ValidExternallyBoundObject

Error

Valid externally bound com.jetbrains.jax.ws object unbundled

WSReferenceInspection

Warning

Unresolved reference from @XmlType attributes

WhitelistPresence

Warning

Not whitelisted usage collector It was from removed with FUS plugin

WsdlHighlightingInspection

Error

Invalid content

Qodana Community for JVM

Here is the list of inspections implemented in the Qodana Community for JVM linter.

Inspection name

Description

CastCanBeReplacedWithVariable

Suggests to replace repeated type casts with simpler expressions

CollectionContainsUrl

Prevents bugs and performance degradation due to collection operations doing unexpected DNS lookups

ConfigurationAvoidance

Improves performance in custom Gradle tasks

ConstantValue

Warns about conditions that are always true, including those in the assert statements, disabled by default

ConvertObjectToDataObject

Kotlin 1.8+: suggests to replace object to data object if that leads to simpler code

DataFlowIssue

Reports code constructs that always violate nullability contracts, may throw exceptions, or are just redundant, based on data flow analysis

DependencyNotationArgument

Gradle: detects incorrect dependency notations

DeprecatedConfigurations

Gradle: detects usage of configuration methods that were deprecated, such as dependencies { archive '…' }

Destructure

Kotlin: reports declarations that can be destructured

EqualsHashCodeCalledOnUrl

Calling URL.equals or URL.hashCode can perform DNS lookups, which is unexpected from these methods

EscapedSpace

Java 15 introduced the string escape sequence \s to make a trailing whitespace in text-blocks visible. In most other contexts, especially in regular expressions, this escape sequence can be easily confused with the \s of a regular expression meaning whitespace. In Java string literals, it has to be written as \\s instead

ForeignDelegate

Gradle: detects possibly misplaced calls to Gradle methods, typically due to mismatched scope

IncorrectDateTimeFormat

Reports incorrect date time format patterns

IncorrectPluginDslStructure

Gradle: detects disallowed statements before the plugins {} block

MismatchedJavadocCode

Java: reports parts of method specification written in English that contradict the method declaration (type mismatch)

NegativeIntConstantInLongContext

Java: reports hexadecimal constants that are sign-extended

ObjectPrivatePropertyName

Kotlin: reports properties that do not follow the naming conventions

OnlyOneElementUsed

Java: reports lists, arrays, and strings where exactly one element is queried right upon the creation

PluginXmlExtensionRegistration

IDEA Platform plugins: reports problems with extension registration in plugin.xml

RedundantCompareToJavaTime

Java: suggests to replace compareTo with the simpler isAfter or related methods

RedundantEmptyInitializerBlock

Reports empty init {} blocks

RedundantEscapeInRegexReplacement

Regular expressions: reports redundant escapes in the replacement string of regex methods

RedundantLengthCheck

Java: reports unnecessary array length checks followed by array iteration. When array length is zero

ReplaceRangeToWithRangeUntil

Kotlin 1.8+: suggest to replace 0..arr.size-1 with the clearer 0..<arr

ReplaceUntilWithRangeUntil

Kotlin 1.8+: suggest to replace 0 until n with the clearer 0..<n

ReplaceWithStringBuilderAppendRange

Kotlin: reports calls to a StringBuilder method that behaves differently on the platforms

SwitchExpressionCanBePushedDown

Java: reports switch expressions and statements where every branch has a common subexpression, so switch could be moved inside

UnnecessaryUnicodeEscape

Java: reports unnecessary unicode escape sequences. For example, when the file encoding can handle the character without escaping it

UnspecifiedActionsPlace

IDEA Platform plugins: reports passing the unspecified place parameter

In 2022.3, the ConstantConditions inspection was renamed for ConstantValue.

Several inspections were removed from the Qodana Community for JVM linter.

Inspection name

Severity

Description

DefaultFileTemplate

Warning

Default File Template usage

DeferredIsResult

Weak Warning

Function returning Deferred directly

DirectUseOfResultType

Weak Warning

Function returning Result directly

InspectionMappingConsistency

Warning

<inspection> tag consistency

InspectionUniqueToolbarId

Warning

Unique toolbar ID is required

RedundantAsync

Weak Warning

Redundant async call

TestCaseInProductCode

Warning

JUnit TestCase in product source

TestMethodInProductCode

Warning

JUnit test method in product source

Qodana Community for Android

Here is the list of inspections that were implemented in the Qodana Community for Android linter.

Inspection name

Severity

Description

AndroidLintCustomPermissionTypo

Warning

Permission appears to be a custom permission with a typo

AndroidLintDeprecatedSinceApi

Warning

Using a method deprecated in earlier SDK

AndroidLintEmptySuperCall

Warning

Calling an empty super method

AndroidLintGestureBackNavigation

Warning

Usage of KeyEvent.KEYCODE_BACK

AndroidLintInternalInsetResource

Warning

Using internal inset dimension resource

AndroidLintKnownPermissionError

Error

Value specified for permission is a known error

AndroidLintKotlinNullnessAnnotation

Error

Kotlin nullability annotation

AndroidLintMissingInflatedId

Error

ID not found in inflated resource

AndroidLintMonochromeLauncherIcon

Warning

Monochrome icon is not defined

AndroidLintNotificationId0

Error

Notification ID is 0

AndroidLintNotificationPermission

Error

Notifications without permission

AndroidLintOpenForTesting

Error

Extending API only allowed from tests

AndroidLintPermissionNamingConvention

Warning

Permission name does not follow a recommended convention

AndroidLintPlaySdkIndexNonCompliant

Error

Library has policy issues in SDK Index

AndroidLintReservedSystemPermission

Error

Permission name is a reserved Android permission

AndroidLintReturnThis

Error

Method must return this

AndroidLintSquareAndRoundTilePreviews

Warning

TileProvider does not have round and square previews

AndroidLintStringFormatTrivial

Warning

String.format string only contains trivial conversions

AndroidLintSuspiciousIndentation

Error

Suspicious indentation

AndroidLintSystemPermissionTypo

Warning

Permission appears to be a standard permission with a typo

AndroidLintUnusedTranslation

Warning

Unused Translation

AndroidLintWatchFaceForAndroidX

Warning

AndroidX watch faces must use action WATCH_FACE_EDITOR

AndroidLintWearableActionDuplicate

Warning

Duplicate watch face configuration activities found

JavaFxColorRgb

Warning

Color component is out of range

JavaFxDefaultTag

Warning

Unnecessary default tag

JavaFxEventHandler

Warning

Event handler method signature problems

JavaFxRedundantPropertyValue

Warning

JavaFX redundant property values

JavaFxResourcePropertyValue

Warning

The value from properties file is incompatible with the attribute type

JavaFxUnresolvedFxIdReference

Warning

Unresolved fx:id attribute reference

JavaFxUnusedImports

Warning

JavaFX unused imports

TomlUnresolvedReference

Warning

Unresolved reference

The following inspections were removed from the Qodana Community for Android linter.

Inspection name

Severity

Description

AndroidLintPropertyEscape

Error

Incorrect property escapes

AndroidLintUnpackedNativeCode

Warning

Missing android:extractNativeLibs=false

Qodana for PHP

In 2022.3, several inspections were added to the Qodana for PHP linter.

Inspection name

Description

BehatDocStepCanBeConvertedToAttributeInspection

Behat doc step can be converted to an attribute version for creating shorter tests

PhpClassCanBeReadonlyInspection

Class can be readonly

PhpDeprecatedDollarBraceStringInterpolationInspection

Deprecated ${ string interpolation

PhpDeprecatedPartiallySupportedCallableInspection

Deprecated partially supported callables. Instead of invoking self::method, you can invoke method

PhpDynamicFieldDeclarationInspection

Dynamic property declaration

PhpNModifierCanBeReplacedWithNonCapturingGroupInspection

The n modifier can be replaced with non-capturing groups

PhpPregMatchRedundantClosureInspection

Redundant closure .*.

In the function call, preg_match('/needle.*/', $str), the trailing .* is redundant, as the '/needle/' regular expression matches exactly the same set of strings. When the matched text is captured though, the .* is not redundant anymore, as the captured text includes not only needle but also the text matched by .*

PhpPregReplaceWithEmptyReplacementInspection

preg_replace() can be replaced with (l|r)trim call.

Instead of preg_replace('/^a+|a*$/', '', $string), you can use trim($string, "a")

PhpRedeclarationStdlibFunctionInspection

Redeclaration of a standard library function. It is a runtime error to redeclare a function from the PHP standard library, such as is_array

PhpRedundantReadonlyModifierInspection

The readonly modifier is redundant. For example, in readonly class RO { readonly $property }, the inner readonly is redundant

PhpRegExpInvalidDelimiterInspection

Invalid delimiter. For example, in preg_match('treats', 'sweets');, the t character is the delimiter of the regular expression, the regular expression is equivalent to '/rea/s

PhpTaintFunctionInspection

Vulnerability scanner

PhpUnpackingArraysWithStringKeysInspection

Unpacking arrays with string keys is forbidden for PHP < 8.1

PhpVarExportUsedWithoutReturnArgumentInspection

var_export or print_r call is used without the return argument.

Calling var_export($expr) always returns true. To actually get the representation of the expression, it has to be called as var_export($expr, true)

PhpVariableIsUsedOnlyInClosureInspection

Variable is only used inside closure. The scope of the variable can be made narrower, to make it easier to understand the code without looking at the surrounding function

PhpVulnerablePathsInspection

Vulnerable paths scanner

ShellCheck

ShellCheck

Qodana for JS

Here is the list of inspections that were added to the Qodana for JS linter in 2022.3.

Inspection name

Description

VueMissingComponentImportInspection

Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import

VueUnrecognizedSlot

Reports an unrecognized Vue slot

VueUnrecognizedDirective

Reports an unrecognized Vue directive

VueDeprecatedSymbol

Reports a deprecated Vue symbol

This table show the inspections that were renamed in Qodana for JS.

Inspection name

Renamed for

JSUnresolvedReactComponent

JSXUnresolvedComponent

TypeScriptUnresolvedReactComponent

TypeScriptUnresolvedReactComponent

In 2022.3, several inspections from the unbundled CoffeeScript, Haml, and W3C Validators plugins were removed.

Plugin name

List of inspections

CoffeeScript

CoffeeScriptFunctionSignatures

CoffeeScriptInfiniteLoop

CoffeeScriptLiteralNotFunction

CoffeeScriptSillyAssignment

CoffeeScriptSwitchStatementWithNoDefaultBranch

CoffeeScriptUnusedLocalSymbols

CoffeeScriptModulesDependencies

Haml

HamlNestedTagContent

W3C Validators

W3CssValidation

Qodana for Python

In 2022.3, several inspections were added to the Qodana for Python linter as shown in this table.

Inspection name

Description

DuplicateKeyInSection

Reports duplicate section in the .ini file

DuplicateSectionInFile

Reports duplicate properties in the .ini file

AppEngineThreadsafeCGIHandlerInspection

Reports cases when threadsafe is not enabled with the CGI handler

AppEngineThreadsafeInspection

Reports cases when threadsafe is not present, or it is not set to either yes or no

Query_index_required

Reports GQL queries that the index is not defined in index.yaml for. Such queries will fail on the production server

Query_bound_parameters

Reports GQL queries with bound parameters that do not have the necessary parameters passed to the query method call

Query_restricted

Reports GQL queries that do not comply with the restrictions for queries allowed on the Google App Engine server. See the App Engine documentation for more information

Restricted_Python_calls

Reports usages of Python features that are restricted by the Google App Engine sandbox and will cause a failure on the production server

CheckImageSize

HtmlDeprecatedAttribute

HtmlDeprecatedTag

HtmlFormInputWithoutLabel

HtmlNonExistentInternetResource

HtmlPresentationalElement

HtmlRequiredAltAttribute

HtmlRequiredLangAttribute

HtmlRequiredSummaryAttribute

HtmlRequiredTitleAttribute

HtmlRequiredTitleElement

HTML inspections of the HtmlTools plugin

Other inspections

Natural languages

Based on Grazie, grammar check for English, German, and Russian languages was implemented in all Qodana linters based on these inspections.

Inspection name

Description

LanguageDetectionInspection

Natural language detection

GrazieInspection

Reports grammar mistakes in your text

By default, these inspections are disabled in Qodana.

CSS

Except Qodana Community for JVM, a bunch of CSS inspections were added to all Qodana linters.

Here is the full list of CSS inspections:

  • CssBrowserCompatibilityForProperties

  • CssConvertColorToHexInspection

  • CssConvertColorToRgbInspection

  • CssInvalidAtRule

  • CssInvalidCharsetRule

  • CssInvalidFunction

  • CssInvalidHtmlTagReference

  • CssInvalidImport

  • CssInvalidMediaFeature

  • CssInvalidPropertyValue

  • CssInvalidPseudoSelector

  • CssMissingComma

  • CssMissingSemicolon

  • CssNegativeValue

  • CssNoGenericFontName

  • CssNonIntegerLengthInPixels

  • CssOverwrittenProperties

  • CssRedundantUnit

  • CssReplaceWithShorthandSafely

  • CssReplaceWithShorthandUnsafely

  • CssUnknownProperty

  • CssUnknownTarget

  • CssUnresolvedClassInComposesRule

  • CssUnresolvedCustomProperty

  • CssUnusedSymbol

A couple of examples from this list are shown in this table.

Inspection name

Description

CssInvalidPropertyValue

Detecting invalid property values such as overflow-x: yes instead of visible

CssOverwrittenProperties

Detecting accidentally overridden values such as in margin-top: 4px; margin: 0

SQL

Here is the list of SQL inspections that were implemented in all linters of 2022.3 except the Qodana Community for JVM linter.

  • MongoJSDeprecationInspection

  • MongoJSResolveInspection

  • MongoJSSideEffectsInspection

  • MsBuiltinInspection

  • MsOrderByInspection

  • MysqlLoadDataPathInspection

  • MysqlParsingInspection

  • OraMissingBodyInspection

  • OraOverloadInspection

  • OraUnmatchedForwardDeclarationInspection

  • PgSelectFromProcedureInspection

  • SqlAddNotNullColumnInspection

  • SqlAggregatesInspection

  • SqlAmbiguousColumnInspection

  • SqlAutoIncrementDuplicateInspection

  • SqlCallNotationInspection

  • SqlCaseVsCoalesceInspection

  • SqlCaseVsIfInspection

  • SqlCheckUsingColumnsInspection

  • SqlConstantConditionInspection

  • SqlConstantExpressionInspection

  • SqlCurrentSchemaInspection

  • SqlDeprecateTypeInspection

  • SqlDerivedTableAliasInspection

  • SqlDialectInspection

  • SqlDropIndexedColumnInspection

  • SqlDtInspection

  • SqlDuplicateColumnInspection

  • SqlGotoInspection

  • SqlIdentifierInspection

  • SqlIllegalCursorStateInspection

  • SqlInsertIntoGeneratedColumnInspection

  • SqlInsertNullIntoNotNullInspection

  • SqlInsertValuesInspection

  • SqlJoinWithoutOnInspection

  • SqlMisleadingReferenceInspection

  • SqlMissingColumnAliasesInspection

  • SqlMissingReturnInspection

  • SqlMultipleLimitClausesInspection

  • SqlNamedArgumentsInspection

  • SqlNoDataSourceInspection

  • SqlNullComparisonInspection

  • SqlRedundantAliasInspection

  • SqlRedundantCodeInCoalesceInspection

  • SqlRedundantElseNullInspection

  • SqlRedundantLimitInspection

  • SqlRedundantOrderingDirectionInspection

  • SqlResolveInspection

  • SqlShadowingAliasInspection

  • SqlShouldBeInGroupByInspection

  • SqlSideEffectsInspection

  • SqlSignatureInspection

  • SqlStorageInspection

  • SqlStringLengthExceededInspection

  • SqlTransactionStatementInTriggerInspection

  • SqlTriggerTransitionInspection

  • SqlTypeInspection

  • SqlUnicodeStringLiteralInspection

  • SqlUnreachableCodeInspection

  • SqlUnusedCteInspection

  • SqlUnusedSubqueryItemInspection

  • SqlUnusedVariableInspection

  • SqlWithoutWhereInspection

YAML

Here is the list of YAML inspections that were added to 2022.3 in all linters except the Qodana Community for JVM linter.

  • YAMLDuplicatedKeys

  • YAMLRecursiveAlias

  • YAMLSchemaDeprecation

  • YAMLSchemaValidation

  • YAMLUnresolvedAlias

  • YAMLUnusedAnchor

By default, these inspections are disabled in Qodana.

HTML

The HtmlWrongAttributeValue inspection reporting about incorrect HTML attribute values vas implemented in all linters.

Last modified: 09 November 2022