https://github.com/born2snipe/spring-mvc-checkstyle-rules
Checkstyle rules specific to Spring MVC
https://github.com/born2snipe/spring-mvc-checkstyle-rules
Last synced: 11 months ago
JSON representation
Checkstyle rules specific to Spring MVC
- Host: GitHub
- URL: https://github.com/born2snipe/spring-mvc-checkstyle-rules
- Owner: born2snipe
- License: other
- Created: 2015-12-11T00:44:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T03:26:36.000Z (over 10 years ago)
- Last Synced: 2025-05-15T17:50:55.376Z (about 1 year ago)
- Language: Java
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Spring MVC Checkstyle Rules
## Rules Available
- `AlwaysRequireRequestParamWithAValueCheck` : this enforces when you define a `@RequestParam` annotation on a controller method you MUST provide a non-blank value/name
- `AlwaysRequirePathVariablesWithAValueCheck` : this enforces when you define a `@PathVariable` annotation on a controller method you MUST provide a non-blank value
**Note: all the above rules provide a property `additionalMessageOnViolation` that will allow you to provide a message that gives a better reason of why YOU require this rule and the said message will be displayed when the rule fails.**
## FAQ
- **How do I use these custom rules in my checkstyle configuration file?**
- See one of the configuration files [here][1]
- **How do I integrate these custom rules into maven?**
```
org.apache.maven.plugins
maven-checkstyle-plugin
2.17
com.github.born2snipe
spring-mvc-checkstyle-rules
${latest.version}
```
[1]: https://github.com/born2snipe/spring-mvc-checkstyle-rules/blob/master/src/test/resources/config/spring/mvc