-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi!
I think I found a bug in this plugin. This test (I added it to LuaAstScannerTest)
@Test
public void noReturn() {
SourceFile file = LuaAstScanner.scanSingleFile(new File("src/test/resources/bugs/noreturn.lua"));
assertThat(file.getInt(LuaMetric.LINES)).isEqualTo(7);
}
executed with this Lua file:
function doNothing()
end
function noReturn()
doNothing()
end
fails with this console output about a parse error:
[main] ERROR org.sonar.squidbridge.AstScanner - Parse error at line 7 column 1:
1: function doNothing()
2: end
3:
4: function noReturn()
5: doNothing()
6: end
7:
^
It is sufficient to add a return to function noReturn() and the test will succeed:
function doNothing()
end
function noReturn()
return doNothing()
end
Regards,
Juergen
Metadata
Metadata
Assignees
Labels
No labels