The proper way to solve an X-Y problem is to provide a solution for both X and Y.
Y: because there might be a good reason for it and you risk being condescending otherwise.
X: to steer people towards best practices and because it's probably what they wanted.
miniblog.
Related Posts
Today I learnt about yamllint: if you're using YAML, you can at least ensure you're not suffering from the 'Norway problem':
It's really satisfying fixing crashes in rust-analyzer. You can start from a panic message and dig until you've got a tiny Rust program that triggers the problem.
(It's usually an issue with incomplete source files breaking invariants.)
Go has an os.Root API that allows you to enforce all paths are subdirectories of a given root. It fixes users accessing foo/../../../etc/passwd and similar.
Seems like a really nice solution for a relatively common problem.