Skip to content

Commit

Permalink
update docss
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Jul 2, 2022
1 parent 8196158 commit b096a6a
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### 4.8.0 (2022-07-02)
* Update checkstyle 9.1 -> 10.3.1
IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
[backports](https://checkstyle.org/#Backport) for lower jre.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2020 Vyacheslav Rusakov
Copyright (c) 2015-2022 Vyacheslav Rusakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NOTE: when updating plugin version in your project don't forget to call `clean`

```groovy
plugins {
id 'ru.vyarus.quality' version '4.7.0'
id 'ru.vyarus.quality' version '4.8.0'
}
```

Expand All @@ -59,7 +59,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath 'ru.vyarus:gradle-quality-plugin:4.7.0'
classpath 'ru.vyarus:gradle-quality-plugin:4.8.0'
}
}
apply plugin: 'ru.vyarus.quality'
Expand All @@ -73,7 +73,7 @@ Plugin compiled for java 8, compatible with java 11

Gradle | Version
--------|-------
5.6 | 4.7.0
5.6 | 4.8.0
5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2)
4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0)
older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ext {
animalsnifferVersion = '1.5.4'
cpdVersion = '3.3'
spotbugsPluginVersion = '4.8.0'
docVersion = '4.7.0'
docVersion = '4.8.0'
}

repositories { mavenLocal(); mavenCentral(); gradlePluginPortal() }
Expand Down
2 changes: 1 addition & 1 deletion src/doc/docs/about/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Plugin compiled for java 8, compatible with java 11

Gradle | Version
--------|-------
5.6 | 4.7.0
5.6 | 4.8.0
5.1 | [4.2.2](http://xvik.github.io/gradle-quality-plugin/4.2.2)
4.1 | [3.4.0](http://xvik.github.io/gradle-quality-plugin/3.4.0)
older | [2.4.0](http://xvik.github.io/gradle-quality-plugin/2.4.0)
Expand Down
26 changes: 26 additions & 0 deletions src/doc/docs/about/history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
### [4.8.0](http://xvik.github.io/gradle-quality-plugin/4.8.0) (2022-07-02)
* Update checkstyle 9.1 -> 10.3.1
IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
[backports](https://checkstyle.org/#Backport) for lower jre.
Additional maven repository would be registered if required (LIMITED to checkstyle only)
Warning in log would clearly indicate when backport is used
* New option: quality.checkstyleBackport (by default true for jre < 11)
Option might be used to force backport for java >=11 or to disable backport at all
* Update checkstyle config:
- Add [UnusedLocalVariable](https://checkstyle.sourceforge.io/config_coding.html#UnusedLocalVariable)
- Change [MultipleStringLiterals](https://checkstyle.org/config_coding.html#MultipleStringLiterals)
to react on strings more than 2 chars only and allow 2 duplicates (to avoid warning in trivial cases)
* Update pmd 6.34 -> 6.47 (java 17-18 support)
* Update pmd config:
- Disable [AvoidAccessibilityAlteration](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_errorprone.html#avoidaccessibilityalteration)
- Change [CognitiveComplexity](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_design.html#cognitivecomplexity) reportLevel to 21 (default 15)
- Disable [ReturnEmptyArrayRatherThanNull](https://pmd.github.io/pmd-6.47.0/pmd_rules_java_errorprone.html#returnemptyarrayratherthannull) as deprecated
* Update codenarc 2.2.0 -> 3.1.0 (groovy 4 support)
* New option: quality.codenarcGroovy4 (by default, true)
Since codenarc 3.1 separate groovy4-based codenarc jar produced (codenarc-groovy4)
It would be used by default because groovy 4 has better adoption for newer JDKs
(codenarc task started with its own groovy so it does not restrict gradle version)
If you need to use older codenarc version then switch this option off manually
* Update spotbugs 4.4.2 -> 4.7.1
* Update spotbugs plugin 4.7.9 -> 4.8.0

### [4.7.0](http://xvik.github.io/gradle-quality-plugin/4.7.0) (2021-11-10)
* Fix gradle 7 deprecation warnings (#30)
* Update spotbugs plugin 4.7.1 -> 4.7.9
Expand Down
2 changes: 1 addition & 1 deletion src/doc/docs/about/license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2021 Vyacheslav Rusakov
Copyright (c) 2015-2022 Vyacheslav Rusakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 22 additions & 0 deletions src/doc/docs/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@ quality {
* disable it (property is useful only for enabling it in gradle 5.6 - 6.3).
*/
pmdIncremental = false
/**
* Since checkstyle 10, minimum required java is 11. Community (not checkstyle core team!) started a
* backport (https://checkstyle.org/#Backport) project - maintaining java 8 compatibility.
* Backport releases would be delayed relative to main checkstyle releases (see
* https://rnveach.github.io/checkstyle-backport-jre8)
*
* NOTE: additional repository would be configured to download backport (only when backport required). But the
* repository would be limited to checkstyle group only!
*
* This property switches between backport and normal checkstyle versions. By default backport would be enabled
* on java 8-10, but you can manually enable it for all java versions if required. Or you can use false value
* to prevent backport behaviour and preventing new repository registration.
*/
checkstyleBackport = !JavaVersion.current().java11Compatible
/**
* Since codenarc 3.1.0 there is a separate artifact for groovy 4 (CodeNarc-Groovy4). Gradle runs codenarc
* task with it's own groovy so by default groovy4 artifact is active. If you need to use earlier codenarc version
* then switch this option to false.
*/
codenarcGroovy4 = true
/**
* By default, cpd looks in all sources (cpd gradle plugin behaviour). When option enabled, quality plugin will
Expand Down
9 changes: 9 additions & 0 deletions src/doc/docs/tool/checkstyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ By default, plugin activates if java sources available (`src/main/java`).
contains all possible checks, but some of them are disabled (note that some checkstyle rules are opposite and
never intended to be used together). Uncomment check to enable it.

!!! warning
Checkstyle 10 requires java 11 or above. In order to preserve java 8 compatibility,
plugin would automatically switch to [backport](https://checkstyle.org/#Backport).
Such backport is loaded from *custom repository* (limited to checkstyle only!).
You'll see a warning in logs about backport activation.
If required, this behaviour could be disabled with `quality.checkstyleBackport` configuration option.

!!! note ""
In case you will use a custom config: checkstyle config must describe all used rules. So when new version release with new rules,
config must be manually updated to add new rules (otherwise they would not be used).
Expand All @@ -36,6 +43,8 @@ Tool config options with defaults:
quality {
checkstyleVersion = '{{ gradle.checkstyle }}'
checkstyle = true // false to disable automatic plugin activation
// true for java 8-10 by default, set to false to disable fallback to backport
checkstyleBackport = !JavaVersion.current().java11Compatible
}
```

Expand Down
8 changes: 8 additions & 0 deletions src/doc/docs/tool/codenarc.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

By default, plugin activates if groovy sources available (`src/main/groovy`).

!!! warning
Since codenarc 3.1 there is a separate jar for groovy4 (codenarc-groovy4) and
plugin use it by default. If you need to use lower codenarc version set
`quality.codenarcGroovy4 = false` in order to switch to usual codenarc jar (groovy 3 based).
Note that it does not relate to your project's groovy version - codenarc will use its own
groovy version.

## Output

Expand All @@ -33,6 +39,8 @@ Tool config options with defaults:
quality {
codenarcVersion = '{{ gradle.codenarc }}'
codenarc = true // false to disable automatic plugin activation
// use groovy4-based codenarc version; set to false to use groovy3-based version
codenarcGroovy4 = true
}
```

Expand Down

0 comments on commit b096a6a

Please sign in to comment.