mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
@@ -63,6 +63,7 @@ See all issues at: [RC16](https://github.com/arturbosch/detekt/milestone/45)
|
||||
For example `--filters .*/resources/.*` becomes `--excludes **/resources/**`. `includes` also accepts *globing patterns*.
|
||||
*Globing patterns* allow us to reuse some common logic of the `java.nio.file` package which for example handle Windows specific paths for us.
|
||||
This change also allows to be more fine granular with analyzing files: `--excludes **/generated/** --includes **/generated/this-needs-to-be-checked`.
|
||||
The following [how-to guide](https://arturbosch.github.io/detekt/howto-migratetestpattern.html) describes the migration process from the **test-pattern** functionality.
|
||||
- **Gradle Plugin**: Including or excluding paths and files from detekt scanning is now done by setting `include` & `exclude` on the
|
||||
detekt task which aligns with how other static analysis tools handle filters. Any use of `filters` will be ignored. See custom task examples for [Groovy][1] and [Kotlin][2].
|
||||
For details of syntax see https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/util/PatternFilterable.html
|
||||
|
||||
@@ -30,10 +30,6 @@ complexity:
|
||||
|
||||
To read about all supported rule sets and rules, use the side navigation `Rule Sets`.
|
||||
|
||||
#### Test-Pattern
|
||||
|
||||
The `test-pattern` is a deprecated feature and can be replaced with rule and rule set level excludes and includes.
|
||||
|
||||
#### Path Filters / Excludes / Includes
|
||||
|
||||
Starting with version **RC15** fine grained path filters can be defined for each rule or rule set:
|
||||
@@ -48,6 +44,7 @@ complexity:
|
||||
|
||||
This gives the user more freedom in analyzing only specific files
|
||||
and rule authors the ability to write *library only* rules.
|
||||
This is the replacement for the `test-pattern` feature.
|
||||
|
||||
Be aware that detekt now expects globing patterns instead of regular expressions!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user