Issue #1555: Narrow scope of variable
Fixes `TooBroadScope` inspection violations introduced in recent commits. Description: >Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
This commit is contained in:
parent
2085758156
commit
dd7935491a
|
|
@ -163,9 +163,9 @@ public class NewlineAtEndOfFileCheckTest
|
|||
@Test
|
||||
public void testWrongFile() throws Exception {
|
||||
final DefaultConfiguration checkConfig = createCheckConfig(NewlineAtEndOfFileCheck.class);
|
||||
File impossibleFile = new File("");
|
||||
NewlineAtEndOfFileCheck check = new NewlineAtEndOfFileCheck();
|
||||
check.configure(checkConfig);
|
||||
File impossibleFile = new File("");
|
||||
Set<LocalizedMessage> messages = check.process(impossibleFile, Lists.newArrayList("txt"));
|
||||
assertTrue(messages.size() == 1);
|
||||
Iterator<LocalizedMessage> iter = messages.iterator();
|
||||
|
|
|
|||
Loading…
Reference in New Issue