Skip to content

Commit

Permalink
new version 0.3.2
Browse files Browse the repository at this point in the history
added parameter allowedMethodAnnotations to xml too
new default values:
  parameters: @nonnull, @nullable, @SuppressWarnings
  method return: @CheckReturnValue, @checkfornull, @OverRide
added info to put plugin in dropin directory instead of plugin
  • Loading branch information
Jan Burkhardt committed Oct 13, 2009
1 parent 16eef53 commit 26b8c6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ to develop just import project to eclipse with default settings
to build the jar type
ant

to use copy JSR305Checkstyle-x.x.x.jar into your eclipse plugins directory or add it as compile lib to the classpath of the checkstyle task.
to use copy JSR305Checkstyle-x.x.x.jar into your eclipse dropins directory or add it as compile lib to the classpath of the checkstyle task.

add this to your checkstyle.xml
<module name="Jsr305Annotations">
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="JSR305CheckstylePlugin" default="jar" basedir=".">

<property name="version" value="0.3.1" />
<property name="version" value="0.3.2" />
<property name="src" value="src" />
<property name="build" value="build" />
<property name="classes" value="${build}/classes" />
Expand Down
8 changes: 4 additions & 4 deletions src/de/bjrke/checkstyle/jsr305/Jsr305Annotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class Jsr305Annotations extends Check {

private String[] _packages = new String[0];
private String[] _excludePackages = new String[0];
private String[] _allowedAnnotations = { "Nullable", "CheckForNull", "Nonnull" };
private String[] _allowedMethodAnnotations = { "CheckForNull", "Nonnull", "CheckReturnValue" };
private String[] _allowedAnnotations = { "Nonnull", "Nullable", "SuppressWarnings" };
private String[] _allowedMethodAnnotations = { "CheckReturnValue", "CheckForNull", "Override" };

private boolean _checkAnnotation;

Expand All @@ -60,8 +60,8 @@ public void setAllowedAnnotations( final String[] allowedAnnotations ) {
_allowedAnnotations = new HashSet<String>( Arrays.asList( allowedAnnotations ) ).toArray( _allowedAnnotations );
}

public void setAllowedMethodAnnotations( final String[] allowedAnnotations ) {
_allowedMethodAnnotations = new HashSet<String>( Arrays.asList( allowedAnnotations ) ).toArray( _allowedMethodAnnotations );
public void setAllowedMethodAnnotations( final String[] allowedMethodAnnotations ) {
_allowedMethodAnnotations = new HashSet<String>( Arrays.asList( allowedMethodAnnotations ) ).toArray( _allowedMethodAnnotations );
}

@Override
Expand Down
5 changes: 4 additions & 1 deletion src/de/bjrke/checkstyle/jsr305/checkstyle-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<description>Packages excluded from checking.</description>
</property-metadata>
<property-metadata name="allowedAnnotations" datatype="String">
<description>Define allowed Annotations, default is "Nullable", "CheckForNull", "Nonnull".</description>
<description>Define allowed Annotations, default is "Nonnull,Nullable,SuppressWarnings".</description>
</property-metadata>
<property-metadata name="allowedMethodAnnotations" datatype="String">
<description>Define allowed Annotations, default is "CheckReturnValue,CheckForNull,Override".</description>
</property-metadata>
</rule-metadata>
</rule-group-metadata>
Expand Down

0 comments on commit 26b8c6c

Please sign in to comment.