#166 Adjust outdated make command pattern
as with #147 a new unset command part is introduced. Also add a regression e2e test that would have caught this issue.
This commit is contained in:
@ -22,7 +22,7 @@ class InvalidMakefileException extends Exception {}
|
||||
class SimpleMakefile {
|
||||
|
||||
// This pattern validates if a command is a make command.
|
||||
private static final Pattern isMakeCommand = Pattern.compile("^make(?:\\s+(?<startRule>\\w*))?(?<assignments>(?:.*?=.*?)+)?$");
|
||||
private static final Pattern isMakeCommand = Pattern.compile("^(?:.* && )?make(?:\\s+(?<startRule>\\w*))?(?<assignments>(?:.*?=.*?)+)?(?: && .*)?$");
|
||||
|
||||
// This pattern identifies the rules in a makefile.
|
||||
private static final Pattern makeRules = Pattern.compile("(?<name>.*):\\r?\\n(?<commands>(?:\\t.+\\r?\\n?)*)");
|
||||
|
Reference in New Issue
Block a user