Qodana 2023.1 Help

New in version 2023.1

Version 2023.1 of Qodana contains several updates, such as:

Easy plugin installation

Starting from 2023.1, you can install plugins by pasting their IDs in the qodana.yaml file. For example, this will let you install and run the Grazie Professional plugin from JetBrains Marketplace:

plugins: - id: com.intellij.grazie.pro

For more details, see the Manage plugins section.

Enhanced profile configuration

Starting from version 2023.1 of Qodana, you can use YAML format for configuring inspection profiles. For example, this configuration uses the qodana.starter profile, but enables only the PHP/Error handling category from the PHP category of the Qodana for PHP linter:

name: "Error handling inspections" baseProfile: - qodana.starter inspections: - group: "category:PHP" enabled: false - group: "category:PHP/Error handling" enabled: true

The detailed description of profile configuration is available in the Custom YAML profiles section.

New inspections

Below is the list of inspections supported by all linters as of version 2023.1.

Id

Description

Severity

Default mode

MongoDBJsonDuplicatePropertyKeys

Duplicate keys in object literals

WARNING

Disabled

MysqlSpaceAfterFunctionNameInspection

Whitespace between the function name and the open parenthesis

ERROR

Disabled

CustomRegExpInspection

Custom RegExp inspection

WARNING

Disabled

ShellCheck

ShellCheck

ERROR

Disabled

PostCssCustomMedia

Invalid custom media

ERROR

Disabled

PostCssCustomSelector

Invalid custom selector

ERROR

Disabled

PostCssMediaRange

Invalid media query range

ERROR

Disabled

PostCssNesting

Invalid nested rule

WARNING

Disabled

PostCssUnresolvedModuleValueReference

Unresolved CSS module value

ERROR

Disabled

The subsequent sections describe the inspections implemented in particular linters.

Qodana for JVM

The Qodana for JVM linter has obtained new inspections as per the table below.

Id

Description

Severity

Default mode

MongoDBJsonDuplicatePropertyKeys

Duplicate keys in object literals

WARNING

Disabled

LoggingStringTemplateAsArgument

String template as argument to logging call

WARNING

Enabled

JUnitMixedFramework

String template as argument to logging call

WARNING

Enabled

ThrowableSupplierOnlyThrowException

Throwable supplier never returns a value

WARNING

Enabled

ForEachWithRecordPatternCanBeUsed

Enhanced for with a record pattern can be used

WARNING

Disabled

MathRoundingWithIntArgument

Call math rounding with int argument

WARNING

Enabled

EnumValuesSoftDeprecate

Enum.values() is recommended to be replaced by Enum.entries since 1.9

WARNING

Enabled

EnumValuesSoftDeprecateInJava

Enum.values() is recommended to be replaced by Enum.getEntries() since Kotlin 1.9

WARNING

Enabled

AmbiguousNonLocalJump

Ambiguous non-local break or continue

WEAK WARNING

Enabled

NonNullableBooleanPropertyInExternalInterface

External interface contains non-nullable boolean property

WARNING

Disabled

NonVarPropertyInExternalInterface

External interface contains val property

WARNING

Enabled

NonExternalClassifierExtendingStateOrProps

Non-external classifier extending State or Props

WARNING

Enabled

RedundantConstructorKeyword

Redundant constructor keyword

WEAK WARNING

Disabled

RedundantValueArgument

Redundant value argument

WEAK WARNING

Disabled

KotlinObjectRegisteredAsExtension

Kotlin object registered as extension

ERROR

Disabled

MigrateToOptControl

Migrate to getOptionPane()

WARNING

Disabled

KotlinObjectExtensionRegistration

Extension class is a Kotlin object

ERROR

Disabled

ReactorTransformationOnMonoVoid

Calling {0} on receiver with the Mono type

WARNING

Enabled

ReactorZipWithMonoVoid

Zip contains parameter with the Mono type

WARNING

Enabled

SpringTransactionalMethodCallsInspection

@Transactional self-invocation method calls

WARNING

Enabled

Several inspections were removed from the Qodana for JVM linter.

Id

Description

Severity

Default mode

IncorrectProjectDependenciesConfiguration

Check configuration of project dependencies

WARNING

Disabled

SyntaxError

Syntax error

ERROR

Disabled

UnconstructableTestCase

JUnit unconstructable test case

WARNING

Disabled

JUnit4AnnotatedMethodInJUnit3TestCase

JUnit 4 test method in class extending JUnit 3 TestCase

WARNING

Disabled

Qodana for Go

Several inspections were added in the Qodana for Go linter.

Id

Description

Severity

Default mode

GoLeadingWhitespaceInDirectiveComment

Leading whitespace in directive comment

WARNING

Enabled

CheckDependencyLicenses

Check dependency licenses

WARNING

Disabled

CheckModuleLicenses

Check module licenses

WARNING

Disabled

CheckThirdPartySoftwareList

Check third party software list

WARNING

Disabled

Qodana for JS

The Qodana for JS linter has obtained new inspections as per this table.

Id

Description

Severity

Default mode

AngularNgOptimizedImage

Issues with ngSrc usage in img tags

WEAK WARNING

Disabled

JSUnresolvedReference

Unresolved JavaScript reference

WEAK WARNING

Disabled

JSXDomNesting

Invalid DOM element nesting

WEAK WARNING

Enabled

TypeScriptUnresolvedReference

Invalid DOM element nesting

WEAK WARNING

Enabled

Several inspections were removed from the Qodana for JS linter.

Id

Description

Severity

Default mode

JSUnresolvedFunction

TypeScriptUnresolvedVariable

WEAK WARNING

Enabled

JSUnresolvedVariable

Unresolved JavaScript variable

WEAK WARNING

Enabled

ES6CheckImport

Unresolved imported name

WEAK WARNING

Disabled

TypeScriptUnresolvedFunction

Unresolved TypeScript function

WEAK WARNING

Enabled

TypeScriptUnresolvedVariable

Unresolved TypeScript variable

WEAK WARNING

Enabled

Qodana for PHP

The Qodana for PHP linter has obtained new inspections as per the table below.

Id

Description

Severity

Default mode

PhpIssetCanCheckNestedAccessDirectlyInspection

isset can check nested array access and sub properties directly

WEAK WARNING

Disabled

PhpDocFinalChecksInspection

Overriding method/extending class marked as @final

WEAK WARNING

Enabled

PhpUnitAssertEqualsCanBeReplacedWithAssertTrueOrFalseInspection

Assertion can be replaced with assertTrue/assertFalse

WEAK WARNING

Disabled

PhpUnitDeprecatedDataProviderSignatureInspection

Deprecated usage of data provider since PHPUnit 10

WEAK WARNING

Disabled

PhpArrayModificationWillNotHaveEffectInspection

Array modification of return by value function won't have any effect

WEAK WARNING

Enabled

PhpTaintFunctionInspection

Vulnerabilities scanner

WARNING

Disabled

PhpVulnerablePathsInspection

Vulnerable paths scanner

WARNING

Disabled

Qodana for .NET

Apart from inspection updates, this section also describes a couple of updates in the linter, such as:

Inspection updates

Several new inspections were introduced in the Qodana for .NET linter.

Id

Description

Severity

Default mode

CanSimplifyDictionaryLookupWithTryAdd

Dictionary lookup can be simplified with TryAdd

WARNING

Enabled

CanSimplifyDictionaryLookupWithTryGetValue

Dictionary lookup can be simplified with TryGetValue

WARNING

Enabled

ExtractCommonPropertyPattern

Extract common property pattern

WEAK WARNING

Enabled

ReplaceSequenceEqualWithConstantPattern

Replace SequenceEqual with constant pattern

WEAK WARNING

Enabled

PatternIsRedundant

The pattern is redundant, it does not produce any runtime checks

WARNING

Enabled

EmptyRegion

Empty region

WEAK WARNING

Enabled

RedundantDictionaryContainsKeyBeforeAdding

Redundant dictionary ContainsKey before adding to the collection

WARNING

Enabled

RedundantSetContainsBeforeAdding

Redundant set Contains before 'Add'

WARNING

Enabled

NotAccessedOutParameterVariable

Non-accessed local variable only used to discard the out parameter value

WARNING

Enabled

ArrangeNullCheckingPattern

Arrange null checking pattern

WEAK WARNING

Enabled

A couple of inspections were removed from the Qodana for .NET linter as of version 2023.1 of Qodana.

Id

Description

Severity

Default mode

RiderCompilationErrorsInspection

Rider project compilation errors

ERROR

Enabled

RiderGlobalInspection

Rider global inspection

WARNING

Enabled

Notation change

In versions prior to 2023.1, Qodana supported the dot-net option that let you specify the solution or project name for opening and configuring Qodana. Starting from 2023.1, it was renamed to dotnet, the old variant becomes deprecated and will be removed after version 2023.2 of Qodana.

Default profile repo settings

In the versions of Qodana prior to 2023.1, inspection severity settings of the default profile were based on the default values obtained from ReSharper. However, this approach led to the duplication of settings in case a project was already using the solution and project configuration layers of ReShaper and Rider, and the editorconfig files were stored in the repository. Thus, every change in those layers needed to be duplicated with the corresponding change of the YAML profile.

Starting from 2023.1, the default profile also employs the settings of ReSharper and the editorconfig file if they are provided in the repository.

Last modified: 19 April 2023