Created
October 28, 2014 12:20
-
-
Save platan/d4467251570f792d5daf to your computer and use it in GitHub Desktop.
Two Checkstyle Checks finds Spring @component and @Autowired and suggets using JSR-330 @nAmed and @Inject.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE module PUBLIC | |
"-//Puppy Crawl//DTD Check Configuration 1.2//EN" | |
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
<module name="Checker"> | |
<module name="RegexpMultiline"> | |
<property name="format" value="@Component( |\n|\r|\r\n)"/> | |
<property name="message" value="JSR-330 @Named should be used instead of Spring @Component. "/> | |
<property name="fileExtensions" value="java"/> | |
</module> | |
<module name="RegexpMultiline"> | |
<property name="format" value="@Autowired( |\n|\r|\r\n)"/> | |
<property name="message" value="JSR-330 @Inject should be used instead of Spring @Autowired. "/> | |
<property name="fileExtensions" value="java"/> | |
</module> | |
</module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment