{"id":15134965,"url":"https://github.com/jetbrains/gradle-qodana-plugin","last_synced_at":"2025-09-29T04:31:25.158Z","repository":{"id":38192566,"uuid":"317542449","full_name":"JetBrains/gradle-qodana-plugin","owner":"JetBrains","description":"⚠️ This repository is deprecated (but the plugin is moved to JetBrains/qodana-action). Go to the official docs 👇","archived":true,"fork":false,"pushed_at":"2024-01-11T15:26:28.000Z","size":194,"stargazers_count":30,"open_issues_count":7,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-01T14:58:03.365Z","etag":null,"topics":["code-quality","gradle-plugin","qodana"],"latest_commit_sha":null,"homepage":"https://www.jetbrains.com/help/qodana/qodana-gradle-plugin.html","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetBrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-01T13:00:43.000Z","updated_at":"2024-01-11T15:27:06.000Z","dependencies_parsed_at":"2024-09-12T03:14:37.871Z","dependency_job_id":"fd75004e-ed9a-4e83-9de9-fb917b760de7","html_url":"https://github.com/JetBrains/gradle-qodana-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fgradle-qodana-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fgradle-qodana-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fgradle-qodana-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetBrains%2Fgradle-qodana-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetBrains","download_url":"https://codeload.github.com/JetBrains/gradle-qodana-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234588022,"owners_count":18856855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","gradle-plugin","qodana"],"created_at":"2024-09-26T05:41:10.638Z","updated_at":"2025-09-29T04:31:19.861Z","avatar_url":"https://github.com/JetBrains.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle Qodana Plugin\n\n[![official JetBrains project](https://jb.gg/badges/official.svg)][jb:confluence-on-gh]\n[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/org.jetbrains.qodana?color=green\u0026label=Gradle%20Plugin%20Portal\u0026logo=gradle)][gradle-plugin-page]\n[![Build](https://github.com/JetBrains/gradle-grammar-kit-plugin/workflows/Build/badge.svg)][gh:build]\n[![GitHub Discussions](https://img.shields.io/github/discussions/jetbrains/qodana)][jb:discussions]\n[![Twitter Follow](https://img.shields.io/badge/follow-%40Qodana-1DA1F2?logo=twitter)][jb:twitter]\n\nGradle interface to run code inspections from IntelliJ IDEA.\n\n\u003e **Important:**\n\u003e This project requires Gradle 6.6 or newer, however it is recommended to use the [latest Gradle available](https://gradle.org/releases/). Update it with:\n\u003e ```bash\n\u003e ./gradlew wrapper --gradle-version=VERSION\n\u003e ```\n\n## Issue Tracker\n\nAll the issues, feature requests, and support related to the Gradle Qodana Plugin is handled on [YouTrack][youtrack].\n\nIf you'd like to file a new issue, please use the following [YouTrack | New Issue][youtrack-new-issue] link.\n\n## Docker Image with Qodana tool\n\nDocker Hub: https://hub.docker.com/r/jetbrains/qodana-jvm-community\n\n## Gradle Qodana Configuration\n\n\u003e **Note:** Make sure you have `docker` already installed and available in your environment. \n\nApply Gradle plugin `org.jetbrains.qodana` in Gradle configuration file:\n\n- Groovy – `build.gradle`\n\n  ```groovy\n  plugins {\n      id \"org.jetbrains.qodana\" version \"...\"\n  }\n  ```\n  \n- Kotlin DSL – `build.gradle.kts`\n\n  ```kotlin\n  plugins {\n      id(\"org.jetbrains.qodana\") version \"...\"\n  }\n  ```\n  \n\u003e **Note:** The latest version is: [![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/org.jetbrains.qodana?color=green\u0026label=Gradle%20Plugin%20Portal\u0026logo=gradle)][gradle-plugin-page]\n\n### `qodana { }` extension configuration\nProperties available for configuration in the `qodana { }` top level configuration closure:\n\n| Name                    | Description                                                                                                                       | Type      | Default Value                           |\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------------------|\n| `autoUpdate`            | Automatically pull the latest Docker image before running the inspection.                                                         | `Boolean` | `true`                                  |\n| `baselinePath`          | Run in [baseline][docs:baseline] mode. Provide the path to an existing SARIF report to be used in the baseline state calculation. | `String`  | `null`                                  |\n| `baselineIncludeAbsent` | Include in the output report the results from the baseline run that are absent in the current run.                                | `Boolean` | `false`                                 |\n| `cachePath`             | Path to the cache directory.                                                                                                      | `String`  | `null`                                  |\n| `dockerContainerName`   | Name of the Qodana Docker container.                                                                                              | `String`  | `idea-inspections`                      |\n| `dockerImageName`       | Name of the Qodana Docker image.                                                                                                  | `String`  | `jetbrains/qodana-jvm-community:latest` |\n| `executable`            | Docker executable name.                                                                                                           | `String`  | `docker`                                |\n| `projectPath`           | Path to the project folder to inspect.                                                                                            | `String`  | `project.projectDir`                    |\n| `failThreshold`         | A number of problems that will serve as a quality gate. If this number is reached, the inspection run is terminated.              | `Int`     | `10000`                                 |\n| `resultsPath`           | Path to directory to store results of the task.                                                                                   | `String`  | `\"${projectPath}/build/results\"`        |\n| `reportPath`            | Path to the directory to store the generated report.                                                                              | `String`  | `\"${projectPath}/build/results/report\"` |\n| `saveReport`            | Generate HTML report.                                                                                                             | `Boolean` | `false`                                 |\n| `showReport`            | Serve an HTML report on `showReportPort` port.                                                                                    | `Boolean` | `false`                                 |\n| `showReportPort`        | Default port used to show an HTML report.                                                                                         | `Int`     | `8080`                                  |\n\n## Gradle Qodana Tasks\n\n### `runInspections`\n\nStarts Qodana Inspections in a Docker container.\n\nTask relies on the `qodana { }` extension configuration, however it provides also additional properties and helper methods to configure the Docker image.\n\n#### Properties\n\n| Name                  | Description                                                                                                                       | Type           | Default Value |\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------|----------------|---------------|\n| `disabledPluginsPath` | Path to the list of plugins to be disabled in the Qodana IDE instance to be mounted as `/root/.config/idea/disabled_plugins.txt`. | `String`       | `null`        |\n| `changes`             | Inspect uncommitted changes and report new problems.                                                                              | `Boolean`      | `false`       |\n| `jvmParameters`       | JVM parameters to start IDEA JVM.                                                                                                 | `List\u003cString\u003e` | `empty`       |\n| `profilePath`         | Path to the profile file to be mounted as `/data/profile.xml`.                                                                    | `String`       | `null`        |\n\n#### Helper methods\n\n| Name                                           | Description                                           |\n|------------------------------------------------|-------------------------------------------------------|\n| `bind(outerPort: Int, dockerPort: Int)`        | Adds new port binding.                                |\n| `mount(outerPath: String, dockerPath: String)` | Mounts local directory to the given Docker path.      |\n| `env(name: String, value: String)`             | Adds an environment variable.                         |\n| `dockerArg(argument: String)`                  | Adds a Docker argument to the executed command.       |\n| `arg(argument: String)`                        | Adds a Docker image argument to the executed command. |\n\n### `updateInspections`\n\nPulls the latest Qodana Inspections Docker container.\n\nTask will be run automatically before the `runInspections` if the `qodana.autoUpdate` property will be set to `true`.\n\n### `stopInspections`\n\nStops the Qodana Inspections Docker container.\n\n### `cleanInspections`\n\nCleans up the Qodana Inspections output directory.\n\n\n## Example\n\nAdd this to your Gradle configuration file:\n\n- Groovy – `build.gradle`\n\n  ```groovy\n  plugins {\n      // applies Gradle Qodana plugin to use it in project\n      id \"org.jetbrains.qodana\" version \"...\"\n  }\n  \n  qodana {\n      // by default result path is $projectPath/build/results\n      resultsPath = \"some/output/path\"\n  }\n  \n  runInspections {\n      // by default qodana.recommended will be used\n      profilePath = \"./someExternallyStoredProfile.xml\"  \n  }\n  ```\n\n- Kotlin – `build.gradle.kts`\n\n  ```kotlin\n  plugins {\n      // applies Gradle Qodana plugin to use it in project\n      id(\"org.jetbrains.qodana\") version \"...\"\n  }\n  \n  qodana {\n      // by default result path is $projectPath/build/results\n      resultsPath.set(\"some/output/path\")\n  }\n  \n  tasks {\n      runInspections {\n          // by default qodana.recommended will be used\n          profilePath.set(\"./someExternallyStoredProfile.xml\")\n      }\n  }\n  ```\n\n\u003e **Note:** Docker requires at least 4GB of memory. Set it in Docker `Preferences \u003e Resources \u003e Memory` section.\n\nNow you can run inspections with `runInspections` Gradle task:\n\n```bash\ngradle runInspections \n// or\n./gradlew runInspections\n```\n\nFull guide for options and configuration parameters could be found on [qodana docs page](https://www.jetbrains.com/help/qodana/qodana-jvm-docker-techs.html). \n\n## Build Locally\n\n### Build \n\nExecute Gradle task `publishToMavenLocal` to build Gradle Qodana Plugin and publish it into local Maven repository.\nBy default, plugin will be published into `~/.mvn/org/jetbrains/qodana/` directory.\n\n### Apply\n\nAdd Maven local repository into available repositories in your Gradle project.\nFor this you need to add following lines at the beginning of `settings.gradle[.kts]` file:\n\n```groovy\npluginManagement {\n    repositories {\n        mavenLocal()\n        gradlePluginPortal()\n    }\n}\n```\n\nApply Gradle Qodana Plugin with snapshot version in Gradle configuration file and mount the Maven Local directory:\n\n- Groovy – `build.gradle`\n\n  ```groovy\n  plugins {\n      id \"org.jetbrains.qodana\" version \"0.1.0-SNAPSHOT\"\n  }\n  \n  qodana {\n      mount(\"/Users/me/.m2\", \"/root/.m2\")\n  }\n  ```\n\n- Kotlin DSL – `build.gradle.kts`\n\n  ```kotlin\n  plugins {\n      id(\"org.jetbrains.qodana\") version \"0.1.0-SNAPSHOT\"\n  }\n\n  qodana {\n      mount(\"/Users/me/.m2\", \"/root/.m2\")\n  }\n  ```\n\n[docs:baseline]: https://www.jetbrains.com/help/qodana/qodana-intellij-docker-techs.html#Run+in+baseline+mode\n[gh:build]: https://github.com/JetBrains/gradle-qodana-plugin/actions?query=workflow%3ABuild\n[gradle-plugin-page]: https://plugins.gradle.org/plugin/org.jetbrains.qodana\n[jb:confluence-on-gh]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub\n[jb:discussions]: https://jb.gg/qodana-discussions\n[jb:twitter]: https://twitter.com/Qodana\n[youtrack]: https://youtrack.jetbrains.com/issues/QD\n[youtrack-new-issue]: https://youtrack.jetbrains.com/newIssue?project=QD\u0026c=Platform%20Gradle%20Plugin\u0026c=Tool%20IntelliJ%20(Code%20Inspection)\n[youtrack]: https://youtrack.jetbrains.com/issues/QD\n[youtrack-new-issue]: https://youtrack.jetbrains.com/newIssue?project=QD\u0026c=Platform%20Gradle%20Plugin\u0026c=Tool%20IntelliJ%20(Code%20Inspection)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fgradle-qodana-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetbrains%2Fgradle-qodana-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetbrains%2Fgradle-qodana-plugin/lists"}