-
-
Notifications
You must be signed in to change notification settings - Fork 755
/
changelog 1.x.x.md
2142 lines (1851 loc) · 165 KB
/
changelog 1.x.x.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: Changelog and Migration Guide
sidebar: home_sidebar
keywords: changelog, release-notes, migration
permalink: changelog.html
toc: true
---
#### 1.19.0 - 2021-11-29
Please welcome the next upcoming stable release of Detekt: `1.19.0` 🎉
This release is coming with a lot of new features, new rules, evolution in the API and stability improvements.
Specifically, we've shipped some features that will allow you to better adapt detekt to run on codebases
that are using JetPack compose with features such as `ignoreAnnotated` and `ignoreFunction`.
As always, we want to take the opportunity to thank our contributors for testing, bug reporting and helping
us release this new version of Detekt. You're more than welcome to join our community on the [#detekt](https://kotlinlang.slack.com/archives/C88E12QH4) channel on KotlinLang's Slack (you can [get an invite here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)).
##### Notable Changes
- We now offer an `ignoreAnnotated` configuration key that you can use on all your rules to suppress findings if inside an annotated block (e.g. `@Composable`) - [#4102](https://github.com/detekt/detekt/pull/4102) and [#4241](https://github.com/detekt/detekt/pull/4241)
- Similarly, we now offer also an `ignoreFunction` configuration key that you can use to suppress findings if inside a function with a given name - [#4148](https://github.com/detekt/detekt/pull/4148)
- Report configuration is changing in the Gradle plugin. The `reports` extension on the `detekt` extension has been
deprecated. See the Migration section below for steps to migrate to the new recommended configuration - [#3687](https://github.com/detekt/detekt/pull/3687)
- The `ExplicitCollectionElementAccessMethod` rule is now a type-resolution only rule - [#4201](https://github.com/detekt/detekt/pull/4201)
- The `InvalidPackageDeclaration` rule has been split to create the `MissingPackageDeclaration` rule - [#4149](https://github.com/detekt/detekt/pull/4149)
- The `ForbiddenComment` rule now offers a `customMessage` configuration key - [#4126](https://github.com/detekt/detekt/pull/4126)
- We bumped ktlint and updated the default enabled rules to mirror what ktlint is doing - [#4179](https://github.com/detekt/detekt/pull/4179)
- Added a new `LambdaParameterNaming` rule, to enforce a naming convention of parameter inside lambdas - [#4147](https://github.com/detekt/detekt/pull/4147)
- Added a new `InjectDispatcher` rule, to check if dispatchers are injectable - [#4222](https://github.com/detekt/detekt/pull/4222)
- Added a new `ConsoleReport` format - [#4027](https://github.com/detekt/detekt/pull/4027)
- Gradle: We added the `--auto-correct` cmdline option to gradle tasks - [#4202](https://github.com/detekt/detekt/pull/4202)
- Gradle: We removed the `afterEvaluate` wrapper from the Android and KMM plugin - [#4159](https://github.com/detekt/detekt/pull/4159) and [#4271](https://github.com/detekt/detekt/pull/4271)
- We now test against Java 17 and stopped testing against Java 16 - [#4136](https://github.com/detekt/detekt/pull/4136)
- Remove library specific configurations like Jetpack Compose and Dagger from the default config - [#4101](https://github.com/detekt/detekt/pull/4101)
- Remove detekt-bom module - [#4043](https://github.com/detekt/detekt/pull/4043)
- Use reference in fallback property delegate - [#3982](https://github.com/detekt/detekt/pull/3982)
##### Migration
Configuring reports in the Gradle plugin should be done at the task level instead of at the extension (or global) level.
The previous recommendation resulted in the report output for multiple tasks overwriting each other when multiple detekt
tasks were executed in the same Gradle run.
Before this release the recommended way to configure reports was using the `detekt` extension:
```kotlin
detekt {
reports {
xml {
enabled = true
destination = file("build/reports/detekt/detekt.xml")
}
}
}
```
This meant all detekt tasks would output the report to the same destination. From this detekt release you should enable
and disable reports for all tasks using the `withType` Gradle method:
```kotlin
// Kotlin DSL
tasks.withType<Detekt>().configureEach {
reports {
xml.required.set(true)
}
}
```
```groovy
// Groovy DSL
tasks.withType(Detekt).configureEach {
reports {
xml.required.set(true)
}
}
```
To customize the report output location configure the task individually:
```kotlin
tasks.detektMain {
reports {
xml {
outputLocation.set(file("build/reports/detekt/customPath.xml"))
required.set(true) // reports can also be enabled and disabled at the task level as needed
}
}
}
```
##### Changelog
- trim values when parsing the baseline - [#4335](https://github.com/detekt/detekt/pull/4335)
- Fix #4332 by widening the scope to all JDKs - [#4333](https://github.com/detekt/detekt/pull/4333)
- Bugfix provided by #4225 needs wider scope - [#4332](https://github.com/detekt/detekt/issues/4332)
- Avoid false positives in MemberNameEqualsClassName - [#4329](https://github.com/detekt/detekt/pull/4329)
- Add two new config steps for Compose - [#4322](https://github.com/detekt/detekt/pull/4322)
- Set DetektJvm task source with SourceDirectorySet instead of file list - [#4151](https://github.com/detekt/detekt/pull/4151)
- Add documentation about how to configure Baseline task with type resolution - [#4285](https://github.com/detekt/detekt/pull/4285)
- Remove kotlin-gradle-plugin-api from runtime classpath - [#4275](https://github.com/detekt/detekt/pull/4275)
- Use appropriate annotations on source properties in Gradle tasks - [#4264](https://github.com/detekt/detekt/pull/4264)
- Replace usage of deprecated ConfigureUtil - [#4263](https://github.com/detekt/detekt/pull/4263)
- Fix test failure of ReportMergeSpec - [#4262](https://github.com/detekt/detekt/pull/4262)
- Revert "Remove afterEvaluate wrapper (#4159)" - [#4259](https://github.com/detekt/detekt/pull/4259)
- ExplicitCollectionElementAccessMethodSpec: does not report methods that is called on implicit receiver - [#4256](https://github.com/detekt/detekt/pull/4256)
- UnusedPrivateMember: fix false positive with operator `in` - [#4249](https://github.com/detekt/detekt/pull/4249)
- Introduce UseAnyOrNoneInsteadOfFind rule - [#4247](https://github.com/detekt/detekt/pull/4247)
- OptionalWhenBraces: fix false negative for nested when - [#4246](https://github.com/detekt/detekt/pull/4246)
- Handle MultiRules in Suppressors - [#4239](https://github.com/detekt/detekt/pull/4239)
- Fix UselessCallOnNotNull rule - [#4237](https://github.com/detekt/detekt/pull/4237)
- Make detekt a bit less noisy when mixing java and kotlin files - [#4231](https://github.com/detekt/detekt/pull/4231)
- Workaround for JDK 8 instability when reading config - [#4225](https://github.com/detekt/detekt/pull/4225)
- Define FunctionSignature - [#4176](https://github.com/detekt/detekt/pull/4176)
- ForbiddenMethodCall: report overriding method calls - [#4205](https://github.com/detekt/detekt/pull/4205)
- ObjectLiteralToLambda: fix false positive when using Java interfaces with default methods - [#4203](https://github.com/detekt/detekt/pull/4203)
- Unit tests for TooGenericExceptionThrown - [#4198](https://github.com/detekt/detekt/pull/4198)
- Display correct --jvm-target values when using --help flag - [#4195](https://github.com/detekt/detekt/pull/4195)
- Improved `MaximumLineLength` documentation - [#4188](https://github.com/detekt/detekt/pull/4188)
- Report NewLineAtEndOfFile source location at end of file - [#4187](https://github.com/detekt/detekt/pull/4187)
- #4169 OutdatedDocumentation rule - [#4185](https://github.com/detekt/detekt/pull/4185)
- Don't report on platform types in NullableToStringCall - [#4180](https://github.com/detekt/detekt/pull/4180)
- Fix #4140: Allow Bazel based tests to run with string test input - [#4170](https://github.com/detekt/detekt/pull/4170)
- Improve ForbiddenMethodCall documentation - [#4166](https://github.com/detekt/detekt/pull/4166)
- Report SwallowedException on catchParameter - [#4158](https://github.com/detekt/detekt/pull/4158)
- Enable binary compatibility validator for detekt-test and detekt-test-api - [#4157](https://github.com/detekt/detekt/pull/4157)
- Fix issues with Elvis operator in UnconditionalJumpStatementInLoop - [#4150](https://github.com/detekt/detekt/pull/4150)
- Improve documentation for naming rules - [#4146](https://github.com/detekt/detekt/pull/4146)
- Disable `UnsafeCallOnNullableType` on tests - [#4123](https://github.com/detekt/detekt/pull/4123)
- Remove annotations from LateinitUsage noncompliant block - [#4100](https://github.com/detekt/detekt/pull/4100)
- UnnecessaryAbstractClass: false positive when the abstract class has internal/protected abstract members - [#4099](https://github.com/detekt/detekt/pull/4099)
- Deprecate DefaultContext - [#4098](https://github.com/detekt/detekt/pull/4098)
- Fix confusing message when breaking the MultilineLambdaItParameter rule - [#4089](https://github.com/detekt/detekt/pull/4089)
- Remove deprecated KotlinExtension - [#4063](https://github.com/detekt/detekt/pull/4063)
- Add an alias for FunctionMinLength/FunctionMaxLength rules to be more descriptive - [#4050](https://github.com/detekt/detekt/pull/4050)
- fix report path, default path is reports/detekt/... - [#4034](https://github.com/detekt/detekt/pull/4034)
- Fix TextLocation of Indentation rule - [#4030](https://github.com/detekt/detekt/pull/4030)
- detekt-bom is going away after 1.18.0 - [#3988](https://github.com/detekt/detekt/issues/3988)
- UnderscoresInNumericLiterals acceptableDecimalLength is off by one - [#3972](https://github.com/detekt/detekt/pull/3972)
- Create rule set configurations in a safe way - [#3964](https://github.com/detekt/detekt/pull/3964)
- Remove UnnecessarySafeCall safeguard against ErrorType - [#3439](https://github.com/detekt/detekt/pull/3439)
##### Dependency Updates
- Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.5.2 - [#4302](https://github.com/detekt/detekt/pull/4302)
- Update dependency io.mockk:mockk to v1.12.1 - [#4297](https://github.com/detekt/detekt/pull/4297)
- Update dependency com.android.tools.build:gradle to v4.2.2 - [#4296](https://github.com/detekt/detekt/pull/4296)
- Gradle Publishing Plugin 0.17.0 - [#4270](https://github.com/detekt/detekt/pull/4270)
- Shadow 7.1.0 - [#4269](https://github.com/detekt/detekt/pull/4269)
- Dokka 1.5.31 - [#4268](https://github.com/detekt/detekt/pull/4268)
- Binary Compatibility Validator 0.8.0 - [#4267](https://github.com/detekt/detekt/pull/4267)
- Reflections 0.10.2 - [#4266](https://github.com/detekt/detekt/pull/4266)
- Upgrade to Gradle 7.3 - [#4254](https://github.com/detekt/detekt/pull/4254)
- Dokka 1.5.30 - [#4114](https://github.com/detekt/detekt/pull/4114)
- Kotlin 1.5.31 - [#4113](https://github.com/detekt/detekt/pull/4113)
- Update dependencies - [#4065](https://github.com/detekt/detekt/pull/4065)
##### Housekeeping & Refactorings
- Simplify YamlConfig - [#4316](https://github.com/detekt/detekt/pull/4316)
- Move tests to the correct module - [#4314](https://github.com/detekt/detekt/pull/4314)
- Don't hide null issues - [#4313](https://github.com/detekt/detekt/pull/4313)
- Add functional test for type resolution for JVM - [#4307](https://github.com/detekt/detekt/pull/4307)
- Minor typo fix and code refactoring - [#4284](https://github.com/detekt/detekt/pull/4284)
- Improve Tests of UnnecesaryLet - [#4282](https://github.com/detekt/detekt/pull/4282)
- Fix typo in UnnecessaryLet - [#4281](https://github.com/detekt/detekt/pull/4281)
- Fix typo in Gradle lib definition - [#4255](https://github.com/detekt/detekt/pull/4255)
- Rename DoubleMutabilityInCollectionSpec to DoubleMutabilityForCollectionSpec - [#4251](https://github.com/detekt/detekt/pull/4251)
- Simplify conditional checks to improve coverage - [#4221](https://github.com/detekt/detekt/pull/4221)
- Refactor NoTabs to remove DetektVisitor - [#4220](https://github.com/detekt/detekt/pull/4220)
- Fix typos and grammar in rule descriptions - [#4219](https://github.com/detekt/detekt/pull/4219)
- Use Kotlin's ArrayDeque implementation - [#4218](https://github.com/detekt/detekt/pull/4218)
- Update Kotlin docs URL - [#4217](https://github.com/detekt/detekt/pull/4217)
- Report UntilInsteadOfRangeTo for 'rangeTo' calls - [#4212](https://github.com/detekt/detekt/pull/4212)
- Add tests for merging reports - [#4199](https://github.com/detekt/detekt/pull/4199)
- Setup Gradle functional tests - [#4074](https://github.com/detekt/detekt/pull/4074)
- GitHub Actions cache fixes - [#3723](https://github.com/detekt/detekt/pull/3723)
- Simplify where casts used unnecessarily - [#4213](https://github.com/detekt/detekt/pull/4213)
- Don't specify Gradle Enterprise Gradle Plugin version - [#4210](https://github.com/detekt/detekt/pull/4210)
- Fix baserule import in tests - [#4189](https://github.com/detekt/detekt/pull/4189)
- Run CLI sanity checks with Gradle - [#4186](https://github.com/detekt/detekt/pull/4186)
- Use Codecov GitHub Action to upload coverage - [#4184](https://github.com/detekt/detekt/pull/4184)
- Enable ParameterListWrapping rule on detekt codebase - [#4178](https://github.com/detekt/detekt/pull/4178)
- Add test cases for MagicNumber - [#4152](https://github.com/detekt/detekt/pull/4152)
- Fix FunctionParameterNamingSpec - [#4145](https://github.com/detekt/detekt/pull/4145)
- Address feedback on #4139 - [#4143](https://github.com/detekt/detekt/pull/4143)
- Don't skip tests that now pass - [#4142](https://github.com/detekt/detekt/pull/4142)
- Fixes for Kotlin 1.6.0-M1 - [#4139](https://github.com/detekt/detekt/pull/4139)
- Don't unnecessarily propogate opt-in requirement - [#4116](https://github.com/detekt/detekt/pull/4116)
- Drop junit-platform-launcher dependency - [#4115](https://github.com/detekt/detekt/pull/4115)
- Ensure detekt-tooling public API is stable - [#4112](https://github.com/detekt/detekt/pull/4112)
- Fix globing typo - [#4107](https://github.com/detekt/detekt/pull/4107)
- Rename and split ValidateConfig files - [#4105](https://github.com/detekt/detekt/pull/4105)
- Dynamic deprecation - [#4104](https://github.com/detekt/detekt/pull/4104)
- Fix indent issues with continuation indent - [#4103](https://github.com/detekt/detekt/pull/4103)
- Refactor so detekt-gradle-plugin can be added as an included build - [#4094](https://github.com/detekt/detekt/pull/4094)
- Migrate buildSrc to composite build - [#4090](https://github.com/detekt/detekt/pull/4090)
- Fix broken `applySelfAnalysisVersion` task - [#4082](https://github.com/detekt/detekt/pull/4082)
- Convert DetektJvmSpec to use ProjectBuilder - [#4075](https://github.com/detekt/detekt/pull/4075)
- Upscale JVM settings - [#4057](https://github.com/detekt/detekt/pull/4057)
- Gradle 7.2 - [#4056](https://github.com/detekt/detekt/pull/4056)
- Verify at compile time that issue id matches rule name - [#4047](https://github.com/detekt/detekt/pull/4047)
See all issues at: [1.19.0](https://github.com/detekt/detekt/milestone/83)
#### 1.18.1 - 2021-08-30
This is a point release for Detekt `1.18.0` containing bugfixes for problems that got discovered just after the release.
##### Notable Changes
- MultiRule should pass correctly the BindingContext - [#4071](https://github.com/detekt/detekt/pull/4071)
- Allow active, excludes and includes in the rule-set configuration - [#4045](https://github.com/detekt/detekt/pull/4045)
- Remove Error from ThrowingExceptionsWithoutMessageOrCause because is a common name - [#4046](https://github.com/detekt/detekt/pull/4046)
- Fix issue IDs for ReferentialEquality and DoubleMutability - [#4040](https://github.com/detekt/detekt/pull/4040)
See all issues at: [1.18.1](https://github.com/detekt/detekt/milestone/84)
#### 1.18.0 - 2021-08-12
We're more than excited to introduce you a next stable release of Detekt: `1.18.0` 🎉
This release is coming with a lot of changes, new rules, evolution in the API and stability improvements.
We want to take the opportunity to thank our contributors for testing, bug reporting and helping
us release this new version of Detekt.
##### Notable Changes
- We've added two new rules: `AvoidReferentialEquality` and `BooleanPropertyNaming` (see [#3924](https://github.com/detekt/detekt/pull/3924) and [#3795](https://github.com/detekt/detekt/pull/3795))
- This version of Detekt ships with Kotlin `1.5.21`, and we're compiling with `apiVersion` set to `1.4` - [#3956](https://github.com/detekt/detekt/pull/3956) and [#3852](https://github.com/detekt/detekt/pull/3852)
- The minimum version of Gradle to use Detekt Gradle Plugin is now `6.1` - [#3830](https://github.com/detekt/detekt/pull/3830)
- This version of Detekt has been tested against Java 16 - [#3698](https://github.com/detekt/detekt/pull/3698)
- We fixed a long-standing bug related to parallel execution (#3248) - [#3799](https://github.com/detekt/detekt/pull/3799) and [#3822](https://github.com/detekt/detekt/pull/3822)
- We now use multi-line format for list options in the default detekt config file - [#3827](https://github.com/detekt/detekt/pull/3827)
- The rule `VarCouldBeVal` has been updated and now works only with type resolution to provide more precise findings - [#3880](https://github.com/detekt/detekt/pull/3880)
- We removed all the references to `Extensions.getRootArea` that is now deprecated from our codebase. This was affecting users with sporadic crashes. - [#3848](https://github.com/detekt/detekt/pull/3848)
- For _detekt_ rule authors: We created a Github Template that you can use to bootstrap your custom rule project: [detekt-custom-rule-template](https://github.com/detekt/detekt-custom-rule-template). You can use JitPack to host it and share your rule easily with other members of the community.
- For _detekt_ rule authors: We finished the rework to use the annotations instead of kdoc tags in rules. Specifically configurations must be configured using `@Configuration` while auto-correction capability should be specified with the `@AutoCorrectable` annotation [#3820](https://github.com/detekt/detekt/pull/3820).
##### Migration
- We renamed the `input` property inside the `detekt{}` extension of the Gradle plugin to `source`. The `input` property has been deprecated, and we invite you to migrate to the new property (see [#3951](https://github.com/detekt/detekt/pull/3951))
```
// BEFORE
detekt {
input = files(...)
}
// AFTER
detekt {
source = files(...)
}
```
- For all rule authors: When accessing a config value within a rule, using `valueOrDefault` and `valueOrDefaultCommaSeparated` is no longer recommended. While both will remain part of the public api, they should be replaced by one of the config delegates (see [#3891](https://github.com/detekt/detekt/pull/3891)). The key that is used to lookup the configured value is derived from the property name.
```kotlin
/* simple property */
// BEFORE
val ignoreDataClasses = valueOrDefault("ignoreDataClasses", true)
// AFTER
val ignoreDataClasses: Boolean by config(true)
/* transformed simple property */
// BEFORE
val ignoredName = valueOrDefault("ignoredName", "").trim()
// AFTER
val ignoredName: String by config("", String::trim)
/* transformed list property */
// BEFORE
val ignoreAnnotated = valueOrDefaultCommaSeparated("ignoreAnnotated", listOf("Inject", "Value"))
.map(String::trim)
// AFTER
val ignoreAnnotated: List<String> by config(listOf("Inject", "Value")) { list ->
list.map(String::trim)
}
```
- For all rule authors: The types `ThresholdRule` and `LazyRegex` have been marked as deprecated and will be removed in a future release. Please migrate to config delegates.
```kotlin
/* ThresholdRule */
// BEFORE
class MyRule(config: Config, threshold: Int = 10) : ThresholdRule(config, threshold) {
// ...
}
// AFTER
class MyRule(config: Config) : Rule(config) {
private val threshold: Int by config(10)
// ...
}
/* LazyRegex */
// BEFORE
private val allowedPattern: Regex by LazyRegex("allowedPatterns", "")
// AFTER
private val allowedPattern: Regex by config("", String::toRegex)
```
- For custom rule authors: This will be the last version of detekt where we publish the `detekt-bom` artifact. This change should not affect anyone. If it affects you, [please let us know](https://github.com/detekt/detekt/issues/3988).
##### Changelog
- [KMP] Fix resolution of Android test classpaths - [#4026](https://github.com/detekt/detekt/pull/4026)
- Sort config lists - [#4014](https://github.com/detekt/detekt/pull/4014)
- Multiplatform tasks should not depend on check - [#4025](https://github.com/detekt/detekt/pull/4025)
- mark configWithFallback as unstable - [#4028](https://github.com/detekt/detekt/pull/4028)
- UseDataClass: fix false positive on value classes - [#4016](https://github.com/detekt/detekt/pull/4016)
- ImplicitUnitReturnType: don't report when expression body is 'Unit' - [#4011](https://github.com/detekt/detekt/pull/4011)
- Fix false positive with UnusedPrivateMember on parameter of a protected function - [#4007](https://github.com/detekt/detekt/pull/4007)
- ClassNaming: Don't treat Kotlin syntax ` as part of class name - [#3977](https://github.com/detekt/detekt/pull/3977)
- IgnoredReturnValue: fix false negative when annotation is on the class - [#3979](https://github.com/detekt/detekt/pull/3979)
- NoNameShadowing: fix false positive with nested lambda has implicit parameter - [#3991](https://github.com/detekt/detekt/pull/3991)
- UnusedPrivateMember - added handling of overloaded array get operator - [#3666](https://github.com/detekt/detekt/pull/3666)
- Publish bundled/Shadow JAR artifact to Maven repos - [#3986](https://github.com/detekt/detekt/pull/3986)
- EmptyDefaultConstructor false positive with expect and actual classes - [#3970](https://github.com/detekt/detekt/pull/3970)
- FunctionNaming - Allow factory function names - fix #1639 - [#3973](https://github.com/detekt/detekt/pull/3973)
- EndOfSentenceFormat - Fix #3893 by only calling super.visit once - [#3904](https://github.com/detekt/detekt/pull/3904)
- UndocumentedPublicFunction: don't report when nested class is inside not public class [#3962](https://github.com/detekt/detekt/pull/3962)
- Fail with a meaningful error message for invalid boolean - [#3931](https://github.com/detekt/detekt/pull/3931)
- UndocumentedPublicProperty and UndocumentedPublicFunction should include objects - [#3940](https://github.com/detekt/detekt/pull/3940)
- Fix exclusion pattern for InvalidPackageDeclaration - [#3907](https://github.com/detekt/detekt/pull/3907)
- Allow else when {...} in MandatoryBracesIfStatements rule - [#3905](https://github.com/detekt/detekt/pull/3905)
- Remove unnecessary constant declaration - [#3903](https://github.com/detekt/detekt/pull/3903)
- Check bindingContext only once in MemberNameEqualsClassName - [#3899](https://github.com/detekt/detekt/pull/3899)
- LongMethod: add 'ignoreAnnotated' configuration option - [#3892](https://github.com/detekt/detekt/pull/3892)
- Fix Deprecation rule message - [#3885](https://github.com/detekt/detekt/pull/3885)
- Improve LongParameterList rule by supporting ignoring annotated parameters - [#3879](https://github.com/detekt/detekt/pull/3879)
- OptionalUnit: fix false positive when function initializer is Nothing type - [#3876](https://github.com/detekt/detekt/pull/3876)
- UnnecessaryParentheses: fix false positive for delegated expressions - [#3858](https://github.com/detekt/detekt/pull/3858)
- Fix UnnecessaryLet false positive in inner lambdas - [#3841](https://github.com/detekt/detekt/pull/3841)
- Fix false positive for UnusedPrivateMember - Backtick identifiers - [#3828](https://github.com/detekt/detekt/pull/3828)
- Properly apply test excludes for comments - [#3815](https://github.com/detekt/detekt/pull/3815)
- Fix generation issues around (deprecated) list properties - [#3813](https://github.com/detekt/detekt/pull/3813)
- Update the implementation of ClassOrdering to handle false negatives - [#3810](https://github.com/detekt/detekt/pull/3810)
- [comments] Do not exclude tests globally - [#3801](https://github.com/detekt/detekt/pull/3801)
- UnnecessaryLet: report when implicit parameter isn't used - [#3794](https://github.com/detekt/detekt/pull/3794)
- NoNameShadowing: don't report when implicit 'it' parameter isn't used - [#3793](https://github.com/detekt/detekt/pull/3793)
- Fix ModifierOrder to support value class - [#3719](https://github.com/detekt/detekt/pull/3719)
- Remove inline value class to stay compatible with Kotlin 1.4 API - [#3871](https://github.com/detekt/detekt/pull/3871)
- [FunctionNaming] Revert annotations that are ignored by default - [#3948](https://github.com/detekt/detekt/pull/3948)
- Android: add javac intermediates to classpath - [#3867]((https://github.com/detekt/detekt/pull/3867)
- Revert "Android: add javac intermediates to classpath (#3867)" - [#3958]((https://github.com/detekt/detekt/pull/3958)
- Use annotations to configure rules in detekt-rules-exceptions - [#3798](https://github.com/detekt/detekt/pull/3798)
- Use @Configuration in detekt-rules-style - [#3774](https://github.com/detekt/detekt/pull/3774)
- Use annotations to configure rules in custom-checks - [#3773](https://github.com/detekt/detekt/pull/3773)
- Use @Configuration for rules-errorprone - [#3772](https://github.com/detekt/detekt/pull/3772)
- Use annotation to configure rules in rules-empty - [#3771](https://github.com/detekt/detekt/pull/3771)
- Use annotation to configure rules in rules-documentation - [#3770](https://github.com/detekt/detekt/pull/3770)
- Use annotations to configure rules in rules-naming - [#3769](https://github.com/detekt/detekt/pull/3769)
- Use annotations to configure rules in rules-complexity - [#3768](https://github.com/detekt/detekt/pull/3768)
- Move formatting rules to @Configuration - [#3847](https://github.com/detekt/detekt/pull/3847)
##### Dependency Updates
- Bump Kotlin to 1.5.21 - [#3956](https://github.com/detekt/detekt/pull/3956)
- Revert "Bump Kotlin to v1.5.20" - [#3941](https://github.com/detekt/detekt/pull/3941)
- Bump Kotlin to v1.5.20 - [#3921](https://github.com/detekt/detekt/pull/3921)
- Kotlin 1.5.10 - [#3826](https://github.com/detekt/detekt/pull/3826)
- Update assertj to v3.20.2 - [#3912](https://github.com/detekt/detekt/pull/3912)
- Update snakeyaml to v1.29 - [#3911](https://github.com/detekt/detekt/pull/3911)
- Bump byte-buddy from 1.11.2 to 1.11.5 - [#3886](https://github.com/detekt/detekt/pull/3886)
- Bump byte-buddy from 1.11.1 to 1.11.2 - [#3872](https://github.com/detekt/detekt/pull/3872)
- Bump byte-buddy from 1.11.0 to 1.11.1 - [#3861](https://github.com/detekt/detekt/pull/3861)
- Update mockk to 1.12.0 - [#3937](https://github.com/detekt/detekt/pull/3937)
##### Housekeeping & Refactorings
- Enable UnnecessaryLet rule for detekt code base - [#4024](https://github.com/detekt/detekt/pull/4024)
- enable PreferToOverPairSyntax rule for detekt code base - [#4023](https://github.com/detekt/detekt/pull/4023)
- Add IllegalArgumentException and IllegalStateException to ThrowingExceptionsWithoutMessageOrCause - [#4013](https://github.com/detekt/detekt/pull/4013)
- enable more potential-bugs rules for detekt code base - [#3997](https://github.com/detekt/detekt/pull/3997)
- enable more exception rules for detekt code base - [#3995](https://github.com/detekt/detekt/pull/3995)
- Enable UseOrEmpty for detekt code base - [#3999](https://github.com/detekt/detekt/pull/3999)
- enable those rules from the style rule set that have not violation or obvious fixes - [#3998](https://github.com/detekt/detekt/pull/3998)
- Enable more rules from naming rule set for detekt code base - [#3996](https://github.com/detekt/detekt/pull/3996)
- Enable UseEmptyCounterpart for detekt code base - [#4000](https://github.com/detekt/detekt/pull/4000)
- enable coroutine rules for detekt code base - [#3994](https://github.com/detekt/detekt/pull/3994)
- Remove "plugin" suffix from version catalog aliases - [#3987](https://github.com/detekt/detekt/pull/3987)
- Fix ClassCastException in test on java 11 openjdk9 - [#3984](https://github.com/detekt/detekt/pull/3984)
- Activate IgnoredReturnValue on detekt code base - [#3974](https://github.com/detekt/detekt/pull/3974)
- Add missing test in FunctionNaming - [#3976](https://github.com/detekt/detekt/pull/3976)
- Fix trunk compilation - [#3968](https://github.com/detekt/detekt/pull/3968)
- Reformat internal detekt.yml using multi line lists - [#3936](https://github.com/detekt/detekt/pull/3936)
- Increase memory available to gradle integration test daemon - [#3938](https://github.com/detekt/detekt/pull/3938)
- Avoid empty lines when running detekt with type resolution - [#3909](https://github.com/detekt/detekt/pull/3909)
- Fix java.lang.ClassCastException is reading default yaml config - [#3920](https://github.com/detekt/detekt/pull/3920)
- Refactor + rename util function inside MandatoryBracesIfStatement rule - [#3908](https://github.com/detekt/detekt/pull/3908)
- Rename Tests to Spec - [#3906](https://github.com/detekt/detekt/pull/3906)
- verify that no rule is configured with kdoc tags - [#3870](https://github.com/detekt/detekt/pull/3870)
- Setup FOSSA - [#3836](https://github.com/detekt/detekt/pull/3836)
- jvmTarget can't be null - [#3818](https://github.com/detekt/detekt/pull/3818)
- Add test for ruleset provider configuration - [#3814](https://github.com/detekt/detekt/pull/3814)
- Merge JaCoCo coverage reports the "right" way - [#3650](https://github.com/detekt/detekt/pull/3650)
- Update outdated Gradle plugin documentation regarding source files - [#3883](https://github.com/detekt/detekt/pull/3883)
- Make documentation more precise about how rules are enabled - [#3889](https://github.com/detekt/detekt/pull/3889)
- Rename MapGetWithNotNullAsserSpec to follow test convention - [#3878](https://github.com/detekt/detekt/pull/3878)
- Remove custom assertions that check kdoc of rules - [#3859](https://github.com/detekt/detekt/pull/3859)
- Avoid overlapping outputs - [#3790](https://github.com/detekt/detekt/pull/3790)
- Revert "Avoid overlapping outputs" - [#3943](https://github.com/detekt/detekt/pull/3943)
See all issues at: [1.18.0](https://github.com/detekt/detekt/milestone/82)
#### 1.17.1 - 2021-05-19
##### Notable Changes
This is a patch release for Detekt `1.17.0` including fixes that we considered worth a point release.
Specifically, we're reverting a change on our Gradle Plugin. The original change [#3655](https://github.com/detekt/detekt/pull/3655) resulted in several false positives when using rules with Type Resolution on Java/Kotlin mixed codebases.
Moreover we included a couple of false positive fixes for `NoNameShadowing` and `UnnecessaryLet`
##### Changelog
- Revert "Noisy gradle (#3655)" - [#3792](https://github.com/detekt/detekt/pull/3792)
- NoNameShadowing: don't report when implicit 'it' parameter isn't used - [#3793](https://github.com/detekt/detekt/pull/3793)
- UnnecessaryLet: report when implicit parameter isn't used - [#3794](https://github.com/detekt/detekt/pull/3794)
#### 1.17.0 - 2021-05-15
##### Notable Changes
- We're introducing our new Project logo :). See [#3726](https://github.com/detekt/detekt/pull/3726)
- This release allows you to replace your `jcenter()` dependencies with `mavenCentral()` given that our dependency on `kotlinx.html` migrated to Maven Central - See [#3455](https://github.com/detekt/detekt/pull/3455)
- We now introduced the `src/test/java` and `src/test/kotlin` by default for the plain `detekt` Gradle task. If you use that task, you might notice rule reports in your test sourceset. See [#3649](https://github.com/detekt/detekt/pull/3649)
- We now default the baseline file to `detekt-baseline.xml` so you don't have to specify it manually. You can revert the previous behavior by setting the baseline to `null` - See [#3619](https://github.com/detekt/detekt/pull/3619) and [#3745](https://github.com/detekt/detekt/pull/3745)
- We enabled the SARIF output format by default - See [#3543](https://github.com/detekt/detekt/pull/3543)
- We're introducing annotations to provide metadata to rules, such as `@ActiveByDefault`, `@Configuration` and `@RequiresTypeResolution` - See [#3637](https://github.com/detekt/detekt/pull/3637) [#3592](https://github.com/detekt/detekt/pull/3592) and [#3579](https://github.com/detekt/detekt/pull/3579)
##### Changelog
- Fix crash for DontDowncastCollectionTypes on Synthetic types - [#3776](https://github.com/detekt/detekt/pull/3776)
- We don't need to talk about jcenter anymore at our docs - [#3755](https://github.com/detekt/detekt/pull/3755)
- Skip publishing for detekt-cli shadowRuntimeElements variant - [#3747](https://github.com/detekt/detekt/pull/3747)
- Set the org.gradle.dependency.bundling attribute to external - [#3738](https://github.com/detekt/detekt/pull/3738)
- Support triple quoted strings in default value of config delegate - [#3733](https://github.com/detekt/detekt/pull/3733)
- Properly populate versions.properties - [#3730](https://github.com/detekt/detekt/pull/3730)
- We have a logo :) - [#3726](https://github.com/detekt/detekt/pull/3726)
- [UndocumentedPublicProperty] Allow inline comments for properties in primary constructor as documentation - [#3722](https://github.com/detekt/detekt/pull/3722)
- MultilineLambdaItParameter: don't report when lambda has no implicit parameter references - [#3696](https://github.com/detekt/detekt/pull/3696)
- Fix false positives for UnnecessaryFilter - [#3695](https://github.com/detekt/detekt/pull/3695)
- Add support for transformer function in config property delegate - [#3676](https://github.com/detekt/detekt/pull/3676)
- Add support for fallback property - [#3675](https://github.com/detekt/detekt/pull/3675)
- Ignore actual members in UnusedPrivateMember - [#3669](https://github.com/detekt/detekt/pull/3669)
- NamedArguments rule: fix false positive with trailing lambda - [#3661](https://github.com/detekt/detekt/pull/3661)
- Add DeprecatedBlockTag rule - [#3660](https://github.com/detekt/detekt/pull/3660)
- Noisy gradle - [#3655](https://github.com/detekt/detekt/pull/3655)
- Drop support to Gradle 5 - [#3647](https://github.com/detekt/detekt/pull/3647)
- Add MayBeConstant as alias for MayBeConst - [#3644](https://github.com/detekt/detekt/pull/3644)
- [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() - [#3641](https://github.com/detekt/detekt/pull/3641)
- Fixing IllegalArgumentException in ForbiddenMethodCall rule for Intersection type parameters - [#3626](https://github.com/detekt/detekt/pull/3626)
- Replace getJetTypeFqName with fqNameOrNull extension - [#3613](https://github.com/detekt/detekt/pull/3613)
- New Rule: ObjectLiteralToLambda - [#3599](https://github.com/detekt/detekt/pull/3599)
- [MemberNameEqualsClassName] Support factory exemption for generic classes - [#3595](https://github.com/detekt/detekt/pull/3595)
- Refactor Analyzer so that RuleSetProvider.instance is only called once - [#3585](https://github.com/detekt/detekt/pull/3585)
- SarifOutputReportSpec: Correctly detect Windows root directory on local development machine - [#3584](https://github.com/detekt/detekt/pull/3584)
- Replace @since KDoc tag with @SinceDetekt - [#3582](https://github.com/detekt/detekt/pull/3582)
- Simplify code in RedundantSuspendModifier rule - [#3580](https://github.com/detekt/detekt/pull/3580)
- Revert "Refactor Analyzer so that RuleSetProvider.instance is only called once" - [#3578](https://github.com/detekt/detekt/pull/3578)
- fix error message -> buildUponDefaultConfig instead of buildOnDefaultConfig - [#3572](https://github.com/detekt/detekt/pull/3572)
- UnnecessaryApply: fix false positive when lambda has multiple member references - [#3564](https://github.com/detekt/detekt/pull/3564)
- Switch SARIF report off jackson - [#3557](https://github.com/detekt/detekt/pull/3557)
- Fix rules not appearing in the sarif output - [#3556](https://github.com/detekt/detekt/pull/3556)
- Refactor Analyzer so that RuleSetProvider.instance is only called once - [#3555](https://github.com/detekt/detekt/pull/3555)
- New Rule: DoubleMutabilityForCollection - [#3553](https://github.com/detekt/detekt/pull/3553)
- Adds a ForbiddenSingleExpressionSyntax rule - [#3550](https://github.com/detekt/detekt/pull/3550)
##### Dependency Updates
- Update to Gradle 7.0.1 - [#3760](https://github.com/detekt/detekt/pull/3760)
- Update Shadow plugin to 7.0.0 - [#3759](https://github.com/detekt/detekt/pull/3759)
- Upgrade to AGP 4.2.0 - [#3744](https://github.com/detekt/detekt/pull/3744)
- JaCoCo 0.8.7 - [#3739](https://github.com/detekt/detekt/pull/3739)
- Upgrade to GitHub-native Dependabot - [#3716](https://github.com/detekt/detekt/pull/3716)
- Upgrade to Gradle 7 - [#3689](https://github.com/detekt/detekt/pull/3689)
- Bump com.gradle.plugin-publish from 0.13.0 to 0.14.0 - [#3654](https://github.com/detekt/detekt/pull/3654)
- Bump kotlin-reflect from 1.4.0 to 1.4.32 - [#3627](https://github.com/detekt/detekt/pull/3627)
- Upgrade to ktlint 0.41.0 - [#3624](https://github.com/detekt/detekt/pull/3624)
- Update to Kotlin 1.4.32 - [#3606](https://github.com/detekt/detekt/pull/3606)
- Bump AGP from 4.1.2 to 4.1.3 - [#3589](https://github.com/detekt/detekt/pull/3589)
- Bump mockk from 1.10.6 to 1.11.0 - [#3588](https://github.com/detekt/detekt/pull/3588)
##### Housekeeping & Refactorings
- Fix document - [#3765](https://github.com/detekt/detekt/pull/3765)
- Fix kdoc link on blog navigation - [#3761](https://github.com/detekt/detekt/pull/3761)
- Upload any heap dumps produced during CI build - [#3758](https://github.com/detekt/detekt/pull/3758)
- Always run warningsAsErrors on CI - [#3754](https://github.com/detekt/detekt/pull/3754)
- Clean ci - [#3753](https://github.com/detekt/detekt/pull/3753)
- Revert "Set the org.gradle.dependency.bundling attribute to external" - [#3750](https://github.com/detekt/detekt/pull/3750)
- Enable Gradle's type-safe project accessors - [#3742](https://github.com/detekt/detekt/pull/3742)
- Enable Gradle's version catalogs - [#3741](https://github.com/detekt/detekt/pull/3741)
- Ignore gradle plugin in codecov - [#3740](https://github.com/detekt/detekt/pull/3740)
- Update config file due to invalid argument - [#3735](https://github.com/detekt/detekt/pull/3735)
- Skip Multiplatform iOS tests if XCode is not configured - [#3734](https://github.com/detekt/detekt/pull/3734)
- Specify Java language level in module plugin - [#3732](https://github.com/detekt/detekt/pull/3732)
- Don't run unnecesary tasks - [#3725](https://github.com/detekt/detekt/pull/3725)
- Remove --stacktrace now that we have scan - [#3724](https://github.com/detekt/detekt/pull/3724)
- Drop JCenter usage from detekt's own build - [#3711](https://github.com/detekt/detekt/pull/3711)
- Publish build scans for all CI builds - [#3710](https://github.com/detekt/detekt/pull/3710)
- Remove deprecated kotlin-dsl Gradle config option - [#3709](https://github.com/detekt/detekt/pull/3709)
- Update to setup-java@v2 - [#3704](https://github.com/detekt/detekt/pull/3704)
- (Try to) improve CI build reliability - [#3703](https://github.com/detekt/detekt/pull/3703)
- Simplify UpdateVersionInFileTask - [#3693](https://github.com/detekt/detekt/pull/3693)
- Fix compilation issue in `:detekt-rules-style:compileTestKotlin` - [#3691](https://github.com/detekt/detekt/pull/3691)
- Fix detekt failure in CI - [#3674](https://github.com/detekt/detekt/pull/3674)
- Refactor UnusedPrivateMemberSpec - [#3667](https://github.com/detekt/detekt/pull/3667)
- Warnings as errors - [#3646](https://github.com/detekt/detekt/pull/3646)
- Skip ios tests if no ci - [#3635](https://github.com/detekt/detekt/pull/3635)
- Fix tests - [#3634](https://github.com/detekt/detekt/pull/3634)
- Include detekt-rules on CLI runtime classpath - [#3625](https://github.com/detekt/detekt/pull/3625)
- Improve tests from :detekt-gradle-plugin - [#3623](https://github.com/detekt/detekt/pull/3623)
- Improve generator test coverage - [#3622](https://github.com/detekt/detekt/pull/3622)
- Improve tests - [#3618](https://github.com/detekt/detekt/pull/3618)
- Apply more formatting rules to our code - [#3615](https://github.com/detekt/detekt/pull/3615)
- Add negative test case for `requiresTypeResolution` - [#3614](https://github.com/detekt/detekt/pull/3614)
- Simplify Gradle config - [#3612](https://github.com/detekt/detekt/pull/3612)
- Decouple Gradle projects - [#3611](https://github.com/detekt/detekt/pull/3611)
- Add --stacktrace to help triage CI flakiness - [#3604](https://github.com/detekt/detekt/pull/3604)
- Fix CI failure for deploy-snapshot - [#3598](https://github.com/detekt/detekt/pull/3598)
- Improve Deprecation and Documentation for allRules - [#3596](https://github.com/detekt/detekt/pull/3596)
- Update files to support `main` branch in order to remove oppressive language - [#3586](https://github.com/detekt/detekt/pull/3586)
- Format test code for RedundantSuspendModifierSpec - [#3581](https://github.com/detekt/detekt/pull/3581)
- Gradle tweaks - [#3575](https://github.com/detekt/detekt/pull/3575)
- Support Gradle config cache in detekt's build - [#3574](https://github.com/detekt/detekt/pull/3574)
- Show information from @active in the website - [#3569](https://github.com/detekt/detekt/pull/3569)
- Update rule doc for SwallowedException config - [#3547](https://github.com/detekt/detekt/pull/3547)
- Markdown: Reintroduce double-backticks for inline code rendering - [#3545](https://github.com/detekt/detekt/pull/3545)
See all issues at: [1.17.0](https://github.com/detekt/detekt/milestone/81)
#### 1.16.0 - 2021-03-10
##### Changelog
- Bump jcommander from 1.78 to 1.81 - [#3530](https://github.com/detekt/detekt/pull/3530)
- Swallow exception fixes - [#3525](https://github.com/detekt/detekt/pull/3525)
- Merge SARIF reports - [#3522](https://github.com/detekt/detekt/pull/3522)
- Revert Update Kotlin to version 1.4.31 - [#3521](https://github.com/detekt/detekt/pull/3521)
- Fix not being able to override `insertFinalNewLine` - [#3515](https://github.com/detekt/detekt/pull/3515)
- Allow opt-out configuring detekt android and multiplatform - [#3511](https://github.com/detekt/detekt/pull/3511)
- Gradle Plugin tests should access also Maven Local - [#3510](https://github.com/detekt/detekt/pull/3510)
- Update Kotlin to version 1.4.31 - [#3509](https://github.com/detekt/detekt/pull/3509)
- Fix SARIF validation failure - [#3507](https://github.com/detekt/detekt/pull/3507)
- Remove off importing android util - [#3506](https://github.com/detekt/detekt/pull/3506)
- Adding support for full method signatures in ForbiddenMethodCall - [#3505](https://github.com/detekt/detekt/pull/3505)
- Add UnusedUnaryOperator rule - [#3499](https://github.com/detekt/detekt/pull/3499)
- New rule: disallow to cast to nullable type - [#3497](https://github.com/detekt/detekt/pull/3497)
- Merge XML report output - [#3491](https://github.com/detekt/detekt/pull/3491)
- Allow using regular expressions when defining license header templates - [#3486](https://github.com/detekt/detekt/pull/3486)
- Add UnreachableCatchBlock rule - [#3478](https://github.com/detekt/detekt/pull/3478)
- Add NoNameShadowing rule - [#3477](https://github.com/detekt/detekt/pull/3477)
- Fix false negative "UselessCallOnNotNull" with `list.isNullOrEmpty()` - [#3475](https://github.com/detekt/detekt/pull/3475)
- Add UseOrEmpty rule - [#3470](https://github.com/detekt/detekt/pull/3470)
- Add UseIsNullOrEmpty rule - [#3469](https://github.com/detekt/detekt/pull/3469)
- Add support to Kotlin Multiplatform Projects - [#3453](https://github.com/detekt/detekt/pull/3453)
- Fix false positives for MultilineLambdaItParameter.kt - [#3451](https://github.com/detekt/detekt/pull/3451)
- Dont generate baseline if empty - [#3450](https://github.com/detekt/detekt/pull/3450)
- Silence IndexOutOfBoundsException in getLineAndColumnInPsiFile() - [#3446](https://github.com/detekt/detekt/pull/3446)
- Add new ObjectExtendsThrowable rule - [#3443](https://github.com/detekt/detekt/pull/3443)
- Add allRules and deprecate failFast in gradle tasks - [#3431](https://github.com/detekt/detekt/pull/3431)
- Add two missing ktlint rules - [#3430](https://github.com/detekt/detekt/pull/3430)
- Don't fail if baseline doesn't exist in PlainDetekt - [#3429](https://github.com/detekt/detekt/pull/3429)
- Fix False Positive on `UnnecessarySafeCall` - [#3419](https://github.com/detekt/detekt/pull/3419)
- Fix false positive for `UnusedPrivateMember` with expect on objects - [#3417](https://github.com/detekt/detekt/pull/3417)
- Fix code samples for `UnnecessarySafeCall` - [#3416](https://github.com/detekt/detekt/pull/3416)
- New rule: DontDowncastCollectionTypes - [#3413](https://github.com/detekt/detekt/pull/3413)
- Fix documentation in UnnecessarySafeCall - [#3412](https://github.com/detekt/detekt/pull/3412)
- Bump gradle from 4.1.1 to 4.1.2 - [#3405](https://github.com/detekt/detekt/pull/3405)
- Introduce --max-issues flag for cli - #2267 - [#3391](https://github.com/detekt/detekt/pull/3391)
- Ignore actual functions in FunctionOnlyReturningConstant (#3388) - [#3390](https://github.com/detekt/detekt/pull/3390)
- Fix hyperlink for elements of the type 'KtFile' - [#3386](https://github.com/detekt/detekt/pull/3386)
- Update gradle doc to show table of contents correctly - [#3383](https://github.com/detekt/detekt/pull/3383)
- Update cli doc to show table of contents correctly - [#3382](https://github.com/detekt/detekt/pull/3382)
- Fix EmptyConfig making all rules active in production - [#3380](https://github.com/detekt/detekt/pull/3380)
- Empty custom config enables rules disabled by default - [#3379](https://github.com/detekt/detekt/issues/3379)
- Add `setup-detekt` action to README - [#3373](https://github.com/detekt/detekt/pull/3373)
- GlobalClassLoaderCache: move call to getFiles out of synchronized block - [#3370](https://github.com/detekt/detekt/pull/3370)
- Check for === instead of == - [#3363](https://github.com/detekt/detekt/issues/3363)
- Filter existing files in classpath - [#3361](https://github.com/detekt/detekt/pull/3361)
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - [#3358](https://github.com/detekt/detekt/pull/3358)
- Add the final new line in the baseline again - [#3351](https://github.com/detekt/detekt/pull/3351)
- [Security] Bump nokogiri from 1.10.10 to 1.11.1 in /docs - [#3348](https://github.com/detekt/detekt/pull/3348)
- Remove trailing newline after ending IndentingXMLStreamWriter - [#3347](https://github.com/detekt/detekt/pull/3347)
- [Security] Bump nokogiri from 1.10.10 to 1.11.0 in /docs - [#3343](https://github.com/detekt/detekt/pull/3343)
- Add UnnecessaryFilter rule - [#3341](https://github.com/detekt/detekt/pull/3341)
- Reorganize docs for the configuration file - [#3337](https://github.com/detekt/detekt/pull/3337)
- Add new rule SleepInsteadOfDelay - [#3335](https://github.com/detekt/detekt/pull/3335)
- Update Android Gradle Plugin to 4.1.1 - [#3328](https://github.com/detekt/detekt/pull/3328)
- Support relative output paths - [#3319](https://github.com/detekt/detekt/pull/3319)
- Fix `runLastOnRoot` being empty in KtLintMultiRule - [#3318](https://github.com/detekt/detekt/pull/3318)
- Ensure binary-compatibility with previous versrions - [#3315](https://github.com/detekt/detekt/issues/3315)
- Fix reports not propagated to detekt task with type resolution - [#3313](https://github.com/detekt/detekt/pull/3313)
- Support configurable severity per ruleset/rule in XML and Sarif output - [#3310](https://github.com/detekt/detekt/pull/3310)
- Configure default excludes for InvalidPackageDeclaration - [#3305](https://github.com/detekt/detekt/pull/3305)
- Remove exceptions of Library rules - [#3304](https://github.com/detekt/detekt/pull/3304)
- Move the questions to discussions - [#3300](https://github.com/detekt/detekt/pull/3300)
- Magic number extension functions - [#3299](https://github.com/detekt/detekt/pull/3299)
- NamedArguments: fix false positive with varargs - [#3294](https://github.com/detekt/detekt/pull/3294)
- NamedArguments rule: false positive with varargs - [#3291](https://github.com/detekt/detekt/issues/3291)
- NamedArguments with java code false positive - [#3289](https://github.com/detekt/detekt/issues/3289)
- Upgrade ktlint to 0.40.0 - [#3281](https://github.com/detekt/detekt/pull/3281)
- False positive "Unconditional loop jump" - [#3280](https://github.com/detekt/detekt/issues/3280)
- ForbiddenComments don't report TODO: in KDoc - [#3273](https://github.com/detekt/detekt/issues/3273)
- Add MultilineLambdaItParameter rule - [#3259](https://github.com/detekt/detekt/pull/3259)
- Update Kotlin to 1.4.21 - [#3254](https://github.com/detekt/detekt/pull/3254)
- Introduce --all-rules flag - [#3253](https://github.com/detekt/detekt/pull/3253)
- Enable more rules by default - [#3229](https://github.com/detekt/detekt/pull/3229)
- Running multiple Detekt tasks concurrently may cause deadlock - [#3047](https://github.com/detekt/detekt/issues/3047)
- detektMain is noisy "Ignoring a file detekt cannot handle" - [#3019](https://github.com/detekt/detekt/issues/3019)
- Configure default excludes for InvalidPackageDeclaration - [#2539](https://github.com/detekt/detekt/issues/2539)
- Hyperlink to error inside Android studio - [#2340](https://github.com/detekt/detekt/issues/2340)
- Align cli flags and defaults with other analysis tools - [#2267](https://github.com/detekt/detekt/issues/2267)
##### Housekeeping & Refactorings
- SwallowedException: Slightly improve the documentation - [#3527](https://github.com/detekt/detekt/pull/3527)
- Fix Markdown rendering of multiple default values - [#3526](https://github.com/detekt/detekt/pull/3526)
- Move gradle testkit test back to test/ - [#3504](https://github.com/detekt/detekt/pull/3504)
- Add documentation on suppressing formatting rules - [#3503](https://github.com/detekt/detekt/pull/3503)
- Change DetektMultiplatform from unit test to gradle testkit integrati… - [#3500](https://github.com/detekt/detekt/pull/3500)
- Bump com.gradle.plugin-publish from 0.12.0 to 0.13.0 - [#3494](https://github.com/detekt/detekt/pull/3494)
- Refactor Gradle integration tests - [#3489](https://github.com/detekt/detekt/pull/3489)
- Refactor gradle integration test - [#3487](https://github.com/detekt/detekt/pull/3487)
- Prepare Detekt 1.16.0-RC2 - [#3485](https://github.com/detekt/detekt/pull/3485)
- Bump mockk from 1.10.5 to 1.10.6 - [#3473](https://github.com/detekt/detekt/pull/3473)
- Upgrade to Gradle 6.8.2 - [#3468](https://github.com/detekt/detekt/pull/3468)
- Correct `maxIssues` documentation - [#3456](https://github.com/detekt/detekt/pull/3456)
- Bump junit-platform-launcher from 1.7.0 to 1.7.1 - [#3454](https://github.com/detekt/detekt/pull/3454)
- Don't use deprecated functions - [#3452](https://github.com/detekt/detekt/pull/3452)
- Bump github-pages from 210 to 211 in /docs - [#3434](https://github.com/detekt/detekt/pull/3434)
- Add documentation for SARIF, severity and relative path - [#3433](https://github.com/detekt/detekt/pull/3433)
- Refactor uploading SARIF to report without overriding the previous step - [#3432](https://github.com/detekt/detekt/pull/3432)
- Fix `githubRelease` skipping assets - [#3427](https://github.com/detekt/detekt/pull/3427)
- Prompt bug reporters to attach gradle scan - [#3422](https://github.com/detekt/detekt/pull/3422)
- Fix invalid link in detekt html report - [#3421](https://github.com/detekt/detekt/pull/3421)
- Prepare 1.16.0-rc1 release - [#3411](https://github.com/detekt/detekt/pull/3411)
- Add full qualified name in documentation - [#3410](https://github.com/detekt/detekt/pull/3410)
- Bump kotlinx-coroutines-core from 1.3.8 to 1.4.1 - [#3407](https://github.com/detekt/detekt/pull/3407)
- Fix deploy website on master - [#3406](https://github.com/detekt/detekt/pull/3406)
- Bump mockk from 1.10.4 to 1.10.5 - [#3404](https://github.com/detekt/detekt/pull/3404)
- Bump assertj-core from 3.18.1 to 3.19.0 - [#3403](https://github.com/detekt/detekt/pull/3403)
- Bump github-pages from 209 to 210 in /docs - [#3401](https://github.com/detekt/detekt/pull/3401)
- Update dangling URLs pointing to the old website - [#3400](https://github.com/detekt/detekt/pull/3400)
- Auto generate CLI options in docs - [#3399](https://github.com/detekt/detekt/pull/3399)
- Update documentations on snapshots - [#3393](https://github.com/detekt/detekt/pull/3393)
- Fix maven publish - [#3392](https://github.com/detekt/detekt/pull/3392)
- Fix build script to avoid jvm plugin applied - [#3389](https://github.com/detekt/detekt/pull/3389)
- Disable parallel test discovery; we already use Grade workers for max parallelism - [#3387](https://github.com/detekt/detekt/pull/3387)
- Use more fluent assertions - [#3381](https://github.com/detekt/detekt/pull/3381)
- Refactor orders of repositories - [#3376](https://github.com/detekt/detekt/pull/3376)
- Add a test for UndocumentedPublicClass and fun interfaces - [#3374](https://github.com/detekt/detekt/pull/3374)
- Refactor build.gradle.kts in detekt-gradle-plugin - [#3371](https://github.com/detekt/detekt/pull/3371)
- Gradle to 6.8 - [#3362](https://github.com/detekt/detekt/pull/3362)
- Integrate SARIF report with Github code scanning - [#3359](https://github.com/detekt/detekt/pull/3359)
- Refactor integration test for detekt-gradle-plugin - [#3356](https://github.com/detekt/detekt/pull/3356)
- Improve gradle plugin - [#3354](https://github.com/detekt/detekt/pull/3354)
- Remove checkNotNull - [#3352](https://github.com/detekt/detekt/pull/3352)
- Generate API validation for `detekt-psi-utils` - [#3338](https://github.com/detekt/detekt/pull/3338)
- recover binary compatibility with 1.15.0 - [#3336](https://github.com/detekt/detekt/pull/3336)
- Refactor tests in detekt-gradle-plugin - [#3333](https://github.com/detekt/detekt/pull/3333)
- Fix failing website deployment on master - [#3332](https://github.com/detekt/detekt/pull/3332)
- The output of updateVersion should not depend on the OS that executes it - [#3330](https://github.com/detekt/detekt/pull/3330)
- Reduce visibility - [#3326](https://github.com/detekt/detekt/pull/3326)
- Refactor XmlOutputFormatSpec - [#3325](https://github.com/detekt/detekt/pull/3325)
- Simplify our buildSrc - [#3322](https://github.com/detekt/detekt/pull/3322)
- Apply binary compatibility plugin to Detekt - [#3320](https://github.com/detekt/detekt/pull/3320)
- Add KDoc for convoluted PathFilters.isIgnored - [#3312](https://github.com/detekt/detekt/pull/3312)
- Don't mix kotlin 1.3 and 1.4 - [#3309](https://github.com/detekt/detekt/pull/3309)
- Allow to overwrite in the task moveJarForIntegrationTest - [#3308](https://github.com/detekt/detekt/pull/3308)
- Remove unnecessary .trimIndent() - housekeeping - [#3307](https://github.com/detekt/detekt/pull/3307)
- Fix typo - [#3301](https://github.com/detekt/detekt/pull/3301)
- General housekeeping - [#3298](https://github.com/detekt/detekt/pull/3298)
- Inline UnconditionalJumpStatementInLoop case files - [#3296](https://github.com/detekt/detekt/pull/3296)
See all issues at: [1.16.0](https://github.com/detekt/detekt/milestone/80)
#### 1.15.0 - 2020-12-18
##### Notable Changes
detekt 1.15.0 bundles Kotlin 1.4.10.
You may experience some known issues when your project already uses 1.4.20
- [#3248](https://github.com/detekt/detekt/issues/3248) and [#3282](https://github.com/detekt/detekt/issues/3282).
In addition to many rule improvements, there are also new ones:
- RedundantHigherOrderMapUsage
- UseIfEmptyOrIfBlank
We added documentation on how to configure [type resolution](https://detekt.github.io/detekt/type-resolution.html).
Only the rules marked with `Requires Type Resolution` (on the website documentation or `@requiresTypeResolution` in code) are executed (see
for example https://detekt.github.io/detekt/style.html#forbiddenmethodcall).
detekt now supports [SARIF](https://sarifweb.azurewebsites.net/) as an output format. In the future you will be able to
upload this format to GitHub and see detekt issues right in your pull requests.
##### Migration
We removed implementations of the `Config` interface from the public api.
It was first deprecated and then moved to `internal` package earlier this year.
Rule authors can use `TestConfig(Map)` or `yamlConfig(String)` from `detekt-test` to test their rules.
- Move internal config api to core module - [#3163](https://github.com/detekt/detekt/pull/3163)
##### Changelog
- NamedArguments: fix false positive with java method call - [#3290](https://github.com/detekt/detekt/pull/3290)
- Prepare 1.15.0 rc2 - [#3286](https://github.com/detekt/detekt/pull/3286)
- UnconditionalJumpStatementInLoop: don't report a return after a conditional jump - [#3285](https://github.com/detekt/detekt/pull/3285)
- Add MuseDev to the list of integrations - [#3284](https://github.com/detekt/detekt/pull/3284)
- Fix ForbiddenComment rule not checking for KDoc - [#3275](https://github.com/detekt/detekt/pull/3275)
- ForbiddenComments don't report TODO: in KDoc - [#3273](https://github.com/detekt/detekt/issues/3273)
- Add IntelliJ platform plugin template integration to readme - [#3270](https://github.com/detekt/detekt/pull/3270)
- Bundle new sarif output format by default - [#3268](https://github.com/detekt/detekt/pull/3268)
- Add a test for UnusedImports with annotations used as attributes #3246 - [#3255](https://github.com/detekt/detekt/pull/3255)
- Add documentation page on type resolution - [#3225](https://github.com/detekt/detekt/pull/3225)
- ThrowsCount rule: fix false positive with nested function - [#3223](https://github.com/detekt/detekt/pull/3223)
- False positive in ThrowsCount rule - [#3222](https://github.com/detekt/detekt/issues/3222)
- Refactor UnsafeCallOnNullableType rule - [#3221](https://github.com/detekt/detekt/pull/3221)
- Fix false negatives in UnreachableCode rule - [#3220](https://github.com/detekt/detekt/pull/3220)
- False negatives in UnreachableCode rule - [#3219](https://github.com/detekt/detekt/issues/3219)
- Refactor RedundantElseInWhen to use compiler warning - [#3214](https://github.com/detekt/detekt/pull/3214)
- NullableToStringCall: fix false negative with safe qualified expression - [#3213](https://github.com/detekt/detekt/pull/3213)
- False negative in NullableToStringCall - [#3211](https://github.com/detekt/detekt/issues/3211)
- NullableToStringCall: fix false negatives with qualified expression - [#3198](https://github.com/detekt/detekt/pull/3198)
- False negatives in NullableToStringCall - [#3196](https://github.com/detekt/detekt/issues/3196)
- Check for presence of null case in MissingWhenCase rule - [#3194](https://github.com/detekt/detekt/pull/3194)
- Throw error instead of logging as error in analysis phase - [#3193](https://github.com/detekt/detekt/pull/3193)
- Make kotlinc adapted rule comments internal - [#3190](https://github.com/detekt/detekt/issues/3190)
- MissingWhenCase false negative with nulls - [#3189](https://github.com/detekt/detekt/issues/3189)
- Check for static imports in unused imports rule - [#3188](https://github.com/detekt/detekt/pull/3188)
- Add allowElseExpression configuration for MissingWhenCase rule - [#3187](https://github.com/detekt/detekt/pull/3187)
- Add UseIfEmptyOrIfBlank rule - [#3186](https://github.com/detekt/detekt/pull/3186)
- Fix detektBaseline task filtering .java files - [#3185](https://github.com/detekt/detekt/pull/3185)
- Internal exception should fail the gradle task - [#3183](https://github.com/detekt/detekt/issues/3183)
- Add RedundantHigherOrderMapUsage rule - [#3182](https://github.com/detekt/detekt/pull/3182)
- Fix false negative in IgnoredReturnValue - [#3179](https://github.com/detekt/detekt/pull/3179)
- Fix false positive when `to` is used to create a pair within a function - [#3178](https://github.com/detekt/detekt/pull/3178)
- False Positive PreferToOverPairSyntax - [#3177](https://github.com/detekt/detekt/issues/3177)
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - [#3175](https://github.com/detekt/detekt/pull/3175)
- Hardcode default values - [#3171](https://github.com/detekt/detekt/pull/3171)
- False negative in IgnoredReturnValue - [#3170](https://github.com/detekt/detekt/issues/3170)
- Fix false positive in IgnoredReturnValue - [#3169](https://github.com/detekt/detekt/pull/3169)
- Duplicate deprecated KtLint methods - [#3168](https://github.com/detekt/detekt/pull/3168)
- Introduce NamedArguments rule - [#3167](https://github.com/detekt/detekt/pull/3167)
- Add JSON Schema documentation - [#3166](https://github.com/detekt/detekt/pull/3166)
- Fix MaxLineLengthSuppressed ignoring @Suppress annotation on class - [#3164](https://github.com/detekt/detekt/pull/3164)
- Use the properties syntax in Gradle docs - #3158 - [#3161](https://github.com/detekt/detekt/pull/3161)
- Fix rule LibraryCodeMustSpecifyReturnType - [#3155](https://github.com/detekt/detekt/pull/3155)
- Update README to mention config auto-complete - [#3143](https://github.com/detekt/detekt/issues/3143)
- @Suppress("MaxLineLength") not working for simple block comment inside class - [#3136](https://github.com/detekt/detekt/issues/3136)
- Support sarif as a report type - #3045 - [#3132](https://github.com/detekt/detekt/pull/3132)
- UnusedImports false positive for enums in annotation attributes (with type resolution) - [#3131](https://github.com/detekt/detekt/issues/3131)
- Unable to generate detektMain baseline for UnsafeCallOnNullableType violations in Android (mixed Kotlin + Java) modules - [#3130](https://github.com/detekt/detekt/issues/3130)
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - [#3125](https://github.com/detekt/detekt/issues/3125)
- SARIF export support - [#3045](https://github.com/detekt/detekt/issues/3045)
- IgnoredReturnValue false positives - [#3043](https://github.com/detekt/detekt/issues/3043)
- Offset calculation in KtLint deprecated/made private - [#3021](https://github.com/detekt/detekt/issues/3021)
- Map { it } must return an error - [#2975](https://github.com/detekt/detekt/issues/2975)
- Upload detekt-formatting plugin to Github releases next to precompiled cli binary - [#2927](https://github.com/detekt/detekt/issues/2927)
- Add a rule to flag places where `ifBlank` and `ifEmpty` can be used - [#2840](https://github.com/detekt/detekt/issues/2840)
- Remove hardcoded default values from rules - [#2597](https://github.com/detekt/detekt/issues/2597)
- Doc: type and symbol solving - [#2259](https://github.com/detekt/detekt/issues/2259)
- Suggestion: LongParameterList rule but on method call if named argument is not used - [#1007](https://github.com/detekt/detekt/issues/1007)
##### Housekeeping & Refactorings
- Standardize "active" constant - [#3292](https://github.com/detekt/detekt/pull/3292)
- Update Spek to v2.0.15 - [#3287](https://github.com/detekt/detekt/pull/3287)
- Reformat code indentation in ReturnFromFinallySpec.kt - [#3278](https://github.com/detekt/detekt/pull/3278)
- Inline ReturnFromFinally report message text - [#3277](https://github.com/detekt/detekt/pull/3277)
- Simplify ReturnFromFinally check for finally expressions - [#3276](https://github.com/detekt/detekt/pull/3276)
- CI with Java 15 - [#3262](https://github.com/detekt/detekt/pull/3262)
- Enabled publishing of sha256 and sha512 signatures - [#3249](https://github.com/detekt/detekt/pull/3249)
- Remove default config entries in detekt.yml - [#3239](https://github.com/detekt/detekt/pull/3239)
- Fix grammar in configuration guide - [#3238](https://github.com/detekt/detekt/pull/3238)
- Exclude detekt:LargeClass rule in test sources - [#3237](https://github.com/detekt/detekt/pull/3237)
- Release 1.15.0 rc1 - [#3236](https://github.com/detekt/detekt/pull/3236)
- Remove unused format function in RuleExtensions - [#3234](https://github.com/detekt/detekt/pull/3234)
- Update spek to v2.0.14 - [#3231](https://github.com/detekt/detekt/pull/3231)
- Remove already activated rules from detekt.yml - [#3230](https://github.com/detekt/detekt/pull/3230)
- Fix broken website redirects - [#3227](https://github.com/detekt/detekt/pull/3227)
- Remove unused resources from the website - [#3226](https://github.com/detekt/detekt/pull/3226)
- Simplify EqualsOnSignatureLine rule - [#3224](https://github.com/detekt/detekt/pull/3224)
- Remove unnecessary suppression in main - [#3217](https://github.com/detekt/detekt/pull/3217)
- Simplify MissingWhenCase by removing an unnecessary alternative path - [#3216](https://github.com/detekt/detekt/pull/3216)
- Refactor HasPlatformType rule - [#3210](https://github.com/detekt/detekt/pull/3210)
- Remove Suppress annotation from ArrayPrimitive - [#3209](https://github.com/detekt/detekt/pull/3209)
- Refactor UselessCallOnNotNull rule - [#3208](https://github.com/detekt/detekt/pull/3208)
- Refactor MissingWhenCase - [#3207](https://github.com/detekt/detekt/pull/3207)
- Refactor NullableToStringCall - [#3206](https://github.com/detekt/detekt/pull/3206)
- Refactor RedundantElseInWhen - [#3205](https://github.com/detekt/detekt/pull/3205)
- Refactor PreferToOverPairSyntax - [#3204](https://github.com/detekt/detekt/pull/3204)
- Remove Suppress annotation from MagicNumber - [#3203](https://github.com/detekt/detekt/pull/3203)
- Remove Suppress annotation from UnusedImports - [#3202](https://github.com/detekt/detekt/pull/3202)
- Refactor FunctionNaming rule - [#3201](https://github.com/detekt/detekt/pull/3201)
- Setup the website publishing pipeline - [#3199](https://github.com/detekt/detekt/pull/3199)
- Improve code coverage for DefaultCliInvoker testing happy and error path - [#3195](https://github.com/detekt/detekt/pull/3195)
- Make kotlinc adapted rule comments internal - [#3192](https://github.com/detekt/detekt/pull/3192)
- Improve PreferToOverPairSyntax - [#3181](https://github.com/detekt/detekt/pull/3181)
- Simplify PreferToOverPairSyntax check - [#3180](https://github.com/detekt/detekt/pull/3180)
- Improves in IgnoredReturnValue - [#3174](https://github.com/detekt/detekt/pull/3174)
- Move KtFileContent to FileParsingRule - [#3173](https://github.com/detekt/detekt/pull/3173)
- Don't use deprecated onStart - [#3172](https://github.com/detekt/detekt/pull/3172)
See all issues at: [1.15.0](https://github.com/detekt/detekt/milestone/79)
#### 1.14.2 - 2020-10-20
##### Changelog
- Do not report vararg arguments which are just passed to a vararg parameter - [#3157](https://github.com/detekt/detekt/pull/3157)
- Simplify documentation - [#3156](https://github.com/detekt/detekt/pull/3156)
- Respect inspection aliases ClassName, PackageDirectoryMismatch, RedundantVisibilityModifier - [#3153](https://github.com/detekt/detekt/pull/3153)
- Change spek and assertj to compile only dependencies for detekt-test consumers - [#3152](https://github.com/detekt/detekt/pull/3152)
- False positive performance SpreadOperator in case of pass-through vararg - [#3145](https://github.com/detekt/detekt/issues/3145)
- ClassOrdering rule reports a list of errors - [#3142](https://github.com/detekt/detekt/pull/3142)
- ClassOrdering only reports first misorder, not all misorders - [#3141](https://github.com/detekt/detekt/issues/3141)
- UnusedPrivateMember: fix false positive with getValue/setValue operator functions - [#3139](https://github.com/detekt/detekt/pull/3139)
- ClassOrdering reports a message describing the misorder - [#3138](https://github.com/detekt/detekt/pull/3138)
- False positive UnusedPrivateMember for getValue, setValue operator functions - [#3128](https://github.com/detekt/detekt/issues/3128)
- Add aliases to class and package Naming rules - [#3124](https://github.com/detekt/detekt/issues/3124)
- Artifact detekt-test forces dependency constraining - [#3082](https://github.com/detekt/detekt/issues/3082)
##### Housekeeping & Refactorings
- Fix two eager Regex creations in rules which may confuse users if this rules are inactive but evaluated - [#3154](https://github.com/detekt/detekt/pull/3154)
- Update Gradle to 6.7 - [#3148](https://github.com/detekt/detekt/pull/3148)
- Bump github-pages from 208 to 209 in /docs - [#3135](https://github.com/detekt/detekt/pull/3135)
See all issues at: [1.14.2](https://github.com/detekt/detekt/milestone/78)
#### 1.14.1 - 2020-09-30
##### Changelog
- Write recipe to compare user and default config - #3065 - [#3114](https://github.com/detekt/detekt/pull/3114)
- Improve description of AbsentOrWrongFileLicense rule - [#3109](https://github.com/detekt/detekt/pull/3109)
- Report Unit returned by method implementations in interfaces - [#3108](https://github.com/detekt/detekt/pull/3108)
- Change OptionalUnit to report Unit returned by method implementations in interfaces - [#3099](https://github.com/detekt/detekt/issues/3099)
- 1.13.0 changes to detektGenerateConfig - [#3065](https://github.com/detekt/detekt/issues/3065)
- detekt 1.12.0 and org.springframework.boot 2.2.6.RELEASE clash - [#3058](https://github.com/detekt/detekt/issues/3058)
##### Housekeeping & Refactorings
- Update mockk to 1.10.2 - [#3113](https://github.com/detekt/detekt/pull/3113)
- Refactoring: Use indices syntax in loop - [#3112](https://github.com/detekt/detekt/pull/3112)
- Specify type explicitly in DetektCreateBaselineTask - [#3111](https://github.com/detekt/detekt/pull/3111)
- Refactoring: Class member can have private visibility - [#3110](https://github.com/detekt/detekt/pull/3110)
- Fix kotlin-reflect problem for idea plugin - [#3107](https://github.com/detekt/detekt/pull/3107)
See all issues at: [1.14.1](https://github.com/detekt/detekt/milestone/77)
#### 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](https://github.com/detekt/detekt/pull/3101)
- New rule: SuspendFunWithFlowReturnType - [#3098](https://github.com/detekt/detekt/pull/3098)
- Fix formatting issues have no absolute path - #3063 - [#3097](https://github.com/detekt/detekt/pull/3097)
- Fix false positive (+= overload) in UnusedPrivateMember - [#3094](https://github.com/detekt/detekt/pull/3094)
- Update RedundantVisibilityModifierRule to find redundant internal modifiers - [#3092](https://github.com/detekt/detekt/pull/3092)
- New rule: ReplaceSafeCallChainWithRun - [#3089](https://github.com/detekt/detekt/pull/3089)
- New rule: ClassOrdering - [#3088](https://github.com/detekt/detekt/pull/3088)
- Use File.pathSeparator to split entries in classpath - [#3084](https://github.com/detekt/detekt/pull/3084)
- Wrap new KtLint rules - [#3083](https://github.com/detekt/detekt/pull/3083)
- Wrap KtLint AnnotationSpacingRule - [#3081](https://github.com/detekt/detekt/issues/3081)
- Wrap KtLint ArgumentListWrappingRule - [#3080](https://github.com/detekt/detekt/issues/3080)
- UnusedImports rule: fix false positives when type resolution is enabled - [#3079](https://github.com/detekt/detekt/pull/3079)
- Move SNAPSHOT from artifactory to sonatype - [#3076](https://github.com/detekt/detekt/pull/3076)
- Update KtLint to 0.39.0 - [#3075](https://github.com/detekt/detekt/pull/3075)
- UnusedImports: Lots of false positives - [#3074](https://github.com/detekt/detekt/issues/3074)
- Update dependency badge to maven central - [#3072](https://github.com/detekt/detekt/pull/3072)
- Simplify reporting message for IgnoredReturnValue - [#3068](https://github.com/detekt/detekt/pull/3068)
- Add ability to pass rootclasspaths to KtTestCompiler - [#3066](https://github.com/detekt/detekt/issues/3066)
- MagicNumber rule: don't check Character, Boolean and null - [#3064](https://github.com/detekt/detekt/pull/3064)
- KtLint formatting checks do not include full path in report - [#3063](https://github.com/detekt/detekt/issues/3063)
- IgnoredReturnValue should only report name of method/function called - [#3052](https://github.com/detekt/detekt/issues/3052)
##### Housekeeping & Refactorings
- Update jacoco with Java 15 support - [#3105](https://github.com/detekt/detekt/pull/3105)
- Update project dependencies - [#3104](https://github.com/detekt/detekt/pull/3104)
- Enable parallel spek test discovery - [#3090](https://github.com/detekt/detekt/pull/3090)
- Update Gradle to 6.7-rc-2 - [#3071](https://github.com/detekt/detekt/pull/3071)
- Update spek framework to 2.0.13 - [#3070](https://github.com/detekt/detekt/pull/3070)
- Update kramdown dependency due to a vulnerability - [#3069](https://github.com/detekt/detekt/pull/3069)
- Add test asserting the report message - [#3061](https://github.com/detekt/detekt/pull/3061)
See all issues at: [1.14.0](https://github.com/detekt/detekt/milestone/76)
#### 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](https://github.com/detekt/detekt/pull/3056)
- FunctionNaming: allow anonymous functions - [#3055](https://github.com/detekt/detekt/pull/3055)
- FunctionNaming should ignore anonymous functions - [#3054](https://github.com/detekt/detekt/issues/3054)
- Fix ModifierOrder for false positive reported by ModifierOrder when using fun interfaces - [#3051](https://github.com/detekt/detekt/pull/3051)
- False positive reported by ModifierOrder when using fun interfaces - [#3050](https://github.com/detekt/detekt/issues/3050)
- Fix PreferToOverPairSyntax exception - [#3046](https://github.com/detekt/detekt/pull/3046)
- PreferToOverPairSyntax throws exceptions - [#3044](https://github.com/detekt/detekt/issues/3044)
- Remove deprecated entity and location members - [#3037](https://github.com/detekt/detekt/pull/3037)
- Respect configured config file when running the detektCreateConfig task - [#3036](https://github.com/detekt/detekt/pull/3036)
- Remove last years api deprecations - [#3035](https://github.com/detekt/detekt/pull/3035)
- UnusedImports rule: fix false negative when same name identifiers are imported and used - [#3033](https://github.com/detekt/detekt/pull/3033)
- ForbiddenMethodCall: report operator calls - [#3032](https://github.com/detekt/detekt/pull/3032)
- Improve documentation for Gradle repositories setup - [#3030](https://github.com/detekt/detekt/pull/3030)
- how to use the type resolution to make ForbiddenMethodCall to check bigdecimal.equals using bigdecimal == bigdecimal? - [#3029](https://github.com/detekt/detekt/issues/3029)
- Use lazy gradle APIs in docs - [#3028](https://github.com/detekt/detekt/pull/3028)
- Implement option to turn config property deprecation warnings as errors - [#3026](https://github.com/detekt/detekt/pull/3026)
- Fix RedundantSuspendModifier message - [#3025](https://github.com/detekt/detekt/pull/3025)
- Print filtered paths in debug mode for easier bug tracing - [#3022](https://github.com/detekt/detekt/pull/3022)
- Unused import not detected - [#3020](https://github.com/detekt/detekt/issues/3020)
- Include reports and formatting features to the system test - [#3018](https://github.com/detekt/detekt/pull/3018)
- detektGenerateConfig ignores detekt.config paramenter - [#2565](https://github.com/detekt/detekt/issues/2565)
- Treat config property deprecations as errors - [#2545](https://github.com/detekt/detekt/issues/2545)
- Print filtered paths in debug mode - [#869](https://github.com/detekt/detekt/issues/869)
##### Housekeeping & Refactorings
- Remove confusing annotation for UnusedImports rule - [#3039](https://github.com/detekt/detekt/pull/3039)
- Remove obsolete signature workaround for formatting plugin - [#3038](https://github.com/detekt/detekt/pull/3038)
- Upgrade to new dokka - [#2931](https://github.com/detekt/detekt/pull/2931)
See all issues at: [1.13.0](https://github.com/detekt/detekt/milestone/75)
#### 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:
```kt
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](https://github.com/detekt/detekt/pull/3011)
- ArrayPrimitive rule: report variable/receiver types and factory methods - [#3009](https://github.com/detekt/detekt/pull/3009)
- Add requiresTypeResolution annotation to UseCheckNotNull/UseRequireNotNull - [#3008](https://github.com/detekt/detekt/pull/3008)
- Update kotlinx.html dependencies - [#3007](https://github.com/detekt/detekt/pull/3007)
- Do not overwrite bintray publication - [#3006](https://github.com/detekt/detekt/pull/3006)
- Update Ktlint to 0.38.0 - [#3004](https://github.com/detekt/detekt/pull/3004)
- Add UseRequireNotNull/UseCheckNotNull rules - [#3003](https://github.com/detekt/detekt/pull/3003)
- Workaround config - [#3001](https://github.com/detekt/detekt/pull/3001)
- Replace `require(x != null)` with `requireNotNull(x)` - [#2998](https://github.com/detekt/detekt/issues/2998)
- Minor Gradle plugin cleanup - [#2997](https://github.com/detekt/detekt/pull/2997)
- detekt-gradle-plugin has two publishing configuration - [#2996](https://github.com/detekt/detekt/issues/2996)
- Introduce @requiresTypeResolution to KDoc for rules - [#2993](https://github.com/detekt/detekt/pull/2993)
- Fix support for Gradle configuration cache - [#2992](https://github.com/detekt/detekt/pull/2992)
- Fix false positive for UnnecessaryLet with disabled type resolution - [#2991](https://github.com/detekt/detekt/pull/2991)
- Deprecation: False positive with Kotlin 1.4.0 - [#2990](https://github.com/detekt/detekt/issues/2990)
- False positive in UnnecessaryLet - [#2987](https://github.com/detekt/detekt/issues/2987)
- Gradle plugin fixes - [#2986](https://github.com/detekt/detekt/pull/2986)
- Remove deprecated customReports detekt task property - #2811 - [#2944](https://github.com/detekt/detekt/pull/2944)