{"id":587589,"date":"2025-07-31T13:02:17","date_gmt":"2025-07-31T12:02:17","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=qodana&#038;p=587589"},"modified":"2025-08-02T19:04:36","modified_gmt":"2025-08-02T18:04:36","slug":"quick-fix","status":"publish","type":"qodana","link":"https:\/\/blog.jetbrains.com\/pt-br\/qodana\/2025\/07\/quick-fix","title":{"rendered":"Qodana Quick-Fix Options: Smarter Automation and Cleaner Code"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1200\" height=\"675\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/07\/QD-Twitter_Facebook_LinkedIn-1200x675-1.png\" alt=\"SonarQube Quick Fix\" class=\"wp-image-588029\"\/><\/figure>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#three-strategies-for-fixing-code-faster\">Three strategies for fixing code faster<\/a><\/li><li><a href=\"#how-to-run-quick-fixes\">How to run Quick-Fixes\u00a0<\/a><\/li><li><a href=\"#why-it-matters\">Why it matters<\/a><\/li><li><a href=\"#try-it-out-on-your-next-build\">Quick-Fix: Try it out on your next build<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>Modern development is fast-paced \u2013 bugs, style violations, and code smells need to be caught early and fixed quickly. It\u2019s also time-consuming and tedious to manually make fixes. That\u2019s why Qodana\u2019s Quick-Fix feature is designed to go beyond static analysis \u2013 it automatically improves your codebase using predefined strategies that fit your team\u2019s needs.<\/p>\n\n\n\n<p>Quick-Fix is available for Qodana Ultimate and Ultimate Plus license users, and it supports Qodana for JVM, Python, PHP, JavaScript, Go, and .NET linters (including trial versions).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"three-strategies-for-fixing-code-faster\"><strong>Three strategies for fixing code faster<\/strong><\/h2>\n\n\n\n<p>Qodana\u2019s Quick-Fix isn\u2019t just a one-size-fits-all solution. It lets you choose from three modes, depending on how aggressive or conservative you want to be:<\/p>\n\n\n\n<ul>\n<li><em>None<\/em> \u2013 No fixes are applied. Use this option if you want reporting only.<\/li>\n\n\n\n<li><em>Cleanup<\/em> \u2013 This option applies safe, non-invasive cleanup inspections (like removing unused imports, reformatting, etc.) that don\u2019t change logic or behavior.<\/li>\n\n\n\n<li><em>Apply<\/em> \u2013<strong> <\/strong>This option tries to fix all detected issues, including those that may affect logic or behavior. This is ideal for thorough refactoring, but it requires review before merging.<\/li>\n<\/ul>\n\n\n\n<p>These modes give you fine-grained control over automation, from low-risk cosmetic cleanups to more substantial code rewrites.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-run-quick-fixes\"><strong>How to run Quick-Fixes&nbsp;<\/strong><\/h2>\n\n\n\n<p>You can enable a <em>Quick-Fix<\/em> strategy in a few environments:<\/p>\n\n\n\n<ul>\n<li>Locally via Docker or the Qodana CLI.<br><\/li>\n\n\n\n<li>In your CI\/CD pipeline via GitHub Actions.<br><\/li>\n\n\n\n<li>Via configuration using qodana.yaml.<br><\/li>\n<\/ul>\n\n\n\n<p>Here\u2019s a basic example using Docker with the &#8211;apply-fixes flag:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ docker run \\\n   -v &lt;source-directory>\/:\/data\/project\/  \\\n   -e QODANA_TOKEN=\"&lt;cloud-project-token>\" \\\n   jetbrains\/qodana-&lt;linter> \\\n   --apply-fixes<\/pre>\n\n\n\n<p>You can set your strategy directly in the qodana.yaml file if you&#8217;re automating across environments. Find out how to use other Quick-Fix options in our documentation.<\/p>\n\n\n\n<p align=\"center\"><a class=\"jb-download-button\" title=\"View Documentation\" href=\"https:\/\/www.jetbrains.com\/help\/qodana\/quick-fix.html#-7mu656_48\" target=\"_blank\" rel=\"noopener noreferrer\" data-mce-href=\"https:\/\/www.jetbrains.com\/help\/qodana\/quick-fix.html#-7mu656_48\" data-mce-selected=\"inline-boundary\" data-mce-><i class=\"download-icon\"><\/i>View Documentation<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"603\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/07\/image-31.png\" alt=\"\" class=\"wp-image-588069\"\/><figcaption class=\"wp-element-caption\">Qodana proposes merging<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-it-matters\"><strong>Why it matters<\/strong><\/h2>\n\n\n\n<p>While other tools provide some in-editor suggestions, Qodana goes further with CI-integrated fixes at scale. You can run code inspections nightly or per your requirements, apply fixes automatically, and prevent regressions before they hit the main branch.<\/p>\n\n\n\n<p>When used alongside Qodana Cloud or TeamCity Pipelines, Quick-Fixes provide complete traceability from inspection to remediation, all integrated with your JetBrains IDE experience.<\/p>\n\n\n\n<p>Stop just spotting issues \u2013 have control over how you fix them. Qodana\u2019s Quick-Fix brings reliable, automated code improvements directly into your CI workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"try-it-out-on-your-next-build\">Quick-Fix: <strong>Try it out on your next build<\/strong><\/h2>\n\n\n\n<p><br>Need help configuring <em>Cleanup<\/em> or <em>Apply<\/em> strategies? Explore<a href=\"https:\/\/www.jetbrains.com\/qodana\/documentation\/2025.1\/features\/quick-fix\/\" target=\"_blank\" rel=\"noopener\"> the doc<\/a><a href=\"https:\/\/www.jetbrains.com\/help\/qodana\/quick-fix.html#-7mu656_48\" target=\"_blank\" rel=\"noopener\">umentation<\/a> or <a href=\"mailto:qodana-support@jetbrains.com\">contact our Support team<\/a>. Keep an eye on our <a href=\"https:\/\/x.com\/Qodana\" target=\"_blank\">X<\/a> for more feature updates! Want to read more? Find out how <a href=\"https:\/\/blog.jetbrains.com\/qodana\/2023\/01\/qodana-and-intellij-idea-how-a-code-quality-platform-streamlined-the-localization-of-an-ide\/\">Qodana and IntelliJ-IDEA streamlined localization of an IDE<\/a>.  <\/p>\n","protected":false},"author":1438,"featured_media":587996,"comment_status":"closed","ping_status":"closed","template":"","categories":[808,8860],"tags":[228,6470,8243],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/qodana\/587589"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/qodana"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/types\/qodana"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/users\/1438"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/comments?post=587589"}],"version-history":[{"count":10,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/qodana\/587589\/revisions"}],"predecessor-version":[{"id":588825,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/qodana\/587589\/revisions\/588825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media\/587996"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media?parent=587589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/categories?post=587589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/tags?post=587589"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/cross-post-tag?post=587589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}