mrtazz / checkmake

experimental linter/analyzer for Makefiles
MIT License
1.02k stars 44 forks source link

False positive .PHONY violation on variables #61

Open dgeorge83616 opened 2 years ago

dgeorge83616 commented 2 years ago

https://github.com/mrtazz/checkmake/blob/ca982aef0af387413edc4b515880bef071730dea/parser/parser.go#L48-L49

Those regex definitions don't recognize VAR=blah or VAR:=blahand flag such lines as needing.PHONY`.

    1 ifeq ($(OS), Windows_NT)
>>  2 MKDIR:=$(shell which mkdir.exe)
    3 else
~   4 MKDIR := mkdir
    5 endif