Added java rule

This commit is contained in:
Cami Diez
2015-05-27 15:31:16 +08:00
parent 718cadb85a
commit b1da6a883a
3 changed files with 31 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# Fixes common java command mistake
#
# Example:
# > java foo.java
# Error: Could not find or load main class foo.java
#
def match(command, settings):
return (command.script.startswith ('java ')
and command.script.endswith ('.java'))
def get_new_command(command, settings):
return command.script[:-5]