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

(Windows) Error: . not found #27

Closed Techassi closed 2 years ago

Techassi commented 4 years ago

When I try to execute ls-lint on my windows machine the following error gets returned: . not found. Config file is present and in my project root directory:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/node_modules

Pretty basic, wanted to test ls-lint

When I try to execute ls-lint in a directory without a config, the correct error open .ls-lint.yml: The system cannot find the file specified. gets returned.

Am I missing something here? Thanks in advance!

loeffel-io commented 4 years ago

Hey @Techassi,

you installed the global npm package?

Could you please send me the full output for this commands:

dir
ls-lint

Thanks!

Techassi commented 4 years ago

No I didn't install the npm package - I downloaded the win64 binary and placed the execuable in my PATH. I think I found the underlying problem, I first used this config:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - node_modules

and then switched to:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/node_modules #note this change

Apparently ls-lint cannot handle non existent directories.

loeffel-io commented 4 years ago

Can't confirm this.

Tree: (node_modules dir not exists)

ls-lint-test tree -a
.
├── .ls-lint.yml
└── google.js

0 directories, 2 files

Configuration:

ls:
  .js: kebab-case

ignore:
  - node_modules

Works without any issues

Would love to see the output from the mentioned commands at https://github.com/loeffel-io/ls-lint/issues/27#issuecomment-662991685

Techassi commented 4 years ago

Okay strange... Here are the outputs:

dir:

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          29/04/2020    20:32                cmd
d----          19/07/2020    23:12                internal
d----          29/04/2020    20:32                public
d----          23/07/2020    00:23                templates
-a---          23/06/2020    22:55             48 .gitattributes
-a---          20/07/2020    00:58            338 .gitignore
-a---          23/07/2020    15:19            106 .ls-lint.yml
-a---          08/05/2020    19:08           2399 CONFIG.md
-a---          20/07/2020    00:56            845 config.toml
-a---          23/07/2020    01:23            961 config-custom.toml
-a---          23/07/2020    15:33           1002 go.mod
-a---          23/07/2020    15:33          23389 go.sum
-a---          19/01/2020    17:38          18092 LICENSE
-a---          29/04/2020    22:54             98 main.go
-a---          23/07/2020    01:29           3090 README.md

ls-lint: Nothing at all

loeffel-io commented 4 years ago

Do you used config 1 or 2 for this outputs?

ls-lint: Nothing at all

Nothing at all - this means everything works fine (exit 0) 👍

Techassi commented 4 years ago

Do you used config 1 or 2 for this outputs?

Config 1: 2020/07/23 16:04:59 . not found Config 2: Nothing (yes it works)

loeffel-io commented 4 years ago

Thank you very much! ❤️

Could you please send me the tree for the public and public/js directories?

Techassi commented 4 years ago

public:

.
├── assets
│   ├── blank_cursor.png
│   ├── fallback
│   ├── favicon
│   ├── favicon.ico
│   ├── fonts
│   ├── illustrations
│   ├── logo.svg
│   └── speed
├── js
│   ├── README.md
│   ├── dist
│   ├── node_modules
│   ├── package.json
│   ├── src
│   ├── webpack.common.js
│   ├── webpack.dev.js
│   ├── webpack.prod.js
│   └── yarn.lock
└── scss
    ├── _base.scss
    ├── _browse.scss
    ├── _detail.scss
    ├── _fonts.scss
    ├── _home.scss
    ├── app.min.css
    ├── app.scss
    ├── atoms
    ├── mediacard
    ├── partials
    └── util

public/js:

.
├── README.md
├── dist
│   ├── app.min.js
│   ├── app.min.js.map
│   ├── hls.bundle.js
│   ├── hls.bundle.js.map
│   ├── hls.min.js
│   └── hls.min.js.map
├── node_modules (Contents omitted, a whole lot of packages)
├── package.json
├── src
│   ├── app.js
│   ├── easteregg
│   ├── namespaces
│   ├── util
│   └── vendor
├── webpack.common.js
├── webpack.dev.js
├── webpack.prod.js
└── yarn.lock
loeffel-io commented 4 years ago

Strange!

Could you test this configuration:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/dist # instead of public/js/node_modules

Thank you!

Techassi commented 4 years ago

With your proposed config

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/dist # instead of public/js/node_modules

I get 2020/07/23 19:33:21 . not found

loeffel-io commented 4 years ago

Could be an path seperator issue maybe

Could you please run it one last time with this config:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js # instead of public/js/dist

Is this an open source project?

Thank you!

Techassi commented 4 years ago

Could be an path seperator issue maybe

Surely! Windows doing Windows things...

The above config works without any errors!

Is this an open source project?

Yeah kinda... But still in heavy development! (If you are interested: https://github.com/Techassi/mux) The main development is done on my own Git. After I feel confident in the code I will push the code onto GitHub.

I will stick with this config from here:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/node_modules #note this change

Thank you for your help 👍

loeffel-io commented 4 years ago

The above config works without any errors!

So public/js works? - Then it could be a hidden file or something like that 🤔

Yeah kinda... But still in heavy development! (If you are interested: https://github.com/Techassi/mux) The main development is done on my own Git. After I feel confident in the code I will push the code onto GitHub.

Nice one!

Summary:

I'm confused

(1) Error:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - node_modules

(2) No error:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/node_modules

(3) Error:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js/dist # instead of public/js/node_modules

(4) No Error:

: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js # instead of public/js/dist

Can you please confirm or correct this?

Thanks!

Techassi commented 4 years ago

So public/js works? - Then it could be a hidden file or something like that 🤔

Yeah maybe...

(1) Error - Error (2) No error - No error (3) Error - Error (4) No Error - No error, after correcting to this:

ls:
    .js: kebab-case
    .go: kebab-case

ignore:
    - .git
    - public/js # instead of public/js/dist
loeffel-io commented 4 years ago

Hey @Techassi,

thanks for that! I can't reproduce this issue for now - but i will keep that in mind - will not close the issue

FYI (4) or public/js will disable all rules inside your public/js directory

loeffel-io commented 2 years ago

closed for now - feel free to reopen