An open API service indexing awesome lists of open source software.

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

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