Blank makefile lines should be ignored before emitting warnings to logs.
Also, a specific line number would be helpful for identifying any actual problematic makefile lines.
Actual behaviour
$ checkmake --debug Makefile
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Running rule 'maxbodylength'...
2023/03/20 22:05:22 Running rule 'minphony'...
2023/03/20 22:05:22 Running rule 'phonydeclared'...
2023/03/20 22:05:22 Running rule 'timestampexpanded'...
RULE DESCRIPTION LINE NUMBER
minphony Missing required phony target 1
"test"
Output of checkmake --version
checkmake built at 2022-12-11T14:02:56Z by Homebrew homebrew@brew.sh with go version go1.19.4 darwin/arm64
Output of checkmake --debug <your makefile>
$ checkmake --debug Makefile
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Unable to match line '' to a Rule or Variable
2023/03/20 22:05:22 Running rule 'maxbodylength'...
2023/03/20 22:05:22 Running rule 'minphony'...
2023/03/20 22:05:22 Running rule 'phonydeclared'...
2023/03/20 22:05:22 Running rule 'timestampexpanded'...
RULE DESCRIPTION LINE NUMBER
minphony Missing required phony target 1
"test"
Output of make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Expected behaviour
Blank makefile lines should be ignored before emitting warnings to logs.
Also, a specific line number would be helpful for identifying any actual problematic makefile lines.
Actual behaviour
Output of
checkmake --version
checkmake built at 2022-12-11T14:02:56Z by Homebrew homebrew@brew.sh with go version go1.19.4 darwin/arm64
Output of
checkmake --debug <your makefile>
Output of
make --version
GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Sample Makefile to reproduce issue