There are many commits where people are trying to appease portlint
without actually trying to understand what the problem was or why
it raises them. Mostly things are shuffled around until portlint
no longer complains (or so it appears) and it causes lots of churn
in the repository with little improvement in ports. Can portlint be more
For example, when portlint says
WARN: Makefile: "USES" has to appear earlier.
it should point people to
Maybe there could be error codes and a --explain flag like what
rustc has to give a more verbose description of the problem.
> Maybe there could be error codes and a --explain flag like what
> rustc has to give a more verbose description of the problem.
E.g. `rustc --explain E0001` will print the text from
to stdout etc.
+1 on per rule error codes. Have thought about this many times when thinking about ways to improve portlint (like a proper lexer/parser for bmake/Makefiles implementation)
I think a decent place for this would be the wiki, where we could then refer onto the handbook for specific cases or further information, if necessary.
Alternatively a data file that comes with portlint, to keep the explanations/prose away from the rule detection code, and make updating that content easier for contributors
Pointing back to the Porter's Handbook makes a lot of sense. Having another level of mapping may get cumbersome (but I understand the ask/outcome). In the meantime, if there are obvious outstanding instances of this (like USES) can you please submit patches, and I'll fold them in. Go ahead and use this PR.
Closing this as linting tools like portlint will always be misunderstood and
abused no matter how much you handhold users. In the end it is probably not
worth spending any time on.