Issue #1288: 'LocalVariableNameCheck' refactored, UT coverage improved
This commit is contained in:
parent
14d6d3aa31
commit
67857bbdce
1
pom.xml
1
pom.xml
|
|
@ -873,7 +873,6 @@
|
|||
<regex><pattern>.*.checks.naming.AbstractTypeParameterNameCheck</pattern><branchRate>75</branchRate><lineRate>81</lineRate></regex>
|
||||
<regex><pattern>.*.checks.naming.ConstantNameCheck</pattern><branchRate>88</branchRate><lineRate>92</lineRate></regex>
|
||||
<regex><pattern>.*.checks.naming.LocalFinalVariableNameCheck</pattern><branchRate>87</branchRate><lineRate>85</lineRate></regex>
|
||||
<regex><pattern>.*.checks.naming.LocalVariableNameCheck</pattern><branchRate>94</branchRate><lineRate>100</lineRate></regex>
|
||||
|
||||
<regex><pattern>.*.checks.regexp.CommentSuppressor</pattern><branchRate>75</branchRate><lineRate>100</lineRate></regex>
|
||||
<regex><pattern>.*.checks.regexp.DetectorOptions</pattern><branchRate>100</branchRate><lineRate>96</lineRate></regex>
|
||||
|
|
|
|||
|
|
@ -115,8 +115,7 @@ public class LocalVariableNameCheck
|
|||
}
|
||||
final DetailAST modifiersAST =
|
||||
ast.findFirstToken(TokenTypes.MODIFIERS);
|
||||
final boolean isFinal = modifiersAST != null
|
||||
&& modifiersAST.branchContains(TokenTypes.FINAL);
|
||||
final boolean isFinal = modifiersAST.branchContains(TokenTypes.FINAL);
|
||||
return !isFinal && ScopeUtils.isLocalVariableDef(ast);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue