325 Commits

Author SHA1 Message Date
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
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
Nicola Corti
010f5edaf2 Remove the docs folder as it's unnecessary (#4904) 2022-06-03 15:01:42 +02:00
zohaib
faa985dfcf Add a recent conference talk link (#4819)
add link to droidcon London 2021 talk about detekt under "As mentioned in..."
2022-05-07 12:14:22 +02:00
Nicola Corti
83268d28f1 Update compatibility table for 1.20.0 (#4725) 2022-04-16 10:41:29 +02:00
Brais Gabín
0b5d42e7df Fix broken and outdated links (#4600) 2022-03-01 12:03:03 +00:00
Nicola Corti
74d3b6f1e3 Move the website to detekt.dev (#4544) 2022-02-04 00:50:26 +00:00
M Schalk
8cb63b7bcc Correct wrong integration tool name (#4442)
MuseDev => Sonatype Lift
2022-01-02 21:28:55 +01:00
M Schalk
d5b28e218d Update lins and references in README (#4421)
This updates the list of links and references in the *mentions* section.
Links and references got removed if they fulfill one the following criteria.
* The URL is not reachable anymore.
* The reference is heavily outdated. For instance: 
  * The tutorial or repo is very old (e.g. based on detekt < 1.0).
  * Repo is not maintained anymore
* The reference doesn't add more context to information given in the readme or linked sources.
2021-12-29 13:35:05 +01:00
M Schalk
31a0e0e491 Update contributor section in README (#4420)
This replaces the outdated text with a visual contributors overview.
Source: contrib.rocks
2021-12-28 09:57:59 -08:00
Brais Gabín
e4e2b5b430 Update compatibility table (#4351)
* Update compatibility table

* Update docs/pages/compatibility.md

Co-authored-by: Matthew Haughton <3flex@users.noreply.github.com>

* Update readme

Co-authored-by: Matthew Haughton <3flex@users.noreply.github.com>
2021-12-01 19:35:51 -08:00
Renato Turic
5e346458c2 [UseDataClass] Do not report on inner classes (#4344) 2021-12-01 08:29:37 +00:00
Matthew Haughton
bfb049b734 Document report output customization for Gradle tasks (#4064)
Doc update for #3687

# Conflicts:
#	docs/pages/gettingstarted/gradle.md
2021-11-29 12:55:08 +01:00
drinkthestars
149bfc6fab Add two new config steps for Compose (#4322)
* Added two new configs for Compose
* Added contributor entry to README
* Clarify wording of FunctionNaming config
2021-11-23 15:10:23 -08:00
Brais Gabín
c79d36048a Add to the documentation how to configure Baseline task with type resolution (#4285) 2021-11-18 11:01:57 +01:00
Luan Nico
deab0fe173 Fix UselessCallOnNotNull rule (#4237)
* Fix UselessCallOnNotNull rule

* Add name to the contributors list

* Replace listOf with arrayOf

* Rename variables for consistency
2021-11-08 22:47:14 +01:00
lukaszosowicki
844a97104f #4169 OutdatedDocumentation rule (#4185)
* Introduce OutdatedDocumentation rule

Basic implementation covers:
- class primary constructor parameters
- class primary constructor property parameters
- function parameters

* OutdatedDocumentation rule - type parameters matching

* OutdatedDocumentation rule - refactor and add more tests

* OutdatedDocumentation rule - report for secondary constructors

* OutdatedDocumentation rule - do not report when KDoc does not contain any @param or @property tag

* OutdatedDocumentation rule - add description

* OutdatedDocumentation rule - add configuration for type parameters and declarations order

* OutdatedDocumentation rule - refactor

* OutdatedDocumentation rule - fix CI

* OutdatedDocumentation rule - additional test cases

* OutdatedDocumentation rule - fix rule reporting for incorrect declarations order
2021-10-19 15:41:39 +02:00
Hans-Martin Schuller
aab94a2a91 Add customMessage to ForbiddenComment Rule (#4126)
* Add config customMessage to rule ForbiddenComment

* Add customMessage tests in FordbiddenCommentSpec

* Update contributors list

* Generate documentation
2021-10-18 09:06:46 +02:00
Michael McCormick
d3ab1b7340 Improved MaximumLineLength documentation (#4188)
* Updated MaximumLineLength documentation to mention that it overlaps with MaxLineLength
* Updated README
2021-10-17 14:54:56 -07:00
MohamedElMahdi
01537cb0af Add an alias for FunctionMinLength/FunctionMaxLength rules to be more descriptive (#4050)
Co-authored-by: mohamed-elmahdi <mohamed.elmahdi@virgingates.com>
2021-10-15 23:10:30 +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
Nicola Corti
b2664c3901 Update compatibility table for 1.18.0 (#4072) 2021-08-24 14:23:35 +02:00
George Jacob
42bd88d69e Adding name to contributors (#4051) 2021-08-17 21:09:11 +01: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
M Schalk
8c8d0491ba Add detekt tutorial from raywenderlich.com (#4018) 2021-08-08 08:23:37 +02:00
AlinaRakhimova
3710da1a71 New rule: BooleanPropertyNaming (#3795)
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Co-authored-by: marschwar <marschwar@users.noreply.github.com>
Co-authored-by: arakhimova <arakhimova@tradingview.com>
2021-08-05 23:08:28 +01:00
André Paz
85533a0dbd Improve LongParameterList rule by supporting ignoring annotated parameters (#3879) 2021-06-19 12:29:24 +01:00
Vinícius Munhoz
92360d10a3 Add kotlin dsl gradle task configuration in gradletask.md (#3686)
* Add kotlin dsl gradle task configuration in gradletask.md
* Remove jcenter from gradle task configuration example in the docs
2021-05-31 13:35:22 -07:00
Nicola Corti
a3df280b57 Update FOSSA Readme Badge (#3837) 2021-05-25 18:46:12 +02:00
Brais Gabín
8a8d790cdd Detekt gradle plugin requires Gradle 6.1 or later (#3830)
* Remove unnecesary code

* Up minimum gradle version to 6.1
2021-05-25 18:05:25 +10:00
Dominik Labuda
6abfd1005c plugin: Simpler classLoader caching (#3248) (#3799)
Previous caching mechanism didn't work properly when multiple projects
were running detekt task in parallel and differed in classpath. Due to
the broken locking mechanism the classpath files would not match the
content in the classloader.

The new implementation uses ConcurrentHashMap which handles locking by
itself and allows us to store classloader for any combination of files.
2021-05-24 09:02:25 -07:00
Eliezer Graber
df4d921dcc Fix false positive for value classes in ModifierOrder (#3719) 2021-05-23 09:17:17 -07:00
Nicola Corti
9d03e75735 Add a page with our compatibility table (#3803)
Co-authored-by: M Schalk <30376729+schalkms@users.noreply.github.com>
2021-05-21 14:04:49 +02:00
Nicola Corti
4590c98081 Minor tweaks to the README badges (#3804) 2021-05-20 17:18:34 -07:00
Matthew Haughton
59b6e8ebac Update README badges (#3789)
* Remove inactive Dependabot badge

https://github.com/dependabot/dependabot-core/issues/1912

* Remove misconfigured CodeFactor badge

Currently only gh-pages branch is being checked by CodeFactor

* Make FOSSA badge report on correct project

It was rendering the badge for detekt's IntelliJ plugin, not the primary
detekt project.

* Show pre-merge CI run status for main branch only
2021-05-18 22:13:28 +10:00
zmunm
869bd42109 Update contributor list (#3763) 2021-05-12 18:23:54 +02:00
Brais Gabín
acfeea1141 We have a logo :) (#3726) 2021-05-04 11:13:06 -07:00
Nicola Corti
9e71fc7e16 jcenter() -> mavenCentral() (#3455) 2021-04-27 19:45:41 +02:00
Chao Zhang
5df8f94874 Update README.md because we don't publish executables (#3707)
From comment https://github.com/detekt/detekt/issues/3690#issuecomment-827300814
2021-04-27 16:52:06 +02:00
joey.yoonsung.lee
1249b224f1 Fix readme (#3701) 2021-04-26 23:15:51 +10:00
M Schalk
147e90dfab Update readme - integrations & 3rd party projects (#3680)
Closes #3668
2021-04-14 09:03:54 -07:00
Krzysiek Kruczyński
90d5efc0f1 fix for KtNamedFunction.isMainFunction() (#3641)
* fix for KtNamedFunction.isMainFunction()
2021-04-02 09:15:13 -07:00
Ivo Šmíd
8dbb01fcbc SarifOutputReportSpec: Correctly detect Windows root directory on local development machine (#3584)
* SarifOutputReportSpec: Correctly detect Windows root directory on local development machine

* Update detekt-report-sarif/src/test/kotlin/io/github/detekt/report/sarif/SarifOutputReportSpec.kt

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>
2021-03-22 10:52:08 -07:00
Chao Zhang
aa464483ff Update files to support main branch in order to remove oppressive language (#3586) 2021-03-21 11:44:20 -07:00
Matthew Haughton
866eb2b2f3 Gradle tweaks (#3575)
* Use idiomatic repository declarations

* Prefer Maven Central to JCenter
* Limit JCenter to kotlinx-html-jvm module only
* Remove unnecessary repository declarations

* Agree to build scan T&Cs in settings where the plugin is applied

* Refactor

* Fix some issues in the build config examples

* Apply binary-compatibility-validator plugin only in subprojects that need it

* Don't configure Java source/target compatibility

There's no Java source code in the repository

* Don't unnecessarily declare plugins in root project build
2021-03-20 10:56:57 +01:00
Chao Zhang
bdceacbbb3 Add dependabot badge (#3539) 2021-03-11 12:02:06 +01:00
Marcelo Hernandez
fab88df460 Add new ObjectExtendsThrowable rule (#3443)
* Add new ObjectExtendsThrowable rule

* Restructure visitObjectDeclaration() override

* Split first test into 3 tests

* Provide a shorter code smell message
2021-02-05 14:34:35 +01:00
Chao Zhang
fa79c99801 Add allRules and deprecate failFast in gradle tasks (#3431)
* Add allRules and deprecate failFast in gradle tasks

* Add allRules and deprecate failFast in gradle tasks

* Keep failFast in tests
2021-02-01 22:20:51 +01:00
Chao Zhang
84c0aa4d60 Add documentation for SARIF, severity and relative path (#3433)
* Add documentation for SARIF, severity and relative path

* Reduce redundancy and fix text in configurations.
2021-02-01 19:49:41 +01:00
Volodymyr
a26038388f Add UnnecessaryFilter rule (#3341)
* Add tests for UnnecessaryFilter rule

* Add test for Sequence

* Implement rule: UnnecessaryFilter

* Fixed ReadMe

* fixed issues from CI

* Remove requiresTypeResolution from UnnecessaryFilter rule

* Update detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryFilter.kt

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>

* Fixe false-positives case with filter function, fixed spelling and add test to rule error message

* Update detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryFilter.kt

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

* add check operator by Fq name

* fixed linter issue

* Update detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryFilter.kt

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>

* Update detekt-rules-style/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnnecessaryFilterSpec.kt

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>
Co-authored-by: M Schalk <30376729+schalkms@users.noreply.github.com>
2021-01-29 13:45:25 -08:00