Deploying to gh-pages from @ detekt/detekt@5ff82e1131 🚀

This commit is contained in:
BraisGabin
2022-06-27 20:48:37 +00:00
parent e5acfdc14d
commit 32eb91b42b
59 changed files with 193 additions and 193 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -10,8 +10,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Detekt" href="/opensearch.xml"><title data-rh="true">Howto: migrating from the *test-pattern* | Detekt</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://detekt.dev//blog/2019/06/08/migrating-the-test-pattern"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Howto: migrating from the *test-pattern* | Detekt"><meta data-rh="true" name="description" content="Starting with RC15 the test-pattern is obsolete. This post shows how to leverage rule path excludes to achieve the same functionality."><meta data-rh="true" property="og:description" content="Starting with RC15 the test-pattern is obsolete. This post shows how to leverage rule path excludes to achieve the same functionality."><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="article:published_time" content="2019-06-08T00:00:00.000Z"><meta data-rh="true" property="article:tag" content="guides"><link data-rh="true" rel="icon" href="/img/favicon.svg"><link data-rh="true" rel="canonical" href="https://detekt.dev//blog/2019/06/08/migrating-the-test-pattern"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/2019/06/08/migrating-the-test-pattern" hreflang="en"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/2019/06/08/migrating-the-test-pattern" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://5PZNXB7M3G-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.558bb504.css">
<link rel="preload" href="/assets/js/runtime~main.9cbcc618.js" as="script">
<link rel="preload" href="/assets/js/main.6b5ebd75.js" as="script">
<link rel="preload" href="/assets/js/runtime~main.34c0bd89.js" as="script">
<link rel="preload" href="/assets/js/main.b737d8d2.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
@@ -26,7 +26,7 @@ exclude our test files for this rule:</p><div class="codeBlockContainer_Ckt0 the
This change was done to make use of the <code>java.nio.file</code> library when handling os-specific paths.</p><p>If you were using the default detekt configuration with the default test-pattern,
you will not notice any changes when upgrading to &gt;= RC15.
All <em>exclude-rules</em> and <em>exclude-rule-sets</em> will now make use of <code>excludes: &quot;**/test/**,**/*Test.kt,**/*Spec.kt&quot;</code>.</p></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_u0Nl"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/guides">guides</a></li></ul></div><div class="col margin-top--sm"><a href="https://github.com/detekt/detekt/edit/main/website/blog/2019-06-08-migrating-the-test-pattern.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_eYIM" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/blog/2019/06/29/using-detekt-snapshots"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">Howto: using snapshot releases of detekt</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/blog/2019/03/03/build-upon-the-default-config"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">Howto: build upon the default yaml config file</div></a></nav></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with Gradle</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with the CLI</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/rules/comments">Rules Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://kotlinlang.slack.com/archives/C88E12QH4" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/detekt/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://detekt.dev/kdoc" target="_blank" rel="noopener noreferrer" class="footer__link-item">KDoc<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Detekt team - Built with Docusaurus.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.9cbcc618.js"></script>
<script src="/assets/js/main.6b5ebd75.js"></script>
<script src="/assets/js/runtime~main.34c0bd89.js"></script>
<script src="/assets/js/main.b737d8d2.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -10,8 +10,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Detekt" href="/opensearch.xml"><title data-rh="true">Calling it One Zero | Detekt</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://detekt.dev//blog/2019/08/04/calling-it-one-zero"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Calling it One Zero | Detekt"><meta data-rh="true" name="description" content="Today we are announcing the 1.0 release of detekt, a static code analysis tool for Kotlin."><meta data-rh="true" property="og:description" content="Today we are announcing the 1.0 release of detekt, a static code analysis tool for Kotlin."><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="article:published_time" content="2019-08-04T00:00:00.000Z"><meta data-rh="true" property="article:tag" content="news"><link data-rh="true" rel="icon" href="/img/favicon.svg"><link data-rh="true" rel="canonical" href="https://detekt.dev//blog/2019/08/04/calling-it-one-zero"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/2019/08/04/calling-it-one-zero" hreflang="en"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/2019/08/04/calling-it-one-zero" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://5PZNXB7M3G-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.558bb504.css">
<link rel="preload" href="/assets/js/runtime~main.9cbcc618.js" as="script">
<link rel="preload" href="/assets/js/main.6b5ebd75.js" as="script">
<link rel="preload" href="/assets/js/runtime~main.34c0bd89.js" as="script">
<link rel="preload" href="/assets/js/main.b737d8d2.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
@@ -26,7 +26,7 @@ That said, it is much harder to achieve these high commit numbers now ;).</p><p>
Weekends clearly stand out. That&#x27;s when the CI has to rest ;).</p><p>This does however not mean one download equals one user. There are like eight detekt modules each with a jar and pom which needs to be downloaded.
As most of the downloads are bound to be CI, it is hard to calculate the actual number of detekt users.</p><p><img loading="lazy" alt="numbers" src="/assets/images/4-bintray-percent-46d42d5abfba0157bd16dc6f6077e3c0.png" width="1151" height="533" class="img_ev3q"></p><p>What I also noticed is the high number of &quot;early adopters&quot; in the Kotlin world (or just detekt).</p><ul><li>RC09 was released in Sep 2018</li><li>RC10 was released in Nov 2018</li><li>RC11 was released in Nov 2018</li><li>RC12 was released in Dec 2018</li><li>RC14 was released in Feb 2019</li><li>RC15 was released in Jun 2019</li><li>RC16 was released in Jun 2019</li></ul><p><strong>65%</strong> of users are on a version published in 2019. But we clearly lost some users in the older versions due to breaking changes in RC13 and RC15.
We are excited to see how many users will jump on the 1.x.x release train and how these numbers will look like.</p><p>Last but not least here is a worldmap of where detekt users are coming from.</p><p><img loading="lazy" alt="numbers" src="/assets/images/5-bintray-world-b0ef653e07203593d6fec23013825ec8.png" width="1166" height="644" class="img_ev3q"></p><p>References:</p><ul><li><a href="https://bintray.com/arturbosch/code-analysis/detekt#statistics" target="_blank" rel="noopener noreferrer">https://bintray.com/arturbosch/code-analysis/detekt#statistics</a></li><li><a href="https://github.com/detekt/detekt/graphs/contributors" target="_blank" rel="noopener noreferrer">https://github.com/detekt/detekt/graphs/contributors</a></li></ul></div><footer class="row docusaurus-mt-lg blogPostDetailsFull_u0Nl"><div class="col"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/news">news</a></li></ul></div><div class="col margin-top--sm"><a href="https://github.com/detekt/detekt/edit/main/website/blog/2019-08-04-calling-it-one-zero.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_eYIM" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Blog post page navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/blog/2019/08/14/custom-console-reports"><div class="pagination-nav__sublabel">Newer Post</div><div class="pagination-nav__label">Howto: make detekt silent</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/blog/2019/06/29/using-detekt-snapshots"><div class="pagination-nav__sublabel">Older Post</div><div class="pagination-nav__label">Howto: using snapshot releases of detekt</div></a></nav></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with Gradle</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with the CLI</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/rules/comments">Rules Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://kotlinlang.slack.com/archives/C88E12QH4" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/detekt/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://detekt.dev/kdoc" target="_blank" rel="noopener noreferrer" class="footer__link-item">KDoc<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Detekt team - Built with Docusaurus.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.9cbcc618.js"></script>
<script src="/assets/js/main.6b5ebd75.js"></script>
<script src="/assets/js/runtime~main.34c0bd89.js"></script>
<script src="/assets/js/main.b737d8d2.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -10,8 +10,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Detekt" href="/opensearch.xml"><title data-rh="true">2 posts tagged with &quot;news&quot; | Detekt</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://detekt.dev//blog/tags/news"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" property="og:title" content="2 posts tagged with &quot;news&quot; | Detekt"><meta data-rh="true" name="docusaurus_tag" content="blog_tags_posts"><meta data-rh="true" name="docsearch:docusaurus_tag" content="blog_tags_posts"><link data-rh="true" rel="icon" href="/img/favicon.svg"><link data-rh="true" rel="canonical" href="https://detekt.dev//blog/tags/news"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/tags/news" hreflang="en"><link data-rh="true" rel="alternate" href="https://detekt.dev//blog/tags/news" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://5PZNXB7M3G-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.558bb504.css">
<link rel="preload" href="/assets/js/runtime~main.9cbcc618.js" as="script">
<link rel="preload" href="/assets/js/main.6b5ebd75.js" as="script">
<link rel="preload" href="/assets/js/runtime~main.34c0bd89.js" as="script">
<link rel="preload" href="/assets/js/main.b737d8d2.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
@@ -26,7 +26,7 @@ That said, it is much harder to achieve these high commit numbers now ;).</p><p>
Weekends clearly stand out. That&#x27;s when the CI has to rest ;).</p><p>This does however not mean one download equals one user. There are like eight detekt modules each with a jar and pom which needs to be downloaded.
As most of the downloads are bound to be CI, it is hard to calculate the actual number of detekt users.</p><p><img loading="lazy" alt="numbers" src="/assets/images/4-bintray-percent-46d42d5abfba0157bd16dc6f6077e3c0.png" width="1151" height="533" class="img_ev3q"></p><p>What I also noticed is the high number of &quot;early adopters&quot; in the Kotlin world (or just detekt).</p><ul><li>RC09 was released in Sep 2018</li><li>RC10 was released in Nov 2018</li><li>RC11 was released in Nov 2018</li><li>RC12 was released in Dec 2018</li><li>RC14 was released in Feb 2019</li><li>RC15 was released in Jun 2019</li><li>RC16 was released in Jun 2019</li></ul><p><strong>65%</strong> of users are on a version published in 2019. But we clearly lost some users in the older versions due to breaking changes in RC13 and RC15.
We are excited to see how many users will jump on the 1.x.x release train and how these numbers will look like.</p><p>Last but not least here is a worldmap of where detekt users are coming from.</p><p><img loading="lazy" alt="numbers" src="/assets/images/5-bintray-world-b0ef653e07203593d6fec23013825ec8.png" width="1166" height="644" class="img_ev3q"></p><p>References:</p><ul><li><a href="https://bintray.com/arturbosch/code-analysis/detekt#statistics" target="_blank" rel="noopener noreferrer">https://bintray.com/arturbosch/code-analysis/detekt#statistics</a></li><li><a href="https://github.com/detekt/detekt/graphs/contributors" target="_blank" rel="noopener noreferrer">https://github.com/detekt/detekt/graphs/contributors</a></li></ul></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/news">news</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about Calling it One Zero" href="/blog/2019/08/04/calling-it-one-zero"><b>Read More</b></a></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_Ikge" itemprop="headline"><a itemprop="url" href="/blog/2018/02/11/website-online">Website Online</a></h2><div class="blogPostData_SAv4 margin-vert--md"><time datetime="2018-02-11T00:00:00.000Z" itemprop="datePublished">February 11, 2018</time> · <!-- -->One min read</div></header><div class="markdown" itemprop="articleBody"><p>As of today the website was launched!</p><p>{% include links.html %}</p></div><footer class="row docusaurus-mt-lg"><div class="col col--9"><b>Tags:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/blog/tags/news">news</a></li></ul></div><div class="col text--right col--3"><a aria-label="Read more about Website Online" href="/blog/2018/02/11/website-online"><b>Read More</b></a></div></footer></article><nav class="pagination-nav" aria-label="Blog list page navigation"></nav></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with Gradle</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with the CLI</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/rules/comments">Rules Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://kotlinlang.slack.com/archives/C88E12QH4" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/detekt/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://detekt.dev/kdoc" target="_blank" rel="noopener noreferrer" class="footer__link-item">KDoc<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Detekt team - Built with Docusaurus.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.9cbcc618.js"></script>
<script src="/assets/js/main.6b5ebd75.js"></script>
<script src="/assets/js/runtime~main.34c0bd89.js"></script>
<script src="/assets/js/main.b737d8d2.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -10,8 +10,8 @@
<link rel="search" type="application/opensearchdescription+xml" title="Detekt" href="/opensearch.xml"><title data-rh="true">Extending detekt | Detekt</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://detekt.dev//docs/introduction/extensions"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Extending detekt | Detekt"><meta data-rh="true" name="description" content="The following page describes how to extend detekt and how to customize it to your domain-specific needs."><meta data-rh="true" property="og:description" content="The following page describes how to extend detekt and how to customize it to your domain-specific needs."><meta data-rh="true" name="keywords" content="extensions,rulesets"><link data-rh="true" rel="icon" href="/img/favicon.svg"><link data-rh="true" rel="canonical" href="https://detekt.dev//docs/introduction/extensions"><link data-rh="true" rel="alternate" href="https://detekt.dev//docs/introduction/extensions" hreflang="en"><link data-rh="true" rel="alternate" href="https://detekt.dev//docs/introduction/extensions" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://5PZNXB7M3G-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.558bb504.css">
<link rel="preload" href="/assets/js/runtime~main.9cbcc618.js" as="script">
<link rel="preload" href="/assets/js/main.6b5ebd75.js" as="script">
<link rel="preload" href="/assets/js/runtime~main.34c0bd89.js" as="script">
<link rel="preload" href="/assets/js/main.b737d8d2.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
@@ -32,7 +32,7 @@ If you want to customize the output, take a look at the <code>ConsoleReport</cod
into your <code>detekt</code> run? Great, make sure to have a <code>jar</code> with all your needed dependencies
minus the ones <code>detekt</code> brings itself.</p><p>Take a look at our <a href="https://github.com/detekt/detekt/tree/main/detekt-sample-extensions" target="_blank" rel="noopener noreferrer">sample project</a> on how to achieve this with gradle.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="integrate-your-extension-with-the-detekt-cli">Integrate your extension with the detekt CLI<a class="hash-link" href="#integrate-your-extension-with-the-detekt-cli" title="Direct link to heading"></a></h5><p>Mention your <code>jar</code> with the <code>--plugins</code> flag when calling the cli fatjar:</p><div class="language-sh codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-sh codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">detekt --input ... --plugins /path/to/my/jar</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h5 class="anchor anchorWithStickyNavbar_LWe7" id="integrate-your-extension-with-the-detekt-gradle-plugin">Integrate your extension with the detekt gradle plugin<a class="hash-link" href="#integrate-your-extension-with-the-detekt-gradle-plugin" title="Direct link to heading"></a></h5><p>For example <code>detekt</code> itself provides a wrapper over <a href="https://github.com/pinterest/ktlint" target="_blank" rel="noopener noreferrer">ktlint</a> as a
custom <code>formatting</code> rule set.
To enable it, we add the published dependency to <code>detekt</code> via the <code>detektPlugins</code> configuration:</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="gradle-kotlingroovy-dsl">Gradle (Kotlin/Groovy DSL)<a class="hash-link" href="#gradle-kotlingroovy-dsl" title="Direct link to heading"></a></h6><div class="admonition admonition-info alert alert--info"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</h5></div><div class="admonition-content"><p>The latest released version of Detekt is <strong><span>1.21.0-RC1</span></strong></p></div></div><div class="language-kotlin codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-kotlin codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">dependencies </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token function" style="color:#d73a49">detektPlugins</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string-literal singleline string" style="color:#e3116c">&quot;io.gitlab.arturbosch.detekt:detekt-formatting:{{ site.detekt_version }}&quot;</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h5 class="anchor anchorWithStickyNavbar_LWe7" id="pitfalls">Pitfalls<a class="hash-link" href="#pitfalls" title="Direct link to heading"></a></h5><ul><li>All rules are disabled by default and have to be explicitly enabled in the <code>detekt</code> yaml configuration file.</li><li>If you do not pass the <code>Config</code> object from the <code>RuleSetProvider</code> to the rule, the rule is active, but you will not be able to use
To enable it, we add the published dependency to <code>detekt</code> via the <code>detektPlugins</code> configuration:</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="gradle-kotlingroovy-dsl">Gradle (Kotlin/Groovy DSL)<a class="hash-link" href="#gradle-kotlingroovy-dsl" title="Direct link to heading"></a></h6><div class="language-kotlin codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-kotlin codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">dependencies </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token function" style="color:#d73a49">detektPlugins</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string-literal singleline string" style="color:#e3116c">&quot;io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0-RC1&quot;</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h5 class="anchor anchorWithStickyNavbar_LWe7" id="pitfalls">Pitfalls<a class="hash-link" href="#pitfalls" title="Direct link to heading"></a></h5><ul><li>All rules are disabled by default and have to be explicitly enabled in the <code>detekt</code> yaml configuration file.</li><li>If you do not pass the <code>Config</code> object from the <code>RuleSetProvider</code> to the rule, the rule is active, but you will not be able to use
any configuration options or disable the rule via config file.</li><li>If your extension is part of your project and you integrate it like <code>detektPlugins project(&quot;:my-rules&quot;)</code> make sure that this
subproject is build before <code>gradle detekt</code> is run.
In the <code>kotlin-dsl</code> you could add something like <code>tasks.withType&lt;Detekt&gt; { dependsOn(&quot;:my-rules:assemble&quot;) }</code> to explicitly run <code>detekt</code> only
@@ -41,7 +41,7 @@ you created a pure kotlin module which has no Android dependencies. <code>apply
<code>./gradlew --stop</code> to stop gradle daemons and run the task again.</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="autocorrect-property">autoCorrect property<a class="hash-link" href="#autocorrect-property" title="Direct link to heading"></a></h4><p>In detekt you can write custom rules which can manipulate your code base.
For this a cli flag <code>--auto-correct</code> and the gradle plugin property <code>autoCorrect</code> exists.
Only write auto correcting code within the <code>Rule#withAutoCorrect()</code>-function.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/detekt/detekt/edit/main/website/docs/introduction/extensions.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_eYIM" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vbeJ"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/introduction/suppressors"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Suppressors</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/introduction/snapshots"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Using Snapshots</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with Gradle</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/gettingstarted/gradle">Getting Started with the CLI</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/rules/comments">Rules Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://kotlinlang.slack.com/archives/C88E12QH4" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/detekt/detekt" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://detekt.dev/kdoc" target="_blank" rel="noopener noreferrer" class="footer__link-item">KDoc<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_lCJq"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Detekt team - Built with Docusaurus.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.9cbcc618.js"></script>
<script src="/assets/js/main.6b5ebd75.js"></script>
<script src="/assets/js/runtime~main.34c0bd89.js"></script>
<script src="/assets/js/main.b737d8d2.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long