> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qlty.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Radarlint Configuration

Radarlint is a static analysis tool that brings open source SonarQube-style analysis to Qlty CLI. It provides linting and security scanning capabilities for multiple languages including Java, Kotlin, Python, PHP, and Go.

<Note>Radarlint and Qlty Software is not affiliated with SonarQube or SonarSource.</Note>

## Overview

Radarlint wraps open source SonarLint analyzers to provide:

* Code quality checks based on SonarQube rules
* Security vulnerability detection (SAST)
* Configurable rule sets per language
* Pass-through support for Sonar analyzer properties

## Configuration File

Radarlint supports configuration via a `radarlint.properties` file placed in your project root. This file allows you to control both Sonar analyzer properties and individual rule toggles.

### File Location

The configuration file should be placed at the root of your repository:

```
your-project/
├── radarlint.properties
├── src/
│   └── ...
```

## Property Types

There are two main types of properties you can configure:

### Sonar Properties

Standard SonarQube properties are passed directly to the underlying Sonar analyzers. These properties must start with `sonar.` to be recognized.

Common Sonar properties include:

| Property               | Description             | Example        |
| ---------------------- | ----------------------- | -------------- |
| `sonar.java.source`    | Java source version     | `17`           |
| `sonar.java.target`    | Java target version     | `17`           |
| `sonar.python.version` | Python version          | `3.11`         |
| `sonar.go.exclusions`  | Files to exclude for Go | `**/*_test.go` |

**Example:**

```properties lines theme={"system"}
sonar.java.source=17
sonar.java.target=17
sonar.python.version=3.11
```

### Rule Properties

Rule properties control the enabling or disabling of specific rules. They follow the format:

```
radarlint.rules.<language>.<ruleKey>=<true|false>
```

Where:

* `<language>`: The language identifier (e.g., `java`, `kotlin`, `python`, `php`, `go`)
* `<ruleKey>`: The Sonar rule identifier (e.g., `S1110`, `S2196`)
* Value: Must be exactly `true` or `false` (case-sensitive)

**Example:**

```properties lines theme={"system"}
radarlint.rules.java.S1110=true
radarlint.rules.java.S2196=false
radarlint.rules.python.S5754=false
radarlint.rules.kotlin.S6530=true
```

This configuration:

* Enables rule `java:S1110` (redundant parentheses)
* Disables rule `java:S2196` (equals method override)
* Disables rule `python:S5754`
* Enables rule `kotlin:S6530`

## Finding Rule Keys

To find the rule key for a specific issue:

1. Run `qlty check` to see issues with their rule identifiers
2. The rule key appears in the format `language:SnnNN` (e.g., `java:S1110`)
3. Use the rule number (e.g., `S1110`) in your configuration

You can also browse the [SonarQube Rules](https://rules.sonarsource.com/) documentation to find rules by category or keyword.

## Complete Example

Here's a complete `radarlint.properties` file:

```properties lines theme={"system"}
# Java configuration
sonar.java.source=17
sonar.java.target=17

# Python configuration
sonar.python.version=3.11

# Rule overrides - Java
radarlint.rules.java.S1110=true
radarlint.rules.java.S2196=false
radarlint.rules.java.S1135=false

# Rule overrides - Kotlin
radarlint.rules.kotlin.S6530=true

# Rule overrides - Python
radarlint.rules.python.S5754=false
```

## Enabling Radarlint in Qlty

To use radarlint with Qlty CLI, enable the appropriate plugin in your `qlty.toml`:

```toml lines theme={"system"}
[[plugin]]
name = "radarlint-java"

[[plugin]]
name = "radarlint-kotlin"

[[plugin]]
name = "radarlint-python"
```

Or enable via the CLI:

```bash lines theme={"system"}
qlty plugins enable radarlint-java
qlty plugins enable radarlint-kotlin
```

## Property Parsing Rules

Understanding how radarlint parses properties helps avoid configuration issues:

* Properties not starting with `sonar.` or `radarlint.rules.` are silently ignored
* Rule property values must be exactly `true` or `false` (case-sensitive)
* Invalid rule values (e.g., `yes`, `1`, `TRUE`) are ignored
* If `radarlint.properties` is missing, radarlint uses default settings
* Empty lines and lines starting with `#` are treated as comments

## Troubleshooting

### Rules Not Being Applied

If your rule configuration isn't taking effect:

1. Verify the properties file is named exactly `radarlint.properties`
2. Check that rule keys match the format `radarlint.rules.<language>.<ruleKey>`
3. Ensure values are lowercase `true` or `false`
4. Confirm the rule key exists for your language version

### Analyzer Errors

If you see errors related to language version mismatches:

1. Set the appropriate `sonar.<language>.source` or `sonar.<language>.version` property
2. Ensure your project files are compatible with the specified version

### Viewing Applied Configuration

Run Qlty in debug mode to see configuration details:

```bash lines theme={"system"}
qlty check --debug
```

## See Also

* [Available Plugins](/plugins) - List of all Qlty plugins including radarlint variants
* [Analysis Configuration](/analysis-configuration) - General Qlty configuration
* [Ignoring Checks and Issues](/cli/ignoring-issues) - How to ignore specific issues
