Qodana 2022.2 Is Available: 50+ New Inspections and CircleCI Orb
Tags: javascript, python, releases, circleci
Published: 2022-08-08 17:21:05

---
title: Qodana 2022.2 Is Available: 50+ New Inspections and CircleCI Orb
published: true
date: 2022-08-05 15:12:57 UTC
tags: javascript,python,releases,circleci
canonical_url: https://blog.jetbrains.com/qodana/2022/08/qodana-2022-2/
---

Qodana 2022.2 is now available, bringing new and improved code inspections for Java, Kotlin, Android, PHP, JS, and Python. Additionally, we’ve added [CircleCI Orb](https://circleci.com/developer/orbs/orb/jetbrains/qodana?version=2022.2.1) to the Qodana integration toolset. 

![](https://blog.jetbrains.com/wp-content/uploads/2022/08/Release_social_media_share_1280x600_Qodana-2x-1.png)

[GET STARTED WITH QODANA](https://www.jetbrains.com/qodana "GET STARTED WITH QODANA")

## More CIs to run Qodana with

Qodana already has plugins for [Azure Pipelines](https://www.jetbrains.com/help/qodana/qodana-azure-pipelines.html), [GitHub Actions](https://www.jetbrains.com/help/qodana/qodana-github-action.html), and [TeamCity](https://www.jetbrains.com/help/qodana/teamcity.html). Starting from 2022.2, we’ve prepared a [CircleCI Qodana orb](https://circleci.com/developer/orbs/orb/jetbrains/qodana) that allows you to set up code inspections quickly and easily with your CircleCI projects.  

![](https://lh3.googleusercontent.com/D-yaEpuhrBZkxU2Kv3C9DNKH4ctdoPi3uPKbcsuxH9I5M5lPw-QrUho3h2mLdEsnJ-Na1P9TaD0ySxDtLP8vUxJyhVmOBSBrs0Q1KVQSWat_c54vEDlqRALOhPcUjChzm0mmESAFGlI4kbvGxh1NGiM)

Also, it’s easy to set up Qodana in [GitLab](https://www.jetbrains.com/help/qodana/gitlab.html), [Jenkins](https://www.jetbrains.com/help/qodana/jenkins.html), or [any other CI that supports running Docker images](https://www.jetbrains.com/help/qodana/getting-started.html#docker-image-tab).

## New inspections

### Regular expressions

Regular expressions are widely known for their complexity, intricate syntax, and sometimes verbosity. To make life easier, we’ve added new inspections in this area. Previously these inspections were available only for Java, but we’ve now made them available for all languages. 

#### Simplified regular expressions

A regular expression like `[\wa-z\d]` can be simplified to just `\w` since `\w` already includes `a-z` as well as the digits.  It helps improve the code’s overall readability.

#### Suspicious backreferences 

A regular expression like `\1(abc)` cannot match anything. This is because the `\1` refers to the `abc` that is not yet defined when evaluating the `\1`. This inspection prevents simple typos in regular expressions and speeds up the editing experience. 

#### Redundant `\d`, `[:digit:]`, or `\D` class elements

The regular expression `[\w+\d]` can be written as `[\w+]`, as the `\w` already includes the `\d`. It helps improve the code’s overall readability.

### Markdown support

#### Incorrectly numbered list items

Ordered list items like `1. 2. 4.` are marked as being inconsistently numbered. In the rendered Markdown, the list is still displayed as `1. 2. 3.`, but the inconsistency makes editing the source code harder.

### Java, Kotlin, and Android inspections

We’ve added and reorganized inspections in the categories: Javadoc, DevKit, Markdown, Kotlin language, style, architectural patterns, performance, and JUnit support. Here are a couple of examples from the JUnit set.

#### JUnit: Malformed Declaration

Reports the JUnit test member declarations that are malformed and are likely not to be recognized by the JUnit test framework. Declarations like these could result in unexecuted tests or lifecycle methods.

![](https://blog.jetbrains.com/wp-content/uploads/2022/08/CleanShot-2022-08-05-at-11.45.47-2x.png)

![](https://blog.jetbrains.com/wp-content/uploads/2022/08/CleanShot-2022-08-05-at-11.44.59-2x.png)

#### JUnit: Unconstructable TestCase

Reports JUnit test cases that can’t be constructed because they have an invalid constructor. Test cases like these will not be picked up by the JUnit test runner and will therefore not execute.

![](https://blog.jetbrains.com/wp-content/uploads/2022/08/CleanShot-2022-08-05-at-11.47.05-2x.png)

Those examples you can see live on [our public TeamCity instance](https://qodana.teamcity.com/buildConfiguration/Hosted_Root_Java_Build/61718?buildTab=Qodana&genericFilters=N4IgLg9hA2IFwG0QGEIBMCmACAkgOwGcAHDAYzAEsI8QBdAGhAIwDcMAnCsAT3iQAkKAcwAWdRqQCGYDEIjteiEABUMBMFgBm7SQFsMAd3kBrAnQC%2BQA&locationFilters=NoXSA&orderedLevels=NoIgLg9hA2IDQgM4FMBuyBOBLMBPeIAxgIZjIDmEG%2BCeADsiALpA&showingBaseline=GYQwNgzgpkA). Please use the Guest login to enter. Other inspections are described in [our documentation](https://www.jetbrains.com/help/qodana/2022.2/new-in-2022-2.html).

### PHP inspections

We added inspections in Probable bugs, Documentation, Style, Testing, and Laravel categories, for example:

#### Probable bug: Number ranges mismatch

In a function that is declared with `returns int<0,10>`, marks return statements that return a number outside this range. Similarly for fields, field constructors and function calls. 

#### Documentation: Type tag without variable name

The PHPDoc snippet `@param string` is redundant as it doesn’t say _what_ is a string. It should be either removed or replaced with `@param string $argument`, saying that _argument_ is a string. 

#### Blade: Parse error due to unpaired parentheses in string literals

Early detection of unpaired parentheses in string literals that are later parsed by Blade, a template engine.

To include or exclude certain inspections from your analysis, you can customize your default inspection profile or create a brand new one. You may also want to ​​enforce inspections that are important to your coding guidelines or best practices. Check out our [Qodana documentation](https://www.jetbrains.com/help/qodana/qodana-yaml.html#Include+an+inspection+into+the+analysis+scope) for more information. 

If you have any suggestions for future blog topics or if you want to learn more about how Qodana can help you and your business, post a comment here, tag us on [Twitter](https://twitter.com/Qodana), or contact us at _qodana-support@jetbrains.com_.

_Your Qodana team_