Edit me

1.14.2 - 2020-10-20

Changelog
  • Do not report vararg arguments which are just passed to a vararg parameter - #3157
  • Simplify documentation - #3156
  • Respect inspection aliases ClassName, PackageDirectoryMismatch, RedundantVisibilityModifier - #3153
  • Change spek and assertj to compile only dependencies for detekt-test consumers - #3152
  • False positive performance SpreadOperator in case of pass-through vararg - #3145
  • ClassOrdering rule reports a list of errors - #3142
  • ClassOrdering only reports first misorder, not all misorders - #3141
  • UnusedPrivateMember: fix false positive with getValue/setValue operator functions - #3139
  • ClassOrdering reports a message describing the misorder - #3138
  • False positive UnusedPrivateMember for getValue, setValue operator functions - #3128
  • Add aliases to class and package Naming rules - #3124
  • Artifact detekt-test forces dependency constraining - #3082
Housekeeping & Refactorings
  • Fix two eager Regex creations in rules which may confuse users if this rules are inactive but evaluated - #3154
  • Update Gradle to 6.7 - #3148
  • Bump github-pages from 208 to 209 in /docs - #3135

See all issues at: 1.14.2

1.14.1 - 2020-09-30

Changelog
  • Write recipe to compare user and default config - #3065 - #3114
  • Improve description of AbsentOrWrongFileLicense rule - #3109
  • Report Unit returned by method implementations in interfaces - #3108
  • Change OptionalUnit to report Unit returned by method implementations in interfaces - #3099
  • 1.13.0 changes to detektGenerateConfig - #3065
  • detekt 1.12.0 and org.springframework.boot 2.2.6.RELEASE clash - #3058
Housekeeping & Refactorings
  • Update mockk to 1.10.2 - #3113
  • Refactoring: Use indices syntax in loop - #3112
  • Specify type explicitly in DetektCreateBaselineTask - #3111
  • Refactoring: Class member can have private visibility - #3110
  • Fix kotlin-reflect problem for idea plugin - #3107

See all issues at: 1.14.1

1.14.0 - 2020-09-26

Notable Changes
  • New standard rules: ReplaceSafeCallChainWithRun, ClassOrdering, SuspendFunWithFlowReturnType
  • New experimental KtLint rules: AnnotationSpacing, ArgumentListWrapping
Changelog
  • Add additional classpaths to KtTestCompiler - #3101
  • New rule: SuspendFunWithFlowReturnType - #3098
  • Fix formatting issues have no absolute path - #3063 - #3097
  • Fix false positive (+= overload) in UnusedPrivateMember - #3094
  • Update RedundantVisibilityModifierRule to find redundant internal modifiers - #3092
  • New rule: ReplaceSafeCallChainWithRun - #3089
  • New rule: ClassOrdering - #3088
  • Use File.pathSeparator to split entries in classpath - #3084
  • Wrap new KtLint rules - #3083
  • Wrap KtLint AnnotationSpacingRule - #3081
  • Wrap KtLint ArgumentListWrappingRule - #3080
  • UnusedImports rule: fix false positives when type resolution is enabled - #3079
  • Move SNAPSHOT from artifactory to sonatype - #3076
  • Update KtLint to 0.39.0 - #3075
  • UnusedImports: Lots of false positives - #3074
  • Update dependency badge to maven central - #3072
  • Simplify reporting message for IgnoredReturnValue - #3068
  • Add ability to pass rootclasspaths to KtTestCompiler - #3066
  • MagicNumber rule: don’t check Character, Boolean and null - #3064
  • KtLint formatting checks do not include full path in report - #3063
  • IgnoredReturnValue should only report name of method/function called - #3052
Housekeeping & Refactorings
  • Update jacoco with Java 15 support - #3105
  • Update project dependencies - #3104
  • Enable parallel spek test discovery - #3090
  • Update Gradle to 6.7-rc-2 - #3071
  • Update spek framework to 2.0.13 - #3070
  • Update kramdown dependency due to a vulnerability - #3069
  • Add test asserting the report message - #3061

See all issues at: 1.14.0

1.13.1 - 2020-09-13

Notable Changes

We now publish directly to maven central. The 1.13.0 release got corrupted and should not be used.

1.13.0 - 2020-09-07

Migration
  • This release drops several deprecations in detekt-api.
Changelog
  • Set modifier order based on Kotlin coding conventions - #3056
  • FunctionNaming: allow anonymous functions - #3055
  • FunctionNaming should ignore anonymous functions - #3054
  • Fix ModifierOrder for false positive reported by ModifierOrder when using fun interfaces - #3051
  • False positive reported by ModifierOrder when using fun interfaces - #3050
  • Fix PreferToOverPairSyntax exception - #3046
  • PreferToOverPairSyntax throws exceptions - #3044
  • Remove deprecated entity and location members - #3037
  • Respect configured config file when running the detektCreateConfig task - #3036
  • Remove last years api deprecations - #3035
  • UnusedImports rule: fix false negative when same name identifiers are imported and used - #3033
  • ForbiddenMethodCall: report operator calls - #3032
  • Improve documentation for Gradle repositories setup - #3030
  • how to use the type resolution to make ForbiddenMethodCall to check bigdecimal.equals using bigdecimal == bigdecimal? - #3029
  • Use lazy gradle APIs in docs - #3028
  • Implement option to turn config property deprecation warnings as errors - #3026
  • Fix RedundantSuspendModifier message - #3025
  • Print filtered paths in debug mode for easier bug tracing - #3022
  • Unused import not detected - #3020
  • Include reports and formatting features to the system test - #3018
  • detektGenerateConfig ignores detekt.config paramenter - #2565
  • Treat config property deprecations as errors - #2545
  • Print filtered paths in debug mode - #869
Housekeeping & Refactorings
  • Remove confusing annotation for UnusedImports rule - #3039
  • Remove obsolete signature workaround for formatting plugin - #3038
  • Upgrade to new dokka - #2931

See all issues at: 1.13.0

1.12.0 - 2020-08-25

Notable Changes
  • Kotlin 1.4 support
  • New rules: UseCheckNotNull, UseRequireNotNull, NonBooleanPropertyPrefixedWithIs
  • The Gradle plugin now requires at least Gradle 5.4. This aligns with Kotlin’s Gradle plugin.
  • The Gradle plugin now supports configuration avoidance
  • The Gradle plugin now generates additional detekt tasks for Android projects
  • KtLint 0.38.1 support (via detekt-formatting)
Migration
  • ArrayPrimitive rule is more precise but requires type resolution now.
  • The deprecated customReports property of the Gradle plugin got removed.
  • Deprecated properties xmlReportFile, htmlReportFile, txtReportFile are now internal.

Note the default gradle detekt task does not run over test sources. To include test sources following setup can be used:

detekt {
    // ...
    input = objects.fileCollection().from(
        "src/main/java",
        "src/test/java",
        "src/main/kotlin",
        "src/test/kotlin"
    )
}

This does not apply to gradle detektTest. We encourage to also check test sources.
We will include test sources by default in detekt 1.15.0 or later.

Changelog
  • Consolidate working for Type Resolution - #3011
  • ArrayPrimitive rule: report variable/receiver types and factory methods - #3009
  • Add requiresTypeResolution annotation to UseCheckNotNull/UseRequireNotNull - #3008
  • Update kotlinx.html dependencies - #3007
  • Do not overwrite bintray publication - #3006
  • Update Ktlint to 0.38.0 - #3004
  • Add UseRequireNotNull/UseCheckNotNull rules - #3003
  • Workaround config - #3001
  • Replace require(x != null) with requireNotNull(x) - #2998
  • Minor Gradle plugin cleanup - #2997
  • detekt-gradle-plugin has two publishing configuration - #2996
  • Introduce @requiresTypeResolution to KDoc for rules - #2993
  • Fix support for Gradle configuration cache - #2992
  • Fix false positive for UnnecessaryLet with disabled type resolution - #2991
  • Deprecation: False positive with Kotlin 1.4.0 - #2990
  • False positive in UnnecessaryLet - #2987
  • Gradle plugin fixes - #2986
  • Remove deprecated customReports detekt task property - #2811 - #2944
  • Rename IsPropertyNaming to NonBooleanPropertyPrefixedWithIs? - #2819
  • Add automatic detekt tasks for Android Plugins - #2787
Housekeeping & Refactorings
  • Update Gradle to 6.6.1 - #3016
  • Run detekt with type resolution analysis on CI - #3015
  • Run Gradle Android tests conditionally when sdk path is defined - #3014
  • Fix documentation for NonBooleanPropertyPrefixedWithIs - #3012
  • Run detekt on all test sources - #3010
  • Do not publish test fixture; removing warning - #3005
  • Implement custom rule to check spek test discovery performance issues - #2954

See all issues at: 1.12.0

1.12.0-RC1 - 2020-08-20

Notable Changes

The Gradle plugin now requires at least Gradle 5.4. This aligns with Kotlin’s Gradle plugin.

Changelog
  • Support Kotlin 1.4 - #2981
  • 1.10.0 to 1.11.0 Could not find org.spekframework.spek2:spek-dsl-jvm - #2976
  • Make a release built against Kotlin 1.4 - #2974
  • Roll back to non snapshot spek version - #2922

See all issues at: 1.12.0-RC1

1.11.2 - 2020-08-19

Changelog
  • Fix formatting regression where issues printed the whole filename - #2988
  • Baseline adds file path instead package - #2985

See all issues at: 1.11.2

1.11.1 - 2020-08-18

Changelog
  • Fix regression separating classpath entries - #2961 - #2977
  • Show groovy and kotlin dsl in the same page - #2971
  • Fix typo - #2969
  • UnnecessaryLet: fix false positive when let is used for destructuring - #2968
  • UnnecessaryLet false positive when let is used for destructuring - #2966
  • Merge gradle groovy dsl and kotlin dsl documentation in the same page - #2846
  • Run Detekt as Kotlin Compiler Plugin - #2119

See all issues at: 1.11.1

1.11.0 - 2020-08-13

Changelog
  • Fix false positive for UnnecessaryApply with disabled type resolution - #2963
  • Add new rule: LibraryEntitiesCannotBePublic - #2959
  • Suggest rule: Class cannot be public. - #2943
  • False positive in UnnecessaryApply - #2938
  • Add NullableToStringCall rule - #2903
  • New rule: toString over a nullable value - #2901
  • Introduce tooling-api - #2860

See all issues at: 1.11.0
See all issues at: 1.11.0-RC2
See all issues at: 1.11.0-RC1

1.11.0-RC2 - 2020-08-09

Changelog
  • Actually print the invalid properties - #2955
  • Update FindingsReport doc - #2942
  • Document reports on homepage - #2941
  • Set missing code languages in doc - #2935
  • Fix sitemap.xml - #2933
  • Flag listOfNotNull if all arguments are non-nullable - #2932
  • Add LanguageVersionSettings and DataFlowValueFactory to BaseRule - #2929
  • Generate release date to the changelog entries - #2924
  • Add informative message to UselessCallOnNotNull report - #2920
  • Flag listOfNotNull if all arguments are non-nullable - #2916
Housekeeping & Refactorings
  • Reduce test discovery for metrics module - #2953
  • Reduce test discovery for rules-style module - #2952
  • Reduce test discovery for rules-naming module - #2951
  • Reduce test discovery for rules-exceptions module - #2950
  • Reduce test discovery for rules-complexity module - #2949
  • Reduce test discovery for formatting module - #2948
  • Reduce test discovery for core module - #2947
  • Reduce test discovery for cli module - #2946
  • Reduce test discovery for api module - #2945
  • Update kramdown to remedy CVE vulnerability - #2940

See all issues at: 1.11.0-RC2

1.11.0-RC1 - 2020-08-02

Changelog
  • Add non-affirming test cases for UselessCallOnNotNull - #2918
  • Add Github Action: Detekt All to readme - #2915
  • Remove deprecated BuildFailureReport from doc - #2914
  • Document Console Reports code - #2913
  • Update docs in ProjectMetric class - #2912
  • Document Output Reports code - #2911
  • Document Output Reports on the home page - #2910
  • Add doc to UseDataClass - #2909
  • Generate output report config parts for config validation to know the properties - #2907
  • Fix UseDataClass to accept classes that implement interfaces - #2905
  • UseDataClass does not report for classes that implement interfaces - #2904
  • Add bindingContext function to FileProcessListener - #2872 - #2900
  • IgnoredReturnValue: Fix false positive on chained statements - #2895
  • Setup local PGP signing of published artifacts - #2893
  • error in output-reports config - #2891
  • OptionalUnit: fix false positive with ‘else if’ - #2888
  • OptionalUnit: don’t report it if Unit is used as an expression - #2886
  • Preserve original exception when loading an invalid config - #2884
  • Sign artifacts and publish checksums - #2883
  • Check string arguments with TR enabled - #2879
  • Detekt Deployment is missing Gradle Module files - #2878
  • Better Support for Guard Clauses in ThrowsCount Rule - #2876
  • Make KtTestCompiler internal - #2874
  • Don’t mention the old performance impact - #2873
  • Support for BindingContext in FileProcessListener - #2872
  • Hide KtTestCompiler as internal - #2871
  • Document Console and Output Reports - #2869
  • Split rules module into a module per rule set - #2865
  • Add new rule UseEmptyCounterpart - #2864
  • Introduce tooling api module - #2861
  • Extend docs on Processors - #2854
  • Add a rule to flag places where emptyList (and similar) can be used - #2850
  • Clarify / document processors and console reports in config - #2833
  • Fix UnnecessaryLet false negatives - #2828
  • UnnecessaryLet false negatives - #2826
  • False positive in OptionalUnit rule - #2452
Housekeeping & Refactorings
  • Test performance improvements - #2921
  • Remove redundant guard clauses - #2919
  • The tests are slow - #2902
  • Drop dependency on detekt test utils for Gradle plugin - #2899
  • Use KtFile.name instead of storing an absolute path key - #2898
  • Fix testcase with early access jdk’s - #2897
  • Publish to Bintray using maven-publish - #2885
  • Simplify internal parsing to KtFile’s - #2875
  • Mention bazel integration and a new blog article - #2867
  • Mention bazel and github actions integration - #2866
  • Cleanup code - #2862
  • Make sure to always target JVM 8 bytecode - #2853
  • Refactor - #2849
  • Clear findings even if we are not going to visit the file - #2848
  • Update Spek to 2.0.12 - #2847
  • Speed up generateDocumentation - #2832
  • Simplify pre-merge.yaml - #2823

See all issues at: 1.11.0-RC1

1.10.0

Notable Changes
  • New rules: IgnoredReturnValue, ImplictUnitReturnType
  • The complexity report (console/html) now calculates the cognitive complexity metric for your project.
  • Issues at functions and classes are now reported at the identifiers. This is especially helpful in the IntelliJ plugin.
  • Extension authors can now manipulate the findings with the new ReportingExtension.
  • detekt-formatting was updated to use KtLint 0.37.2 which includes a lot of improvements and changes. Please see their changelog.
    • New wrapper rules: SpacingAroundDoubleColon, SpacingBetweenDeclarationsWithCommentsRule, SpacingBetweenDeclarationsWithAnnotationsRule
    • You can configure the layoutPattern for ImportOrdering in detekt’s configuration file.
    • Indentation rule was replaced with a new implementation.
  • The default-detekt-config moved to detekt-core/src/main/resources/default-detekt-config.yml. Please update your links if you used it for references.
Migration
  • We fixed a regression in baseline signatures. This breaks baseline ids for reported issues at functions for some rules. You may need to regenerate the baseline file or manually change the ids. We are very sorry for this inconvenience.
  • KtLint replaced their default Indentation rule. Expect new formatting issues here!
  • We removed HierachicalConfig interface. It was deprecated in 1.7.0 and could lead to OOM errors when reusing Config embedding detekt. If you used Config.parent.key in your code, Config.parentPath is an alternative for this interface.
  • We are dropping the thin wrapper tasks over Intellij’s inspections.sh and format.sh. They were broken for some time and in general sparingly used. There are alternative ways to run these scripts: https://www.jetbrains.com/help/idea/command-line-formatter.html or https://github.com/bentolor/idea-cli-inspector.
  • XML-tags in the baseline file now have more meaningful names:
    • Whitelist -> ManuallySuppressedIssues
    • Blacklist -> CurrentIssues
    • Note: the old names will work until a new major release
Changelog
  • UnusedPrivateClass: fix false negative with import directives - #2817
  • UnusedPrivateClass: false negative with import directives - #2816
  • Publish detekt-bom module - #2814
  • [Gradle] Configuration cache support - #2813
  • UnusedPrivateClass: don’t report imported classes - #2812
  • False positive UnusedPrivateClass when importing private enum constants directly. - #2809
  • Upgrade ktlint to version 0.37.2 - #2807
  • LongMethod: disregard params in method definition - #2806
  • LongMethod should not consider parameters while calculating the number of lines - #2804
  • Local vars inside object literals can’t be const - Closes #2794 - #2799
  • MayBeConst should not report properties in local anonymous object declarations - #2794
  • Fix false positive for UnusedPrivateClass on generics - #2793
  • Report ComplexInterface issues at identifiers - #2786
  • Construct signatures based on named declaration instead of just the identifier - #2785
  • KtLint to 0.37.1 - #2783
  • Implement new rule ImplictUnitReturnTypet - #2781
  • Feature/restrict is properties - #2779
  • Rename Blacklist and Whitelist to be self explanatory - #2778
  • Remove deprecated HierarchicalConfig which could lead to OOM when reusing Config objects - #2768
  • Support layout property for ImportOrdering rule - #2763
  • Wrap three new experimental KtLint rules - #2762
  • Upgrade to ktlint 0.37.0 - #2760
  • Introduce reporting extensions - #2755
  • Add default print methods to ForbiddenMethodCall - #2753
  • Add the ignoreAnnotated array parameter to the FunctionNaming rule - #2734
  • FunctionNaming: Needs “ignoreAnnotated” - #2733
  • State that speeding the detekt task just applies to version < 1.7.0 - #2730
  • Add cognitive complexity in complexity report - #2727
  • add better documentation for the LongParameterList ignoreAnnotated - #2714
  • IgnoreReturnValue: config options - #2712
  • Use experimental indentation rule set instead of the unused from the standard rule set - #2709
  • Remove idea integration - #2706
  • Improve issue reporting/report at identifiers and package declarations - #2699 - #2702
  • Feature request - limit number of lines for an issue to 1 - #2699
  • New Rule: IgnoredReturnValue - #2698
  • New rule: NoPrintStatement - #2678
  • Add default values to SwallowedException rule - #2661
  • [V1.6.0 -> V1.7.4] Error reading configuration file, java.util.zip.ZipException: invalid code lengths set. - #2582
  • New rule: Warn on ignored return value - #2239
  • File ‘C....idea’ specified for property ‘ideaExtension.path’ is not a file. - #2172
  • ktlint integration does not report most errors - #2161
  • Non deterministic output. False positives on Indentation rule - #1633
Housekeeping & Refactorings
  • use parallel build options - #2808
  • Compile Test Snippets on Java 14 - #2803
  • Cleanup MayBeConst tests - #2802
  • Refactor compare_releases script to use clikt - #2801
  • Simplify the Code Coverage workflow - #2798
  • Run compile-test-snippets in a isolated job - #2797
  • Run verifyGeneratorOutput in a isolated job - #2796
  • Introduce BoM to manage our own dependencies - #2792
  • Smarter Caching on Github Actions - #2788
  • Fix config generation directory - #2782
  • Disable Gradle daemon on CI - #2780
  • Convert github-milestone-report.groovy to main.kts - #2777
  • Prepare 1.10.0-RC1 release - #2776
  • Fix memory leak with not closing processing settings - #2775
  • Do not print passing tests on the console - #2774
  • Run in parallel by default - #2773
  • Remove core module dependency for detekt-test - #2771
  • Unify extension debug printing - #2770
  • Package editorconfig dependency into the jar for formatting module - #2769
  • Update spek to 2.0.11 disabling timeouts - #2767
  • Introduce additional changelog section filtering developing/refactoring noise for the users - #2766
  • Move config validation from cli to core - #2764
  • Improve the performance of tests which use type resolution - #2756
  • Move reporting logic to core module - #2754
  • Cleanup tests in ProtectedMemberInFinalClass - #2752
  • Add referential equality test case in EqualsAlwaysReturnsTrueOrFalse - #2751
  • Extract xml and html reports to own modules - #2750
  • Separate console and output report loading - #2749
  • Bump actions/cache to v2 - #2746
  • Fix EqualsAlwaysReturnsTrueOrFalse doc - #2744
  • Simplify core facade class - #2743
  • Mark some well known cli functions as implicit unsupported api - #2742
  • Move baseline feature to core module - #2741
  • Make baseline entities internal - #2740
  • Simplify baseline data structures - #2739
  • Move baseline utils to the baseline package - #2738
  • Bump github-pages from 204 to 206 in /docs - #2737
  • Update gradle scan plugin - #2736
  • Update test dependencies - #2735
  • Move three core-related tests to core module - #2731
  • Update to Gradle 6.4.1 - #2729
  • Migrate to resource function of test-utils - #2728
  • Remove own collectByType function as Kotlin’s does not crash anymore - #2726
  • Move processors to metrics module - #2725
  • Create publish tasks lazily - #2723
  • Faster documentation generation - #2722
  • Modularize test module - #2720
  • Introduce parser and psi module - #2716
  • Clean up code by using builtin associateBy function - #2715
  • [Security] Bump activesupport from 6.0.2.1 to 6.0.3.1 in /docs - #2708
  • Correct formatting issues - #2707

See all issues at: 1.10.0

1.9.1

Changelog
  • Add negative tests to UnreachableCode rule - #2697
  • Inline test cases of CollapsibleIfStatements - #2696
  • Inline unreachable code - #2695
  • Fix wrong test cases for CollapsibleIfs rule - #2694
  • Print loaded rule set classes on debug - #2691
  • Fix wrong test cases for MandatoryBracesIfStatements - #2689
  • Simplify LongParameterList tests - #2688
  • Fix serialVersionUID false positive in UnderscoresInNumericLiteral - #2687
  • False positive UnderscoresInNumericLiterals in Serializable - #2686
  • Report a better message for LongParameterList - #2685
  • Report a better message for LongParameterList - #2684
  • Test against the newest Java version - #2682

See all issues at: 1.9.1

1.9.0

Changelog
  • Extra documentation added to pitfalls section - #2675
  • Use configuration avoidance for withType usages - #2672
  • GuardClause also matches if-with-body that contains a return - #2671
  • Simplify patterns - #2668
  • Include Kotlin multiplatform test folders to default exclude config - #2667
  • Remove duplicate MandatoryBracesLoops rule tests - #2665
  • Remove print statement in MandatoryBracesLoops - #2664
  • Remove $ as a valid char in class and method names - #2662
  • Build detekt executable before publishing it - #2654 - #2659
  • Add style rule for mandatory braces in for loop bodies - #2658
  • Asset in release 1.8.0 is not up-to-date - #2654
  • Rule: Mandatory braces for single-line for loop bodies - #2652
  • Use task configuration avoidance for detekt plugin - #2651
  • Add detekt GitHub action to readme - #2650
  • Don’t report unused private properties in expect class - #2646
  • UnusedPrivateMember: don’t report parameters in expect/actual functions - #2643
  • UnusedPrivateMembers on expect class - #2636
  • Include Kotlin multiplatform test folders to default exclude configuration - #2608

See all issues at: 1.9.0

1.8.0

Notable Changes
  • Most rule properties now support yaml lists next to string’s with comma-separated-entries.
  • Standalone detekt executable on GitHub release pages
  • New rules: UnnecessaryNotNullOperator and UnnecessarySafeCall
Migration
  • Formatting rules get reported now on the correct lines. The baseline file may need to be adjusted/regenerated.
  • Issues concerning classes and objects are now reported at the identifier. The baseline file may need to be adjusted/regenerated.
Changelog
  • Use yaml lists in our own configuration and tests - #2623
  • Run code coverage as an own action - #2622
  • Modularize build script by introducing buildSrc module - #2621
  • *>excludes allow yaml list - #2620
  • Kotlin to 1.3.72 - #2619
  • Set failfast to false for pre-merge - #2618
  • Update documentation - #2617
  • ThrowingExceptionsWithoutMessageOrCause>exceptions allow yaml list - #2616
  • SwallowedException>ignoredExceptionTypes allow yaml list - #2615
  • ForbiddenPublicDataClass>ignorePackages allow yaml list - #2614
  • LabeledExpression>ignoredLabels allow yaml list - #2613
  • ForbiddenMethodCall>methods allow yaml list - #2612
  • Generate the cli as a stand alone executable - #2607
  • Report class and object violations at the identifier - #2606
  • Fix formatting line reporting - #2604
  • Correct documentation/recommendation of EmptyCatchBlock rule - #2603
  • Incorrect (or unclear) EmptyCatchBlock rule - #2602
  • Use more lintAndCompile - #2601
  • MagicNumber>ignoredNumbers allow yaml list - #2600
  • Remove unnecesary symbolic link - #2598
  • WildcardImport>excludeImports allow yaml list - #2596
  • ForbiddenClassName>forbiddenName allow yaml list - #2595
  • Fix false positives in UndocumentedPublicProperty - #2591
  • Fix false positive in UndocumentedPublicClass - #2588
  • >Annotated* allow yaml lists - #2587
  • ForbiddenComment>values allow yaml list - #2585
  • ExceptionRaisedInUnexpectedLocation>methodNames allow yaml list - #2584
  • ComplexMethod>nestingFunctions allow yaml list - #2583
  • UndocumentedPublicClass false positive for inner types - #2580
  • New Rule: UnnecessaryNotNullOperator - #2578
  • New Rule: UnnecessarySafeCall - #2574
  • New Rule: UnnecessarySafeCall - #2572
  • Add ignoreAnnotated option to LongParameterList - #2570
  • Rule configuration request: Ignore based on annotations - #2563
  • codecov test coverage report doesn’t work correctly - #2558
  • Support yaml lists in the configuration values - #2498
  • Baseline ignoring MaxLineLength: on 1.0.1 - #1906
  • Formatting rules are reported at wrong line (e.g. MaximumLineLength) - #1843

See all issues at: 1.8.0

1.7.4

Notable Changes

The last Gradle plugin version was referencing 1.7.2 instead of 1.7.3. This was fixed and specifying the toolVersion is not necessary anymore.

detekt {
    toolversion = "1.7.3"
}
Changelog
  • Revert warning: jcenter is missing (#2550) - #2576
  • Add additional task input for plugin version task - #2575
  • jcenter() requirement - #2571

See all issues at: 1.7.4

1.7.3

Changelog
  • OptionalWhenBraces: fix false positive with lambda which has no arrow - #2568
  • OptionalWhenBraces: false positive with lambda which has no arrow - #2567
  • valueOrDefaultCommaSeparated throws a ClassCastException - #2566
  • 1.6.0 -> 1.7.2: java.lang.String cannot be cast to java.util.List - #2561
  • Display actual and threshold values for several metric rules - #2559
  • Return the actual values for complexity rules - #2557
  • UseCheckOrError/UseRequire: fix false positive with a non-String argument - #2556
  • InstanceOfCheckForException: do not report when catch blocks do not check for the subtype of an exception - #2555
  • Include statistics for our custom detekt tasks - #2554
  • Remove unnecesary parentheses - #2553
  • Fix console output indentation - #2552
  • Console output is not indented correctly - #2551
  • Check jcenter repository present in Gradle plugin - #2550
  • Adding Detekt to a project from scratch, detektGenerateConfig is broken - #2549
  • Validate Wrapper only on push to master - #2548
  • Cleanup Gradle Folders - #2547
  • Require CI to pass to run codecov - #2546
  • Export bintray key to publish snapshots - #2544
  • Activate UseErrorOrCheck rule - #2542
  • Refactor build file to sections - #2541
  • False positive: UseCheckOrError - #2514
  • InstanceOfCheckForException should be ignored for catch blocks that is more than an if expression - #1927

See all issues at: 1.7.3

1.7.2

Changelog
  • Remove ignore:AppVeyor from codecov config - #2540
  • Use kotlin-stdlib-jdk8 to reduce dependency conflicts - #2527 - #2538
  • Update Gradle plugin-publish to 0.11.0 - #2537
  • Delete created temp dir automatically on JVM exit - #2536
  • Delete created temp file automatically on JVM exit - #2535
  • Refactor MemberNameEqualsClassNameSpec tests - #2534
  • Fix UnnecessaryAbstractClass false-positive - #2533
  • Update GroovyDSL doc to mention input - #2532
  • Update KotlinDSL doc to mention input - #2531
  • Fix report for documented data classes property - #2530
  • UndocumentedPublicProperty reported for documented data classes property - #2529
  • Detekt using gradle documentation out of data - #2528
  • 1.7.1 does not depend on Kotlin 1.3.71 - #2527
  • UnnecessaryAbstractClass false positive for abstractproperties - #2526
  • Do not fail the build on config property warnings/deprecations - #2523 - #2525
  • regression 1.7.1, threshhold does not exist - #2523
  • Setup GitHub Actions - #2512

See all issues at: 1.7.2

1.7.1

Changelog
  • UnnecessaryAbstractClass: fix false positive when abstract class has abstract inherited members - #2513
  • UnusedPrivateMember: report unused overloaded operators - #2510
  • Fix build compile error resulted from merging two conflicting PRs - #2508
  • Update Kotlin to 1.3.71 - #2507
  • Remove duplicated test task setup for gradle plugin - #2506
  • Add LicenceHeaderExtension test to verify resource path loading is supported - #2505
  • Ensure filesystems are created so paths can be gotten - #2504
  • FileSystemNotFoundException in detekt 1.7.0 when using –config-resource - #2503
  • MemberNameEqualsClassName: fix false negative when function has no explicit return type - #2502
  • Use the system-dependent line separator in NotificationReport - #2497
  • Remove default print stream - #2496
  • Don’t use System.out in the ProgressListeners - #2495
  • Make the gradle plugin a sub project again - #2493
  • Move test factory outside the main code - #2491
  • Single runner - #2490
  • ProcessingSettings - #2489
  • Don’t use println :detekt-generator - #2488
  • Simplify tests with StringPrintStream - #2487
  • Improve tests - #2486
  • Use PrinterStream in AstPrinter - #2485
  • Errors running detekt in the detekt project - #2484
  • Unify yml strings - #2482
  • Use yml arrays to list the ForbiddenImports - #2474
  • Add date, detekt-version + link to HtmlReport - #2470
  • Refactor FindingsReport + FileBasedFindingsReport - #2454
  • The Detekt HTML Report should include date, version number, website link (Feature Request) - #2416
  • Added validation of constructors to LongParameterList - #2410
  • UnusedPrivateMember doesn’t report the correct warning count - #1981
  • UnusedPrivateMember should consider overloaded operators - #1444
  • False positive on rule UnnecessaryAbstractClass - #727
  • MemberNameEqualsClassName ignores functions which return a single expression - #655

See all issues at: 1.7.1

1.7.0

Notable Changes
  • The Gradle plugin should be on par with the CLI performance-wise
  • Good to know: detekt CLI always supported argument files (java -jar detekt-cli.jar @argsfile)
  • New CLI --version flag
  • New Rule AbsentOrWrongFileLicense and other rule improvements
Changelog
  • Update Travis to use the newest xcode11.3 image - #2480
  • Synchronize use of root extension point - #2479
  • Extend ComplexInterface to support exclusion of private member/functions - #2478
  • Minor refactors around –create-baseline - #2477
  • Check primary ctor in UndocumentedPublicProperty - #2475
  • Unify yaml strings - #2472
  • Running detektBaseline generates too general exceptions, disabling rules - #2471
  • UndocumentedPublicProperty doesn’t check primary constructor - #2468
  • Remove default implementations of toString() - #2467
  • Remove tags from core documentation sites - #2466
  • Validate boolean config values - Closes #2045 - #2465
  • Add test for BaselineHandler - #2462
  • Refactor BaselineFormatSpec.kt - #2461
  • Add tests for BaselineFacade - #2460
  • Fix toString() output for Whitelist class - #2459
  • Remove unused functions in XmlExtensions.kt - #2458
  • Add test cases for invalid yaml config - #2457
  • Add edge test cases for ComplexityReportGenerator - #2456
  • Simplify anonymous Detektion object creation - #2455
  • Update trim logic in Debt:toString() - #2453
  • Refactor FindingsReport + FileBasedFindingsReport - #2451
  • Rename tests with _Test prefix to _Spec - #2450
  • Refactor HtmlOutputReport - #2449
  • Simplify UnnecessaryApplySpec test cases - #2448
  • Link code samples package for extension guide - #2447
  • ComplexInterface - should it also count private methods? - #2446
  • Update AppVeyor branch conf to comply with Travis - #2445
  • Add PsiViewer plugin to Contributing guide - #2444
  • UnnecessaryApply: fix false positive when it’s used as an expression - #2442
  • Add detekt-hint to integrations - #2441
  • SwallowedException: fix false negative when using variables - #2436
  • UnnecessaryApply false positive cases - #2435
  • Prepare 1.7.0-beta2 release - #2434
  • Parallel invocation of DetektFacade fails spuriously - #2433
  • Deprecate BaseRule and state that it will be make sealed - #2365 - #2432
  • Add License rule - #2429
  • Skip all guard clauses at function start for ReturnCount - Closes #2342 - #2428
  • Fail if --baseline file not found - #2427
  • Add tests for YamlConfig - #2426
  • Choose a minimum codecov patch coverage ratio - #2425
  • Include ruleset-suppression feature doc - #2424
  • Add Groovy DSL example for jvmTarget to homepage - #2423
  • Add groovy dsl example for jvmTarget - Closes #2408 - #2422
  • Deprecate hierarchical config - #2421
  • Deprecate implementations of Config - #2420
  • Remove YAML Extension Requirement - #2419
  • Update Spek version to 2.0.10 - #2418
  • file does not end with .yml! - #2417
  • Disable autoCorrect property for all rules if global flag is set to false - #2413
  • Release 1.7.0 beta - #2409
  • Stop using kotlin-reflect - #2405
  • Stop compiling with experimental flag - #2404
  • Only post a code coverage patch status to PRs - #2402
  • ExplicitCollectionElementAccessMethod: Don’t report on nullable collection - #2401
  • Discourage new Case files - #2399
  • Use argsfiles for CI - #2397
  • Update to Kotlin v1.3.70 - #2396
  • Fix typo in VersionPrinter test - #2395
  • Add documentation for cli –version flag - #2392
  • ExplicitCollectionElementAccessMethod: Do not report map?.get(“foo”) - #2391
  • Update Gradle to 6.2.1 - #2390
  • Do not report conditional elvis continue statements - Closes#2388 - #2389
  • False positive: UnconditionalJumpStatementInLoop with elvis operator ?: - #2388
  • Refactor getting the detekt version for readability - #2387
  • Create less objects and sets when creating findings id map - #2385
  • Add –version to cli - #2383
  • Add --version CLI option - #2382
  • Add test cases for cli/runners package - #2381
  • Sort and run correctable rules first - #2341 - #2378
  • Should fail if --baseline file does not found? - #2374
  • Deprecate rule set methods which expose implementation details of detekt-core - #2366
  • Deprecate api’s exposing detekt-core implementation details - #2365
  • ReturnCount excludeGuardClauses not working - #2342
  • Mixing autocorrectable and non correctable rules results in obsolete issue locations for reports - #2341
  • Allow Detekt CLI to take an args file. - #2318
  • Homepage doesn’t show Jekyll tags correctly - #2309
  • Call detekt reflectively - #2282
  • Copyright header rule for Kotlin files - #1515 - #2077
  • SwallowedException false negative - #2049
  • Invalid boolean config values are evaluated silently to false - #2045
  • Detekt gradle is much slower than the jar - #2035
  • Cases files are super rigorous to work with - #1089

See all issues at: 1.7.0

1.6.0

Migration

Rule set authors do not need to exclude their rule set from config validation anymore. This will be done by default now.

If you need to include further config property checks, give the new ConfigValidator api a try.

Changelog
  • Check-in ConfigValidator documentation - #2368
  • Remove obsolete PathFilter class - #2367
  • Reference coroutines doc for homepage - #2363
  • [Documentation Request] Coroutine Ruleset - #2362
  • Extend AnnotationExcluder to catch fully qualified annotations - #2361
  • UnnecessaryAbstractClass excludeAnnotatedClasses not working - #2360
  • Replace LinkedList with ArrayDeque - #2358
  • Fix detection of CRLF line endings - #2357
  • Introduce new ConfigValidator extensions - #2285 - #2356
  • Include options to better meet requirements for utility files - #2355
  • Don’t normalize file content twice - #2354
  • Remove unused code in rules/Case.kt - #2351
  • Add blog post about speeding up a detekt task - #2349
  • Add tests for setting KtLint’s config - #2348
  • add details into internal validation - #2347
  • Minor change in the HTML report: Remove extra space when you copy the file path - #2344
  • detekt does not always inject the required EDITOR_CONFIG_USER_DATA_KEY for ktlint - #2339
  • Remove duplicate tests for TooManyFunctions rule - #2338
  • Add EmptyTryBlock rule - #2337
  • Use requireNotNull for arguments checking - #2336
  • Refactor and add tests to Ast- and ElementPrinter - #2335
  • Add test case for disabled reports - #2334
  • Refactor ReportPath:load() - #2333
  • Add test case for FileProcessorLocator - #2332
  • Add test cases for Kt(Tree)Compiler - #2331
  • Add equality test cases for PathFiler - #2330
  • Add local function test case for MethodOverloading rule - #2328
  • Add anonymous object expression test case for MethodOverloading rule - #2327
  • Validate Gradle Wrapper - #2326
  • Use more consistent metrics in HtmlReport - #2325
  • Fix ClassCastException in ExplicitCollectionElementAccessMethod - #2323
  • ExplicitCollectionElementAccessMethod crashes - #2322
  • use same behaviour for valueOrNull as for valueOrDefault - #2319
  • FailFastConfig.valueOrNull should return specified value for active and maxIssues - #2316
  • Bugfix: MagicNumber with ignoreNamedArgument and a negative value - #2315
  • More consistent reports - #2291
  • Change MatchingDeclarationName to handle utility files - #1500
  • False-positive MagicNumber issue reported when using negative numbers - #530

See all issues at: 1.6.0

1.5.1

  • Update intro page to deprecate input property - #2311
  • Update codecov run settings to after_n_builds=4 - #2305
  • Update GroovyDSL doc to deprecate input property - #2304
  • Update KotlinDSL doc to deprecate input property - #2303
  • Fix ExplicitCollectionElementAccessMethod crash - #2302
  • ExplicitCollectionElementAccessMethod crashes - #2301

See all issues at: 1.5.1

1.5.0

Notable Changes
  • detekt is now silent by default. It only prints something if issues are found. Remove the following excludes if you want the old behavior back.
console-reports:
  active: true
  exclude:
     - 'ProjectStatisticsReport'
     - 'ComplexityReport'
     - 'NotificationReport'
  • detekt now fails the build if any issue is found. Change the maxIssues property to 10 for the old threshold.
build:
  maxIssues: 0
  • The HTML report now prints the issue count per rule and rule set.
  • New rules: ExplicitCollectionElementAccessMethod and ForbiddenMethod
Changelog
  • add new mention to README.md - #2293
  • Sort html report - #2290
  • Number format in some report - #2289
  • Show the finding count in the html report - #2288
  • Keep the order of the issues in the html report - #2287
  • Show issue count in the html report - #2286
  • Fixing the Documentation not properly calling the superclass - #2284
  • Do you have to call super in custom rules? - #2283
  • Measure performance of various stages when using –debug - #2281
  • Remove printing the whole config for –debug - #2280
  • Introduce DefaultRuleSetProvider interface marking detekt-rules providers as default - #2279
  • Simplify test dependency setup in build files - #2278
  • Fix class loader memory leaks when loading services - #2277
  • Always dispose Kotlin environment fixing memory leak in error cases - #2276
  • Sanitize gradle build scripts and suppress unstable api usages - #2271
  • Update website ruby dependencies fixing potential security vulnerability - #2270
  • Fix regression not considering baseline file when calculating build failure threshold - #2269
  • Turn detekt silent by default - #2268
  • Remove redundant build failure message - #2264 - #2266
  • Build failed with… is printed twice in the cli - #2264
  • Update config:maxIssues value to 0 - #2263
  • Don’t flag inherited visibility in NestedClassesVisibility - #2261
  • Simplify argument parsing logic, remove any exitProcess() calls from buildRunner - #2260
  • Modify default behavior to not output unless errors are found. Adding a verbose flag which will have legacy behavior - #2258
  • Test some edge cases in detekt-api - #2256
  • Add a new line at the end of the txt report - #2255
  • Implement ExplicitCollectionElementAccessMethod rule - #2215
  • ForbiddenMethod Rule - #1954
  • NestedClassesVisibility(False negative): Nested class doesn’t inherit visibility from parent - #1930

See all issues at: 1.5.0

1.4.0

Notable Changes

New rule set coroutines with two specialized rules was added.
As always new rules must be activated by the user until they get stable.

coroutines:
  active: true
  GlobalCoroutineUsage:
    active: false
  RedundantSuspendModifier:
    active: false

Wrapped KtLint was updated to 0.36.0 introducing two rules

  • EnumEntryNameCase
  • NoEmptyFirstLineInMethodBlock
Migration

The properties ignoreOverriddenFunction and ignoreOverriddenFunctions of some rules got deprecated and unified to a new property ignoreOverridden.

Changelog
  • Refactor BuildFailure code - #2250
  • Fix nested methods bug in MethodOverloading rule - #2249
  • ThrowingExceptionInMain rule should consider main() function with no parameters - #2248
  • MethodOverloading bug with nested overloaded methods - #2247
  • Reduce complexity in FindingsReport - #2246
  • Add RedundantSuspendModifier rule - #2244
  • New ktlint rules - #2243
  • Inline MethodOverloading case file - #2241
  • ThrowingExceptionInMain: fix #2248 and add tests - #2240
  • Add disposing Kotlin environment. - #2238
  • OOM on multiple invocations - #2237
  • Improve doc for UnusedPrivateMember - #2236
  • Don’t resolve dependencies during project configuration - #2235
  • Revert “Introduce Pull Request Labeler” - #2234
  • Fix #2230 equals() func detection - #2233
  • Fix git commit-hook label and code snippet doc - #2232
  • WrongEqualsTypeParameter does not ignore multi-parameter equals methods - #2230
  • Introduce Pull Request Labeler - #2228
  • Gradle plugin: Build upon default detekt config - #2227
  • Apply ktlint formatting plugin to Gradle plugin - #2226
  • Bump dependencies - #2225
  • Run shadowJar & installShadowDist task with everything else - #2220
  • Travis: Use consistent Java vendor - #2219
  • “Property is misspelled or does not exist” error for new rules in default rulesets - #2217
  • MethodOverloading false positive if every entry of an enum implement a method. - #2216
  • Add Git detekt pre-commit hook doc - #2214
  • Remove exclude workaround for new build property - #2203
  • Add GlobalCoroutineUsage rule + coroutines ruleset - #2174
  • Add rule [RedundantSuspend] to detect redundant suspend modifiers - #2156
  • Deprecate ignoreOverriddenFunction/s in favor of ignoreOverridden - #2132

See all issues at: 1.4.0

1.3.1

  • Remove old unused documentation - #2210
  • Show code snippet erros in html reports - #2209
  • Use compileAndLint in UnusedPrivateClassSpec - #2208
  • Fix false positive in UnusedPrivateClass - #2207
  • Update readme promoting new properties of the gradle plugin - #2205
  • Rename default const containing ACCEPTED - #2204
  • Mistake From LongParameterList.kt - #2202
  • Exclude yet unknown new build property - #2201
  • Add comment regarding type resolution to README - #2199
  • Type resolution doc - #2198
  • Correct indentation for Groovy DSL doc - #2197
  • Use shorthand syntax for assertThat() - #2196
  • Refactor MagicNumber to use commaSeparatedPatterns - #2195
  • Attach FILE_PATH_USER_DATA_KEY user data on FormattingRules (#1907) - #2194
  • Handle invalid config exit code in gradle plugin - #2193
  • Add tests showing how to exclude custom config properties in plugins - #2192
  • Fix suppression of KtLint rules on file level - #2179 - #2191
  • Mention needed kotlinx.html library from jcenter - #2146 - #2190
  • UnusedPrivateClass has false positive behavior for deserialized items - #2158
  • Use JDK 11 (LTS) + 13 for AppVeyor builds - #2141
  • Document how to create a common baseline file for multi module gradle projects - #2140
  • DetektAll with baseline fails with error - #2100
  • ForbiddenMethod Rule - #1954
  • Do not report auto-corrected formatting issues - #1840

See all issues at: 1.3.1

1.3.0

Notable changes
  • Minimal Gradle version increased to 5.0
  • New rules:
    • UnnecessaryAnnotationUseSiteTargetRule
    • MapGetWithNotNullAssertionOperator
Changelog
  • Add printers to the command line runner - #2188
  • Fix documentation of UseArrayLiteralsInAnnotations - #2186
  • Inline resolving severity label for XML reports - #2184
  • Extract common jvm target value, add jvmTarget into documentation. Cl… - #2183
  • Fix Detekt gradle task cache restoration issue (#2180) - #2182
  • Fix exception when running ArrayPrimitive on star-projected arrays - #2181
  • Gradle cache restoration issue - #2180
  • Add MacOS JDK13 build job to TravisCI - #2177
  • Running “ArrayPrimitive” rule on “Array<*>” causes detekt to throw exception - #2176
  • Update Spek to v2.0.9 - #2173
  • Create Rule: MapGetWithNotNullAssertionOperator - #2171
  • EqualsAlwaysReturnsTrueOrFalse fails hard on override fun equals(other:Any) = ... - #2167
  • Prepare 1.3.0 release - #2165
  • UnsafeCast: update documentation to match new behavior - #2164
  • Add jvmTarget change into documentation - #2157
  • Create UnnecessaryAnnotationUseSiteTargetRule - #2099
  • Gradle 6 - #1902
  • Gradle 6 planning - #1820

See all issues at: 1.3.0

1.2.2

Notable Changes
  • 1.2.1 introduced breaking changes for users of Gradle < 5. This was reverted.
  • 1.3.0 will drop support for Gradle < 5.
  • Fixed a regression in the html report.
Changelog
  • regression updating 1.2.0 to 1.2.1, unknown property ‘filters’ for object of type DetektExtension - #2163
  • StringIndexOutOfBoundsException when generating HTML report - #2160
  • Restore KotlinExtension - #2159
  • 1.2.1 breaks the build with: unresolved reference: detekt - #2152
  • Updated to correct classpath documentation for Android projects. - #2149
  • Update to Kotlin v1.3.61 - #2147
  • Document how to exclude detekt from the check task - #1894 - #2144
  • Use JDK 11 (LTS) + 13 for Travis builds - #2142
  • Don’t compile test snippets (bindingContext) - #2137
  • StringIndexOutOfBoundsException: String index out of range: 8 when generating HTML report after update to 1.2.0 - #2134

See all issues at: 1.2.2

1.2.1

Notable changes
  • Supports Kotlin 1.3.60
  • Fixed a regression in configuration validation logic when using build>weights>[RuleSet|Rule] properties.
  • Some rules got improvements (see changelog)
Changelog
  • Exception analyzing file - #2139
  • Simplify ConstructorParameterNaming:ignoreOverridden check - #2136
  • Test common config sections pass through config validation - #2135
  • Kotlin 1.3.60 with fix for “Unable to load JNA library” warning - #2129
  • Unexpected nested config for ‘build>weights’. - #2128
  • Remove redundant Javadoc - #2127
  • Lazy init KotlinScriptEnginePool - #2126
  • Add tests for MagicNumber:ignoreLocalVariableDeclaration - #2125
  • Fix NPE for EqualsAlwaysReturnsTrueOrFalse - #2124
  • Add MagicNumber:ignoreLocalVariableDeclaration config - #2123
  • Fix MagicNumber:ignoreConstantDeclaration doc - #2116
  • Return non-nullable string in DebtSumming class - #2113
  • Refactor TrailingWhitespace test - #2112
  • Use inline code snippets instead of case files - #2111
  • UnusedImports: False positive if referenced in @throws/@exception/@sample - #2106
  • Don’t compile test snippets - #2105
  • MemberNameEqualsClassName should ignore overridden property names too - #2104
  • EqualsAlwaysReturnsTrueOrFalse crashes on certain input - #2103
  • UnusedImports: False positive if referenced only in @throws/@exception clause - #2098
  • Add config flag ignoreOverridden to ConstructorParameterNaming - #2097
  • compileAndLint is 2.5 times slower than lint - #2095
  • Improve naming tests - #2094

See all issues at: 1.2.1

1.2.0

Notable changes
  • The HTML report now includes the complexity metrics and previews of the code locations.
  • Suppression by rule set id is now supported @Suppress("detekt.[RuleSetId].[RuleId]")
  • parallel=true and --parallel now effect both the compilation and analysis phase.
  • Users of Gradle’s --parallel flag are encouraged to turn off the parallelism of detekt. Or turn it on otherwise.
  • detekt internally does not use the ForkJoinPool.commonPool() anymore. When embedding detekt feel free to pass your own ExecutionService to the ProcessingSettings.
Migration
  • Some reported positions of rules have changed, see issues starting with “Improve text location: “. This may lead to some unexpected changes in the baseline file.
  • The rule ComplexMethod got refactored and counts the cyclomatic complexity according to https://www.ndepend.com/docs/code-metrics#CC. This change lead to increasing the threshold to 15 (was ten).
Changelog
  • Update to Kotlin v1.3.60 - #2109
  • UnusedPrivateClass: Fix false positive with private annotations - #2108
  • Refactor ComplexMethod - #2090
  • Fix NestedBlockDepth false negative - #2086
  • NestedBlockDepth false negative - #2085
  • Deprecate Location.locationString - #2084
  • Add license badge to README - #2080
  • Deploy SNAPSHOTs automatically - #2079
  • Fix TrailingWhitespace reported position - #2078
  • Activate more rules by default - #1911 - #2075
  • Report InvalidRange for empty until range - #2074
  • Deprecate properties on Entity - Closes #2014 - #2072
  • Add complexity report to html output - #2071
  • Use constants for config keys in tests - #2070
  • Mention location adjustment in rules for 1.2.0 - #2068
  • Improve text location: TooManyFunctions - #2065
  • Improve text location: OptionalAbstractKeyword - #2064
  • Improve text location: NestedBlockDepth - #2063
  • Improve text location: MatchingDeclarationName - #2062
  • Improve text location: LongMethod - #2061
  • Improve text location: LargeClass - #2060
  • Improve text location: ComplexMethod - #2059
  • Improve text location: EmptyClassBlock - #2058
  • Replace spek test hasSize(0) with isEmpty() - #2057
  • Remove MacOS JDK11 CI run as discussed in #2015 - #2056
  • Introduces mocking library ‘mockk’ - #2055
  • Improve text location: InvalidPackageDeclaration - #2052
  • Improve text location: MandatoryBracesIfStatements - #2051
  • Improve text location: ClassNaming - #2050
  • potential-bugs InvalidRange does not work in all cases - #2044
  • Don’t checkBuildFailureThreshold if we are creating the baseline - #2034
  • gradle detektBaseline task fails - #2033
  • Fix #2021 - #2032
  • Update dependencies - #2031
  • Dokka fix - #2030
  • Simplify and refactor RuleProviderTest - #2029
  • Simplify MultiRuleCollector test cases - #2028
  • Dont check WrongEqualsTypeParameter if the function is topLevel - #2027
  • Fix false positive at EmptyIfBlock - #2026
  • Support guard clause exclusion for ThrowsCount rule - #2025
  • Add ImplicitDefaultLocale rule - #2024
  • Use double backtick for the in-line code - #2022
  • EqualsAlwaysReturnsTrueOrFalse: The original exception message was: java.util.NoSuchElementException: Array is empty. - #2021
  • Ignore sealed classes for utility class having public constructor rule - #2016
  • Better handling for the Suppresion of errors - #2013
  • Fix description of NoLineBreakBeforeAssignment - #2011
  • Copy paste error in message in NoLineBreakBeforeAssignment.kt - #2008
  • UtilityClassWithPublicConstructor should not be reported for sealed classes - #2005
  • Validate yaml configurations by comparing their structure - #516 - #1998
  • Allow the user to collapse the rules in the html report - #1997
  • Allow detekt findings to be suppessed with rule set id - Closes #766 - #1994
  • Upgrade Spek to v2.0.8 - #1992
  • Reimplement parallelism internal logic - #1991
  • Findings assertions - #1978
  • Fix EnumNaming textLocation - #1977
  • Add snippet code in html report - #1975
  • Change reported element in 2 documentation rules - #1952
  • Enable more rules in failfast - #1935
  • Add UndocumentedPublicProperty rule - closes #1670 - #1923
  • Calculate MCC (McCabe Complexity) accordingly - #1921
  • UseDataClass conflicts with DataClassShouldBeImmutable - #1920
  • Redesign “parallel” flag/property - #1845
  • SNAPSHOT process feedback - #1826
  • Initial MCC change - #1793
  • @Suppress(“Detekt.ruleset”) feature - #766
  • Validate Configuration file before using it - #516

See all issues at: 1.2.0

1.1.1

Changelog
  • Improved test case for resolved #1971 (TrailingWhitespace and multiline string) - #2003
  • Set defaults for boolean property when writing custom detekt tasks - #1996
  • Generate PluginVersion.kt with newline at end - #1993
  • Remove unnecessary logs from RuleProviderTest - #1990
  • Use inline code snippets instead of case files - #1989
  • Use config parameter for UseIfInsteadOfWhen rule - #1987
  • Use inline code snippets instead of case files - #1976
  • Don’t flag trailing whitespaces in multiline strings - #1971

See all issues at: 1.1.1

1.1.0

Changelog
  • Clarify threshold pararameter meaning in docs - #1974
  • Introduce ignoreLabeled config for ReturnFromFinally - #1973
  • Ignore FunctionOnlyReturningConstant for allowed annotations - #1968
  • Allow regex configuration support for Forbidden Import rule - #1963
  • Refactor and simplify RuleCollectorSpec - #1959
  • Use inline code snippets instead of case files - #1958
  • Improve UnusedPrivateMember when it’s related with parameters - #1949
  • Fix SpacingBetweenPackageAndImports issue for scripts without packages - #1947
  • Remove ConditionalPathVisitor - #1944
  • Extend UseDataClass with the allowVars configuration property - #1942
  • HasPlatformType rule - #1938
  • Bogus SpacingBetweenPackageAndImports violation for KTS without package - #1937
  • Gradle deprecations - #1934
  • UnnecessaryParentheses should be ignored for bit operations - #1929
  • Prepare 1.1.0 release - #1919
  • Deprecate debug in IDEA tasks - #1918
  • Refactoring: use more readable functions - #1916
  • Don’t fail on master when test coverage decreases - #1914
  • Detect deprecations - #1913
  • Fix typos - #1908
  • Report PreferToOverPairSyntax only for kotlin.Pair - #1905
  • Fix TimeoutCancellationException - downgrade Spek - #1903
  • Update dependencies - #1901
  • Add RedundantExplicitType rule - #1900
  • Remove unused KtAnnotated util functions - #1899
  • Simplify detekt rules - #1898
  • Fix shared variable in detekt-extension rules - #1897
  • Make samples more idiomatic - #1895
  • Update detekt extensions doc - #1893
  • Clarify WildcardImport rule configuration - #1888
  • Add configuration to allow patterns for forbidden comment - #1887
  • Only report UnsafeCallOnNullableType on actual nullable types - #1886
  • Minimise usage of Kotlin reflection - #1883
  • Refactor KotlinCoreEnvironment test setup - #1880
  • Trust Kotlin compiler to identify unsafe casts - #1879
  • Replace tabs with spaces in rule KDoc - #1876
  • Make all Gradle tasks cacheable - #1875
  • Indentation for compliant and non-compliant code examples is missing - #1871
  • Don’t build twice when PR created from branch - #1866
  • Print rendered report if it’s null or blank - #1862
  • Silence report if containing no findings - #1860
  • Group console violation reports by file - #1852
  • Update Kotlin to v1.3.50 - #1841
  • Gradle 5.6 - #1833
  • Implement rule to suggest array literal instead of arrayOf-expression in annotations - #1823
  • Make UnsafeCast less aggressive - #1601
  • Consider publishing artifacts to mavenCentral instead of jCenter - #1396
  • false positive unnecessary parentheses in conjunction with lambdas - #1222
  • False positives on UnsafeCast on AppVeyor (Windows?) only - #1137
  • PreferToOverPairSyntax false positive - #1066
  • Rule ForbiddenComment - regexp support - #959
  • UnsafeCallOnNullableType should not be reported for platform types - #880
  • Exclusion patterns in detekt-config - #775
  • Rule: OptionalTypeDeclaration - #336
  • Check if it is feasible to integrate ktlint as a rule set - #38

See all issues at: 1.1.0

1.0.1

Notable changes
Changelog
  • Migrate SafeCast test cases to JSR223 - #1832
  • Remove unused case entries - #1831
  • Migrate ComplexInterface test cases to JSR223 - #1830
  • Remove from maventask.md - [#1827](https://github.com/detekt/detekt/pull/1827)
  • Update maven-task –excludes arg - #1825
  • Improve grammar on 1.0 release post - #1822
  • Write guide on how to make detekt silent - #1819
  • Use notifications instead of println - #1818
  • JCommander 1.78 - #1817
  • Fix typo in spelling of –auto-correct flag - #1816
  • Update dependency versions - #1815
  • Tidy the build files - #1814
  • Downgrade to jcommander v1.72 - #1809
  • Update docs to mention test-pattern deprecation - #1808
  • Quiet mode or ability to disable all output in Gradle - #1797

See all issues at: 1.0.1

1.0.0

Migration
  • Gradle Plugin: removed report consolidation. It was flawed and some users were stuck with RC14. It will be replaced in a further version.
  • Gradle Plugin: autoCorrect property is now allowed on the detekt extension. No need to create a new task anymore.
  • Formatting: updated to KtLint 0.34.2 which removed the two rules NoItParamInMultilineLambda and SpacingAroundUnaryOperators.
Changelog
  • Gradle plugin: Set default path for “config” parameter - #1801
  • Don’t use provider value that may not have been set - #1800
  • Remove raw URLs from README - #1799
  • Add missing autoCorrect declarations - #1798
  • Docs: Missing autoCorrect option for various rules - #1796
  • Update to KtLint 0.34.2 - #1791
  • Add auto correct flag to detekt extension - #1790
  • Gradle plugin: Fix visibility of internal properties - #1789
  • Check classes and functions documented for api module - #1788
  • Provide default value for ignoreFailures - #1787
  • Update detekt-api documentation - #1786
  • Document meanings of rule severity levels - #1785
  • Remove unused code - #1784
  • Fix UseDataClass false positive (delegation) - #1783
  • Add ignore pattern to SwallowedException - #1782
  • Prevent adding author tags in code - #1776
  • Remove xml report consolidation. - #1774
  • Update Complex Method doc - closes #1009 - #1773
  • Implement dry-run option for detekt gradle tasks. - #1769
  • Fix missing report file issue. - #1767
  • Not running formatting autocorrect - #1766
  • Check if file exists before considering it for report merges - #1763
  • Preset ignoreFailures property with false as it is also used by Gradle - #1762
  • Rearrange badges, add codefactor - #1760
  • Update Kotlin to 1.3.41 - #1759
  • Update EmptyClassBlock to skip classes with comments in the body - #1758
  • EmptyClassBlock should consider comment as “body” (via option?) - #1756
  • Remove obsolete NoWildcardImports autoCorrect param - #1751
  • Kotlin language version handling - #1748
  • Fix cli execution doc - #1747
  • Add naming test for ForbiddenVoid rule - #1740
  • ForbiddenVoid: New option ‘ignoreUsageInGenerics’ - #1738
  • Default Gradle config path should be config/detekt/config.yml - #1262

See all issues at: 1.0.0