Commit 2022e5b
committed
Implement new rule S8908 - @CacheResult methods
This rule detects methods annotated with @CacheResult that return void.
Since void methods have no return value to cache, applying @CacheResult
to them is meaningless and indicates a misunderstanding of how caching works.1 parent 72ebc0c commit 2022e5b
12 files changed
Lines changed: 731 additions & 129 deletions
File tree
- its/autoscan/src/test
- java/org/sonar/java/it
- resources/autoscan
- diffs
- java-checks-test-sources/default/src/main
- files/non-compiling/checks
- java
- checks
- io/quarkus/cache
- java-checks/src
- main/java/org/sonar/java/checks
- test/java/org/sonar/java/checks
- sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
0 commit comments