This is a bug that is related to the regex on Line 55 of parser.ts. The extension fails to recognize build targets in the Makefile that are a single character long (such as "A:").
I believe that this regex should be changed from "^(?!\\n?[#\\.])(?<!^\\n?# Not a target:\\s*)\\s*(\\S+[^:]):\\s+" to "^(?!\\n?[#\\.])(?<!^\\n?# Not a target:\\s*)\\s*(\\S*[^:]):\\s+".
This regex is checking for a group of characters that ends in a single ':' character. The usage of (\\S+[^:]) fails on single character build target cases such as "A:" because the + consumes the first character and causes the [^:] condition to fail. Changing the + to a * remedies this issue while preserving the intended behavior of this line.
This is a bug that is related to the regex on Line 55 of parser.ts. The extension fails to recognize build targets in the Makefile that are a single character long (such as "A:").
I believe that this regex should be changed from
"^(?!\\n?[#\\.])(?<!^\\n?# Not a target:\\s*)\\s*(\\S+[^:]):\\s+"
to"^(?!\\n?[#\\.])(?<!^\\n?# Not a target:\\s*)\\s*(\\S*[^:]):\\s+"
.This regex is checking for a group of characters that ends in a single ':' character. The usage of
(\\S+[^:])
fails on single character build target cases such as "A:" because the+
consumes the first character and causes the[^:]
condition to fail. Changing the+
to a*
remedies this issue while preserving the intended behavior of this line.