Commit Graph

3833 Commits

Author SHA1 Message Date
Brais
7743b0d8b2 Disable UnsafeCallOnNullableType on tests 2021-09-20 10:31:19 +02:00
Matthew Haughton
3e1d7c350d Drop junit-platform-launcher dependency (#4115)
Modern versions of IntelliJ and Gradle do not require this explicit
dependency to be added to the project.
2021-09-20 11:50:35 +10:00
Matthew Haughton
80401c5910 Don't unnecessarily propogate opt-in requirement (#4116)
Opt-in doesn't need to be propogated in test code, or in detekt-core which
is not public API.

https://kotlinlang.org/docs/opt-in-requirements.html#non-propagating-opt-in

> In modules that don't expose their own API, such as applications, you can
> opt in to using APIs without propagating the opt-in requirement to your
> code. In this case, mark your declaration with @OptIn passing the opt-in
> requirement annotation as its argument.
2021-09-20 11:49:09 +10:00
Brais Gabín
cbdb460361 Fix indent issues with continaution indent (#4103) 2021-09-17 20:45:38 +10:00
Nicola Corti
1e37dfe527 Remove UnnecessarySafeCall safeguard against ErrorType (#3439) 2021-09-17 12:43:44 +02:00
Matthew Haughton
bbbbd25767 Deprecate configuration of reports in detekt Gradle extension (#3687)
* Deprecate configuration of reports in detekt extension

* Deprecate customReportsDir

This is unnecessary as it just returns the value of reportsDir

* Introduce `required` and `outputLocation` report properties

This matches the property names & types used in Gradle's code quality
plugins.

* Fix issues detected by detekt

* Add changelog and migration guide for reporting changes

* Add warning when outputLocation set on detekt extension
2021-09-17 11:17:20 +10:00
marschwar
7962979fb3 Use reference in fallback property delegate (#3982)
Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
Co-authored-by: Brais <braisgabin@gmail.com>
2021-09-14 14:12:49 +02:00
Brais Gabín
19b06c96d0 Deprecated DefaultContext (#4098) 2021-09-14 14:07:54 +02:00
Brais Gabín
9bb1e2233c Remove library specific configurations (#4101) 2021-09-14 11:06:16 +02:00
Brais Gabín
3b3920936e Dynamic deprecation (#4104)
* Move files to the correct package

* Get deprecation list from file

* Auto generate deprecation.properties

* Make deprecated properties list dynamic
2021-09-13 19:53:33 +02:00
Brais Gabín
b4c095ead0 Rename and split ValidateConfig files (#4105) 2021-09-13 15:47:48 +02:00
Brais Gabín
cc74174873 Remove annotations from LateinitUsage noncompliant block (#4100) 2021-09-13 15:47:19 +02:00
Toshiaki Kameyama
465ccdd9a2 UnnecessaryAbstractClass: false positive when the abstract class has internal/protected abstract members (#4099) 2021-09-13 15:46:05 +02:00
Matthew Haughton
d177f51738 Fix globing typo (#4107) 2021-09-12 17:23:51 +02:00
Matthew Haughton
e0aed91293 Remove detekt-bom module (#4043) 2021-09-11 07:27:16 +10:00
Nicola Corti
1a2ca4b683 Remove hardcoded versions in Gradle documentation (#4091) 2021-09-05 19:22:47 +01:00
Matthew Haughton
fd0cb9096e Migrate buildSrc to composite build (#4090)
This will help reduce build times when changes are made to the precompiled
script plugins used in the build. This is because a change in buildSrc
causes the whole project to become out-of-date [0]. Using an included build
instead works around this problem.

[0] https://docs.gradle.org/7.2/userguide/organizing_gradle_projects.html#sec:build_sources
2021-09-04 23:09:59 +10:00
Calvin Ng
5081b891b7 Fix confusing message in the MultilineLambdaItParameter rule (#4089) 2021-09-03 20:24:31 +02:00
dependabot[bot]
4053bb799a Bump github-pages from 218 to 219 in /docs (#4081)
Bumps [github-pages](https://github.com/github/pages-gem) from 218 to 219.
- [Release notes](https://github.com/github/pages-gem/releases)
- [Commits](https://github.com/github/pages-gem/compare/v218...v219)

---
updated-dependencies:
- dependency-name: github-pages
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 22:03:21 +01:00
Nicola Corti
4356856775 Fix broken applySelfAnalysisVersion task (#4082)
The recent update to Gradle 7.2 broke this task that is using during release. I'm fixing it here.
2021-08-30 21:15:32 +01:00
Nicola Corti
060f31b660 Merge branch 'release/1.18.1' 2021-08-30 18:16:39 +01:00
Nicola Corti
85c9a627a9 Prepare Detekt 1.18.1 v1.18.1 2021-08-30 12:38:47 +01:00
Nicola Corti
ff4f87ca98 MultiRule should pass correctly the BindingContext (#4071)
* MultiRule should pass correctly the BindingContext

* Fix violation of NonBooleanPropertyPrefixedWithIs
2021-08-30 12:14:04 +01:00
Nicola Corti
3ecac0d82b MultiRule should pass correctly the BindingContext (#4071)
* MultiRule should pass correctly the BindingContext

* Fix violation of NonBooleanPropertyPrefixedWithIs
2021-08-24 15:35:38 -07:00
Nicola Corti
b2664c3901 Update compatibility table for 1.18.0 (#4072) 2021-08-24 14:23:35 +02:00
Matthew Haughton
198c53cdcd Remove deprecated KotlinExtension (#4063) 2021-08-21 15:04:09 +01:00
Matthew Haughton
acc8a58d84 Update dependencies (#4065)
* Update Gradle Enterprise plugin to 3.6.4

* Update Binary Compatibility Validator plugin to 0.7.0

* Update ktlint to 0.42.1

* Update dokka plugin to 1.5.0

* Update spek to 2.0.17

* Update JUnit Launcher to 1.7.2

* Update Gradle Versions plugin to 0.39.0

* Update Plugin Publishing plugin to 0.15.0

* Update SonarQube plugin to 3.3

* Fix deprecation warning
2021-08-21 14:45:55 +01:00
Brais Gabín
3ca29ea1b8 Allow active, excludes and includes in the rule-set configuration (#4045) 2021-08-21 13:56:57 +01:00
Brais Gabín
cfee00f4c0 Remove Error from ThrowingExceptionsWithoutMessageOrCause because is a common name (#4046) 2021-08-21 13:56:57 +01:00
George Jacob
a2510a2fbb Fix issue IDs for ReferentialEquality and DoubleMutability (#4040) 2021-08-21 13:56:54 +01:00
Matthew Haughton
026066f280 Gradle 7.2 (#4056)
* Gradle 7.2
* Declare plugins in version catalog where possible
2021-08-20 11:49:30 -07:00
Chao Zhang
0721351b9e Upscale JVM settings (#4057) 2021-08-19 09:49:56 -07:00
Sofiya Taskova
0124f020d4 Typo in Groovy merge report docs (#4054)
mergeTask doesn't exist yet on that line
2021-08-19 03:08:19 +01:00
Brais Gabín
b87caf68ed Allow active, excludes and includes in the rule-set configuration (#4045) 2021-08-18 14:22:50 +02:00
Brais Gabín
510ebc53ca Remove Error from ThrowingExceptionsWithoutMessageOrCause because is a common name (#4046) 2021-08-18 14:22:30 +02:00
George Jacob
42bd88d69e Adding name to contributors (#4051) 2021-08-17 21:09:11 +01:00
George Jacob
023fbc697d Fix issue IDs for ReferentialEquality and DoubleMutability (#4040) 2021-08-16 16:20:22 +02:00
Yundin Vladislav
deb39b3b29 Fix TextLocation of Indentation rule (#4030)
* Fix TextLocation of Indentation rule

Although Indentation applies to the whole file, it's a local rule.
Start of the real location reported by ktlint's offset. And I assume
that the end location should be on first non-whitespace character.

* Add contributor

* Add test for location of Indentation findings
2021-08-13 22:24:48 +02:00
Robert Stoll
31106ff500 fix report path, default path is reports/detekt/... (#4034) 2021-08-13 09:33:56 +01:00
marschwar
76bf5989d2 Update documentation renaming input to source in gradle extension (#3960)
Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
2021-08-12 23:05:27 +02:00
Nicola Corti
6594ce3ac5 Prepare Detekt 1.18.0 (#4032) 2021-08-12 23:04:14 +02:00
Nicola Corti
9d4ae9dcae [KMP] Fix resolution of Android test classpaths (#4026) v1.18.0 2021-08-11 22:02:48 +01:00
Brais Gabín
66049c5bb0 Sort config lists (#4014) 2021-08-11 17:11:58 +02:00
Nicola Corti
bca4a156ec Multiplatform tasks should not depend on check (#4025) 2021-08-10 17:57:30 +02:00
marschwar
28830b8db5 Enable UnnecessaryLet rule for detekt code base (#4024)
* Enable UnnecessaryLet rule for detekt code base

* baseline parser does not work with new lines

* replace let with private extension function to improve readability

Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
2021-08-10 16:44:31 +02:00
marschwar
b4329da3c3 enable PreferToOverPairSyntax rule for detekt code base (#4023)
* enable PreferToOverPairSyntax rule for detekt code base

* cleanup yaml formatting

Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
2021-08-10 16:43:33 +02:00
marschwar
e512a1f023 mark configWithFallback as unstable (#4028)
Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
2021-08-10 16:40:02 +02:00
Chao Zhang
207d9fbabd Update docs to use configuration avoidance API (#4022) 2021-08-09 21:22:22 +01:00
Nicola Corti
48c1da8462 Fix broken verifyGeneratorOutput task (#4019) 2021-08-08 14:47:38 +01:00
Brais Gabín
7540dc256a Add IllegalArgumentException and IllegalStateException to ThrowingExceptionsWithoutMessageOrCause (#4013) 2021-08-08 10:39:07 +02:00