Patch from Rick Giles
This commit is contained in:
parent
b368f9b91f
commit
87c1f4ffb6
|
|
@ -18,7 +18,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.api.DetailAST;
|
||||
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
||||
|
||||
/**
|
||||
|
|
@ -31,13 +30,13 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
|||
*
|
||||
* @author Oliver Burn
|
||||
*/
|
||||
public class ParameterFormatCheck
|
||||
public class ParameterNameCheck
|
||||
extends AbstractNameCheck
|
||||
{
|
||||
/**
|
||||
* Creates a new <code>ParameterFormatCheck</code> instance.
|
||||
* Creates a new <code>ParameterNameCheck</code> instance.
|
||||
*/
|
||||
public ParameterFormatCheck()
|
||||
public ParameterNameCheck()
|
||||
{
|
||||
super("^[a-z][a-zA-Z0-9]*$");
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.api.DetailAST;
|
||||
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.ParameterFormatCheck;
|
||||
import com.puppycrawl.tools.checkstyle.checks.ParameterNameCheck;
|
||||
|
||||
public class ParameterFormatCheckTest
|
||||
public class ParameterNameCheckTest
|
||||
extends BaseCheckTestCase
|
||||
{
|
||||
public ParameterFormatCheckTest(String aName)
|
||||
public ParameterNameCheckTest(String aName)
|
||||
{
|
||||
super(aName);
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ public class ParameterFormatCheckTest
|
|||
throws Exception
|
||||
{
|
||||
final CheckConfiguration checkConfig = new CheckConfiguration();
|
||||
checkConfig.setClassname(ParameterFormatCheck.class.getName());
|
||||
checkConfig.setClassname(ParameterNameCheck.class.getName());
|
||||
checkConfig.addProperty("format", "^a[A-Z][a-zA-Z0-9]*$");
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimple.java");
|
||||
|
|
@ -30,7 +30,7 @@ public class ParameterFormatCheckTest
|
|||
throws Exception
|
||||
{
|
||||
final CheckConfiguration checkConfig = new CheckConfiguration();
|
||||
checkConfig.setClassname(ParameterFormatCheck.class.getName());
|
||||
checkConfig.setClassname(ParameterNameCheck.class.getName());
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimple.java");
|
||||
final String[] expected = {
|
||||
Loading…
Reference in New Issue