Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle corner case of multiple inheritance in UnnecessaryAbstractClass rule #1

Merged
merged 65 commits into from Jul 10, 2022
Merged

Conversation

amitdash291
Copy link

This PR handles the corner case of multiple inheritance, where an abstract class inherits from an interface and an abstract class in the same manner, for the UnnecessaryAbstractClass rule.

This relates to the issue detekt#5009

3flex and others added 30 commits June 12, 2022 08:31
This is blocking update to Kotlin 1.7.0 (detekt#4821)
* 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>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Brais Gabín <braisgabin@gmail.com>
* 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>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
This effectively pins the Kotlin compiler version used by detekt-cli,
minimising the chance of it being overridden and causing issues such as
detekt#4786
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….6.3 (detekt#4976)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.
Co-authored-by: Markus Schwarz <post@markus-schwarz.net>
* 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
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Support markdown report in Gradle plugin

* Add markdown description to website docs

* Improve markdown description for website docs
* Fix Signatures.kt:buildFunctionSignature

'buildFunctionSignature' fails when function body has KDoc.

* Simplify tests

* Skip comments
cortinico and others added 25 commits June 30, 2022 09:08
* Removes documentation formatting issue

* Removes extra caracter
See: ForbiddenMethodCall with Kotlin getters as property detekt#5015
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#5023)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Add endColumn/endLine to SARIF region

* Add fixes

Replace toSet() with distinct(), get rid of null check.

* Get rid of 'mockk'

* Fix line order
* Fix ReturnCount debt in UnnecessaryBackticks

* Remove code duplication in NullableBooleanCheck

* Fix MultilineIfElse debt
Fix issues where MaxChainedCallsOnSameLine would report long import and package directives, where a warning certainly isn't necessary.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…calls (detekt#5036)

* MaxChainedCallsOnSameLine: don't count package references as chained calls

* Use compileAndLintWithContext
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Fix ComplexCondition debt and refactor code

* Remove unnecessary parentheses
…collections (detekt#4994)

* Refactor: clear separation between "can" and "recommended" replace

This also provides a less strict and universal implementation for the previous type parameters bugfix: detekt#4803

As commented in the code, it does this by doing a lazy attempt at whether type inference is possible. If needed, this can be extended on later.

* Fix: non-sensical index accessor recommendations for java classes

Closes detekt#4918

* Refactor: use default Java sources for ExplicitCollectionElementAccess test
…es (detekt#5033)

* Xml Report Merger now merges duplicate smells across input report files

* Mock time in MarkdownReportSpec for more consistent test results

* Update detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/report/XmlReportMerger.kt

Co-authored-by: Tim Oltjenbruns <tim.oltjenbruns@softvision.com>
Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>
* Add ending line and column to Location.kt

* Revert changes to detekt-api.api

* Add tests for Location.kt

* Add new line to comply with format

Co-authored-by: schalkms <30376729+schalkms@users.noreply.github.com>
…ion (detekt#5048)

This opts-in to a stricter mode of operation that fails the build when a
plugin application fails, and enables the build cache for the
:generatePrecompiledScriptPluginAccessors task.

This will be the default in Gradle 8.0, but there's no reason not to enable
this in advance of that release given our build is stable with it enabled.
This workaround is no longer required as of Kotlin 1.6.20.
Links either point to the standard or experimental section in the readme.

Closes detekt#5054
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy link
Owner

@gouri-panda gouri-panda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitdash291 Thanks :)

@gouri-panda gouri-panda merged commit 2eabac7 into gouri-panda:fix-4753 Jul 10, 2022
@amitdash291 amitdash291 deleted the fix-4753 branch July 10, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet