checkmake icon indicating copy to clipboard operation
checkmake copied to clipboard

Request: support recursive lookup of checkmake.ini

Open Integralist opened this issue 1 year ago • 2 comments

Expected behaviour

I was hoping the checkmake tool would recursively check for checkmake.ini

e.g. if the current directory (containing a Makefile) has a checkmake.ini then that is used, but if not, move to the parent directory and check for checkmake.ini there, and so on until you reach the user's home directory where most people have configuration files.

Also, the ability to specify a location like ~/.config/checkmate.ini would be cool

Actual behaviour

It only checks the current directory.

Output of checkmake --version

checkmake 0.2.1 built at 2022-10-11T09:52:39Z by Integralist <[email protected]> with go version go1.18.5 darwin/arm64

Output of checkmake --debug <your makefile>

N/A

Output of make --version

N/A

Sample Makefile to reproduce issue

N/A

Integralist avatar Jul 10 '24 05:07 Integralist

Thanks for opening an issue. You can absolutely specify the location of a config file when executing checkmake (see https://github.com/mrtazz/checkmake?tab=readme-ov-file#usage).

For the automatic lookup I'll have to think about it. I've often found it confusing when tools do this because it's a set of implicit assumptions that aren't necessarily clear and make debugging harder. Maybe if there is a way to ask which config file is used that would make it better. I'll think about.

mrtazz avatar Jul 10 '24 06:07 mrtazz

See PR #104 for a ~/checkmake.ini fallback

rurban avatar Aug 23 '24 10:08 rurban

Given that the config file does not need to be named checkmake.iniand the default can be overridden with the --config comand line option, I would consider this request obsolete and suggest we close it.

@Integralist - WDYT?

obnoxxx avatar Jun 23 '25 13:06 obnoxxx