checkmake icon indicating copy to clipboard operation
checkmake copied to clipboard

Feature: Encourage stricter filename conventions

Open mcandre opened this issue 1 year ago • 2 comments

In order to more quickly distinguish between bmake and gmake files, we could create a new linter rule that warns on ambiguous files.

Basically, Makefile is ambiguous. This can lead to both text editors and humans assuming the wrong syntax. Any Makefile's can be disambiguated by adopting the fully lowercase makefile (bmake) or else GNUmakefile (gmake).

mcandre avatar Mar 21 '23 04:03 mcandre

On second thought, there is value in encouraging the POSIX Makefile name. Projects that do not depend on extensions to the POSIX make standard, should follow the Makefile name.

A rule to the effect of checkbashisms would be helpful. When GNU-isms or BSD-isms are present, recommend the relevant filename. Otherwise, recommend the generic Makefile.

mcandre avatar Mar 21 '23 05:03 mcandre

One thing to consider here is how some build systems will automatically generate Makefiles with the Makefile name regardless of what sort of syntax they contain. It isn't really as easy to rename the files in such cases.

cooljeanius avatar Nov 15 '23 22:11 cooljeanius