You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.PHONY: update_my_stuff
update_my_stuffv:
.PHONY: all
all:
.PHONY: clean
clean:
.PHONY: test
test:
fails with
timestampexpanded Variable "PHONY" possibly 2
contains a timestamp and
should be simply expanded.
Actual behaviour
It should work.
The problem is that 'update' contains the word 'date', as in #38 and as fixed in #39. Notably, if you replace update_my_stuff by upda_te_my_stuff It works
Output of checkmake --version
checkmake 0.1.0-39-g1383019 built at 2020-10-27T22:53:40Z by <> with go version go1.15.3 linux/amd64
Output of checkmake --debug <your makefile>
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line 'update_my_stuffv:' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to parse config file "checkmake.ini", running with defaults
2022/01/19 11:28:22 Running rule 'maxbodylength'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'minphony'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'phonydeclared'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'timestampexpanded'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 iniFile not initialized
RULE DESCRIPTION LINE NUMBER
timestampexpanded Variable "PHONY" possibly 2
contains a timestamp and
should be simply expanded.
Output of make --version
I am in Docker so not sure it makes sense
Sample Makefile to reproduce issue
.PHONY: update_my_stuff
update_my_stuffv:
.PHONY: all
all:
.PHONY: clean
clean:
.PHONY: test
test:
The text was updated successfully, but these errors were encountered:
ah I can see this happening. Thanks for reporting. I think in addition to making the matching a bit better we should probably also never treat .PHONY as a variable name anyways.
I was implementing a new rule for matching trailing whitespace after variables, and found that PHONY was being treated as a variable which was messing with how I was trying to match trailing comment patterns. So, I ended up refactoring the parser a bit. I noticed there are still some bugs with LineNumber being set off by 1 in some instances... Not sure why that is, and it's getting late so my brain's too tired to figure it out now.
Expected behaviour
Makefile
fails with
Actual behaviour
It should work.
The problem is that 'update' contains the word 'date', as in #38 and as fixed in #39. Notably, if you replace
update_my_stuff
byupda_te_my_stuff
It worksOutput of
checkmake --version
checkmake 0.1.0-39-g1383019 built at 2020-10-27T22:53:40Z by <> with go version go1.15.3 linux/amd64
Output of
checkmake --debug <your makefile>
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line 'update_my_stuffv:' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to match line '' to a Rule or Variable
2022/01/19 11:28:22 Unable to parse config file "checkmake.ini", running with defaults
2022/01/19 11:28:22 Running rule 'maxbodylength'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'minphony'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'phonydeclared'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 Running rule 'timestampexpanded'...
2022/01/19 11:28:22 iniFile not initialized
2022/01/19 11:28:22 iniFile not initialized
timestampexpanded Variable "PHONY" possibly 2
contains a timestamp and
should be simply expanded.
Output of
make --version
I am in Docker so not sure it makes sense
Sample Makefile to reproduce issue
The text was updated successfully, but these errors were encountered: