loeffel-io / ls-lint

An extremely fast directory and filename linter - Bring some structure to your project filesystem
https://ls-lint.org
MIT License
1.74k stars 32 forks source link

--config option does not work under Windows #204

Open countzero opened 8 months ago

countzero commented 8 months ago

Referencing a valid .ls-lint.yml results in an error:

ls-lint --config '../../.ls-lint.yml'

2024/03/14 11:56:55 open '../../.ls-lint.yml': The system cannot find the file specified.

The only workaround is executing the ls-lint command in the same directory where the .ls-lint.yml resides and using the -workdir option to reference the target 😉

loeffel-io commented 8 months ago

For now its not intended to go "backwards" from the workdir - therefore the workdir option exists

countzero commented 8 months ago

@loeffel-io That is not my problem. The defect is, that the behaviour of the --config option is not cross-platform compatible.

In a Unix system ls-lint --config '../.ls-lint.yml' correctly resolves a configuration file in a parent directory. This fails in Windows.

Our use-case is to globally enforce one specific configuration in a npm workspaces monorepository project context.