Commit Graph

4341 Commits

Author SHA1 Message Date
Nicola Corti
58d4b8e839 Prepare Detekt 1.21.0-RC2 (#5013) 2022-06-30 09:08:04 +01:00
Amit Dash
49c6d88d08 Allow constants to be skipped for BooleanPropertyNaming rule (#5006)
Co-authored-by: Amit Dash <amitdash@Amit-Dash.local>
2022-06-29 20:02:56 +01:00
renovate[bot]
bea15be120 Update plugin pluginPublishing to v1.0.0 (#5010)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 19:59:36 +01:00
renovate[bot]
0a00c2a5f1 Update github/codeql-action digest to 3f62b75 (#5007)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 19:59:05 +01:00
Artur Bosch
5c39d7d252 Loading a specific resource from a module must use class from module (#5008) 2022-06-29 12:42:08 +02:00
Dominic Zirbel
1e696fd9fc Add MaxChainedCallsOnSameLine style rule (#4985)
Add a new rule MaxChainedCallsOnSameLine to limit the number of chained calls on placed on a single line. This works well alongside CascadingCallWrapping in #4979 to make long call chains more readable by wrapping them on new lines.
2022-06-28 15:28:01 +02:00
Artur Bosch
29158afff7 Show finding at declaration name instead of the whole declaration (#5003) 2022-06-28 15:25:56 +02:00
Toshiaki Kameyama
5d6ee2f43e NamedArguments: don't count trailing lambda argument (#5002) 2022-06-28 11:43:31 +02:00
Nicola Corti
5ff82e1131 Setup a Remark plugin to replace [detekt_version] with the current version on website (#5001) 2022-06-27 22:44:41 +02:00
Dominic Zirbel
c8eb24c04b UnnecessaryApply: fix false negative for assignment (#4948)
Fix a missed case of UnnecessaryApply where the apply contains a single field assignment but the result of the apply{} is unused. This pattern is actually used in 2/3 of the <noncompliant> examples and while it occurred in tests for false positives, no test actually checked that warnings were generated in the simple case.
2022-06-27 17:09:25 +02:00
renovate[bot]
0c879a7f37 Update dependency org.jetbrains.dokka to v1.7.0 (#4974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-27 17:03:47 +02:00
Vitaly V. Pinchuk
2b068e0042 Fix Signatures.kt:buildFunctionSignature (#4961)
* Fix Signatures.kt:buildFunctionSignature

'buildFunctionSignature' fails when function body has KDoc.

* Simplify tests

* Skip comments
2022-06-27 14:51:52 +02:00
Chao Zhang
5170077edc Address TextLocation for Wrapping (#4998) 2022-06-27 14:38:14 +02:00
Vitaly V. Pinchuk
3b7cae17b6 Support markdown report in Gradle plugin (#4995)
* Support markdown report in Gradle plugin

* Add markdown description to website docs

* Improve markdown description for website docs
2022-06-27 14:30:23 +02:00
renovate[bot]
4441bc403e Update github/codeql-action digest to 41a4ada (#4981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-25 11:45:36 +10:00
renovate[bot]
3d0f21565a Update actions/setup-java digest to 16cca54 (#4996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-25 11:44:23 +10:00
Vitaly V. Pinchuk
47428426d0 Fix false-negative for CanBeNonNullable (#4993)
* Report null-check returning 'Unit'

The rule will report code smell when null-check expression returns 'Unit'

* Not report guard statement with side effect ahead
2022-06-24 17:09:31 +02:00
Brais Gabín
8dc783a8eb Measure flakyness (#4742) 2022-06-22 18:32:31 +02:00
marschwar
4979e371a4 Do not allow junit assertions (#4987)
Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
2022-06-22 18:28:53 +02:00
Dominic Zirbel
89f6ec1586 Add CascadingCallWrapping style rule (#4979)
Add a new rule CascadingCallWrapping which requires that if a chained call is placed on a newline then all subsequent calls must be as well, improving readability of long chains.
2022-06-22 18:18:52 +02:00
Alex Stelmachonak
0e67d142e5 Add instuctions for CLI installation using Scoop (#4984) 2022-06-22 18:04:05 +02:00
Michael Bailey
7832eeffe2 Give a better error message for --jvm-target (#4978) 2022-06-22 06:02:09 +01:00
renovate[bot]
75f38dcc23 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.6.3 (#4976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-22 05:56:07 +01:00
renovate[bot]
bdec78d4c9 Update gradle/gradle-build-action digest to 67421db (#4977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-21 08:34:28 +10:00
Matthew Haughton
bd262c6fa5 Update dependency com.gradle.plugin-publish to 1.0.0-rc-3 (#4970) 2022-06-21 07:51:28 +10:00
Matthew Haughton
ecd28cf1a3 Simplify signing config (#4971) 2022-06-19 22:03:50 -07:00
Matthew Haughton
06ee239441 Use plain ASCII output in standard reports (#4968) 2022-06-19 02:07:41 +02:00
Matthew Haughton
b06276af54 Fix rule code samples to be valid Kotlin code (#4969) 2022-06-19 02:05:29 +02:00
renovate[bot]
8b62ffc105 Update dependency com.github.breadmoirai:github-release to v2.4.1 (#4965)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-17 09:03:48 -07:00
Matthew Haughton
e8e1f35dfc Set strict dependency on tested Kotlin compiler version (#4822)
This effectively pins the Kotlin compiler version used by detekt-cli,
minimising the chance of it being overridden and causing issues such as
#4786
2022-06-15 09:34:02 +02:00
renovate[bot]
195d15a04c Update react monorepo to v18.2.0 (#4958)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 00:22:08 +02:00
renovate[bot]
feec74c841 Update plugin binaryCompatibilityValidator to v0.10.1 (#4954)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-14 16:14:52 +02:00
Brais Gabín
a10e957c3d Improve readme (#4914)
* Move integrations down

* Remove old integration

* Move more integrations down

* More improvements

* Improve the detekt features

* Update link

* Improve website/docs/intro.mdx

* Add links to kotlin homepage

* Update README.md

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>

* Add complexity reports back

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>
2022-06-14 10:05:28 +02:00
Vitaly V. Pinchuk
5d49409814 Add Markdown report (#4858)
Co-authored-by: Brais Gabín <braisgabin@gmail.com>
2022-06-14 06:06:05 +01:00
Chao Zhang
43ea42ca51 Fix a typo in GRADLE_CACHE_PASSWORD credentials and enable remote cache write for two workflows (#4951) 2022-06-13 17:40:17 +02:00
Artur Bosch
1d47fd3673 Support disabling config validation via tooling spec (#4937) 2022-06-12 22:42:26 -07:00
Nicola Corti
43e0a4adc4 Remove Sonarqube Gradle Plugin (#4950) 2022-06-12 22:38:06 -07:00
Matthew Haughton
d3cdbb6da6 Enable GE build scan publishing for all workflows (#4947) 2022-06-13 11:29:39 +10:00
renovate[bot]
44d0e81a80 Pin Github Actions SHAs (#4938)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-13 01:21:49 +01:00
Chao Zhang
d06b109568 Gradle Enterprise Trial (#4763)
* Refactor `JvmSpec` to avoid using test resources

* Build a utility to copy resource files into temporary files

* Fix deprecation warning on jacocoMergedReport

* Add back `jvm` test fixtures

* Enabled Remote Build cache

* Change androidSdkInstalled to a boolean flag

* Use consistent warningsAsErrors

* Enable local build cache

* Fix MaxLineLength violation

* Update build-logic/src/main/kotlin/module.gradle.kts

Co-authored-by: Brais Gabín <braisgabin@gmail.com>

* Add a separate job to enable `warningsAsErrors`

Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: Brais Gabín <braisgabin@gmail.com>
2022-06-12 14:21:22 -07:00
Matthew Haughton
e33878ce7b Drop dependency-analysis plugin (#4946)
This is blocking update to Kotlin 1.7.0 (#4821)
2022-06-12 08:31:28 +10:00
renovate[bot]
2f75d2c318 Update plugin com.gradle.enterprise to v3.10.2 (#4939)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-09 20:14:57 -07:00
Artur Bosch
7c485f5c3d Provide a priority field for DetektProvider so tools can easier choose their provider implemention in tests for example (#4923) 2022-06-09 00:34:47 +02:00
renovate[bot]
cdf487a94b Update plugin dependencyAnalysis to v1.5.0 (#4933)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-08 08:52:22 +02:00
Brais Gabín
15012d716c Add missing redirect (#4931) 2022-06-07 22:30:59 +01:00
Toshiaki Kameyama
0ecebd4f61 UnusedPrivateMember: highlight declaration name (#4928) 2022-06-07 21:14:51 +02:00
Nicola Corti
9146e4d1f6 Fix various rendering problem on the formatting ruleset (#4911) 2022-06-04 13:02:11 +01:00
Dominic Zirbel
4b30c6be87 CastToNullableType: allow casting null keyword (#4907)
Fix a false positive for CastToNullableType for casting a literal `null` to a nullable type. This can be necessary when providing null as a function argument where the incoming type is parameterized. In this case using e.g. `null as? String` is less meaningful and generates a compiler warning that the cast cannot succeed.
2022-06-04 13:25:06 +02:00
renovate[bot]
ae7b41b571 Update plugin com.gradle.common-custom-user-data-gradle-plugin to v1.7.2 (#4897)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-04 13:23:37 +02:00
Gabriel Freitas Vasconcelos
5baf1f6955 Creates ForbiddenSuppress rule (#4899)
This rule is based on discussion #4890.

Checks for suppression of one or more rules that have been decided to
never be suppressed within a code base. For example, if we've set
MaximumLineLength to a value, every file must be compliant, and if there
is a special case where compliance is discouraged, we can simply exclude
this file within YML configuration.

This rule cannot prevent itself from being suppressed, but should serve
to discourage the over use of `@Suppress` annotations.
2022-06-03 17:19:23 +01:00