fix minor lint

Add linting to test targets in Makefile
Fix items found by linter:
 - variables redeclared
 - missing semicolon
 - missing newline