Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Feb 1, 2024
1 parent 9bdedbf commit ddd573b
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### 5.0.0 (2024-02-01)
* (BREAKING) Drop gradle 5 and 6 support
* Update spotbugs plugin to 5.2.5 (#94)
- Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore
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-2022 Vyacheslav Rusakov
Copyright (c) 2015-2024 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
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Features:
* Html and xml reports for all plugins (custom xsl used for findbugs html report because it can't generate both xml and html reports)
* Grouping tasks to run registered quality plugins for exact source set (e.g. checkQualityMain)

NOTE: the plugin is **not compatible** with the gradle [configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html)

##### Summary

* Configuration: `quality`
Expand All @@ -46,7 +48,7 @@ NOTE: when updating plugin version in your project don't forget to call `clean`

```groovy
plugins {
id 'ru.vyarus.quality' version '4.9.0'
id 'ru.vyarus.quality' version '5.0.0'
}
```

Expand All @@ -59,7 +61,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath 'ru.vyarus:gradle-quality-plugin:4.9.0'
classpath 'ru.vyarus:gradle-quality-plugin:5.0.0'
}
}
apply plugin: 'ru.vyarus.quality'
Expand All @@ -69,11 +71,12 @@ Minimal requirements: java 8, gradle 5.6

#### Compatibility

Plugin compiled for java 8, compatible with java 11
Plugin compiled for java 8, compatible with java 11 (and above)

Gradle | Version
--------|-------
5.6-8 | 4.9.0
7-8 | 5.0.0
5.6-6 | [4.9.0](https://xvik.github.io/gradle-quality-plugin/4.9.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 @@ -27,7 +27,7 @@ ext {
animalsnifferVersion = '1.7.1'
cpdVersion = '3.3'
spotbugsPluginVersion = '5.2.5'
docVersion = '4.9.0'
docVersion = '5.0.0'
}

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

Gradle | Version
--------|-------
5.6-8 | 4.9.0
7-8 | 5.0.0
5.6-6 | [4.9.0](https://xvik.github.io/gradle-quality-plugin/4.9.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
15 changes: 15 additions & 0 deletions src/doc/docs/about/history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### [5.0.0](http://xvik.github.io/gradle-quality-plugin/5.0.0) (2024-02-01)
* (BREAKING) Drop gradle 5 and 6 support
* Update spotbugs plugin to 5.2.5 (#94)
- Remove spotbugsShowStackTraces option because it's not used by spotbugs anymore
- Custom xsl file is not used for html report - native html report generation used instead
- Add spotbugs-annotations dependency automatically with compileOnly (to simplify @SuppressFBWarnings usage)
Could be disabled with quality.spotbugsAnnotations = false configuration
* Update checkstyle 10.6.0 -> 10.12.7 (gradle metadata fix applied)
- Fix links to checkstyle site (site structure changed)
* Update spotbugs 4.7.3 -> 4.8.3
* Update pmd 6.54 -> 6.55 (java 20 support)
* Update codenarc 3.2.0 -> 3.4.0
* Remove deprecated gradle apis usage
- The plugin is still NOT compatible with configuration cache

### [4.9.0](http://xvik.github.io/gradle-quality-plugin/4.9.0) (2023-02-18)
* Gradle 8 support (#77)
* Update checkstyle 10.3.1 -> 10.6.0
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-2022 Vyacheslav Rusakov
Copyright (c) 2015-2024 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
2 changes: 2 additions & 0 deletions src/doc/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* Html and xml reports for all plugins (custom xsl used for findbugs html report because it can't generate both xml and html reports)
* Grouping tasks to run registered quality plugins for exact source set (e.g. checkQualityMain)

!!! note
The plugin is **not compatible** with the gradle [configuration cache](https://docs.gradle.org/current/userguide/configuration_cache.html)

## How to use docs

Expand Down
17 changes: 9 additions & 8 deletions src/doc/docs/tool/spotbugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ it uses [efforts level](http://spotbugs.readthedocs.io/en/latest/effort.html). D
Default settings (`max` effort and `medium` level) are perfect for most cases. Some checks were disabled in the default
[filter file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/exclude.xml)

!!! note
Special [xsl file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/html-report-style.xsl)
used for manual html report generation. Spotbugs plugin can generate both xml and html reports, but
this ability is not used (for more stable and legacy-compatible behaviour).

## Output

```
Expand Down Expand Up @@ -58,11 +53,11 @@ Tool config options with defaults:
quality {
spotbugsVersion = '{{ gradle.spotbugs }}'
spotbugs = true // false to disable automatic plugin activation
spotbugsShowStackTraces = false // changes default for spotbugs.showStackTraces
spotbugsEffort = 'max' // min, less, more or max
spotbugsLevel = 'medium' // low, medium, high
spotbugsMaxRank = 20 // 1-4 scariest, 5-9 scary, 10-14 troubling, 15-20 of concern
spotbugsMaxHeapSize = '1g'
spotbugsAnnotations = true // false to not register spotbugs-annotations
}
```

Expand All @@ -81,8 +76,8 @@ quality {
To suppress violations you can use [filter file](http://spotbugs.readthedocs.io/en/latest/filter.html).
In this case you need to override [default filter file](https://github.com/xvik/gradle-quality-plugin/blob/master/src/main/resources/ru/vyarus/quality/config/spotbugs/exclude.xml).

Or you can use annotations. SpotBugs use custom annotations and so you need to add
`com.github.spotbugs:spotbugs-annotations:3.1.2` dependency (with provided scope if possible) and use:
Plugin applies `com.github.spotbugs:spotbugs-annotations:{{ gradle.spotbugs }}` dependency automatically
in `compileOnly` scope in order to use special suppressing annotation:

```java
@SuppressFBWarnings("URF_UNREAD_FIELD")
Expand All @@ -92,6 +87,12 @@ Or you can use annotations. SpotBugs use custom annotations and so you need to a
Spotbugs can't use default `@SuppressWarnings` annotation because it's a source annotation
and not available in bytecode.

!!! note
To disable automatic annotations dependency applying:
```java
quality.spotbugsAnnotations = false
```

## Excludes

Spotbugs is the only quality tool which works on classes rather than on sources. By default,
Expand Down
2 changes: 1 addition & 1 deletion src/doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repo_url: http://github.com/xvik/gradle-quality-plugin
edit_uri: edit/master/src/doc/docs/

#Copyright (shown at the footer)
copyright: 'Copyright © 2015-2021 Vyacheslav Rusakov'
copyright: 'Copyright © 2015-2024 Vyacheslav Rusakov'

plugins:
- search
Expand Down

0 comments on commit ddd573b

Please sign in to comment.