Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems excluding files via .ecrc on Windows #46

Closed
jenssimon opened this issue Feb 28, 2019 · 9 comments
Closed

Problems excluding files via .ecrc on Windows #46

jenssimon opened this issue Feb 28, 2019 · 9 comments
Labels
bug a bug which occured help wanted

Comments

@jenssimon
Copy link

I upgraded from 1.4.0 release to 2.0.1 of https://github.com/editorconfig-checker/editorconfig-checker.javascript.

Using the old version I used a bunch of --exclude-pattern parameters. These exclusions I moved to a .ecrc file:

\.js$
\.jsx$
\.css$
\.scss$
\.less$
^dir1\/
^dir2\/
^dir3\/subdir1\/
^dir3\/subdir2\/

This works on Mac but on Windows it seems that the config file is completely ignored. I also tried to test for / or \, with optional prepending ./ and without ^. But everything I tried without success.

@mstruebing
Copy link
Member

Hey thanks for reporting this.
Sadly I don't have a Windows PC right here.

Could you try to run it with the verbose flag and give me the first line? It should start with: Exclude Regexp:

@mstruebing mstruebing added bug a bug which occured help wanted labels Feb 28, 2019
@mstruebing
Copy link
Member

Ah btw, does it work if you use the exclude parameter? Something like 'ec --exclude '.js$|.jsx$'?

@jenssimon
Copy link
Author

I already tried this as I did it before on the Mac (which exactly showed that information). Unfortunatly this line doesn't get displayed and also the default exclusions won't show up on the Windows machine. Output starts with Editorconfig errors.

I also have limited access to a Windows PC. But will try soon.

@mstruebing
Copy link
Member

Would be great :)
Maybe you have some skills in go or can quickly get them (it's really a simple language) and provide a fix for this, this would be really great.

@jenssimon
Copy link
Author

Not tested on the same machine but tested in a VM (Windows 10, 10.0.17134).
Exclude Regexp looks good and works as expected after renaming node_modules/editorconfig-checker/bin/ec-windows-amd64 to node_modules/editorconfig-checker/bin/ec-windows-amd64.exe.

I'll test on the machine where this behaviour ocurred tomorrow but will create a separate ticket for the naming issue.

@jenssimon
Copy link
Author

With editorconfig-checker/editorconfig-checker.javascript#53 solved I hope this problem also has gone.

I'll check on my colleagues machine (where this problem occured) on Monday.

@mstruebing
Copy link
Member

Thank you, feel free to close the issue if it didn't occur anymore. 👍

@jenssimon
Copy link
Author

Checked again using editorconfig-checker/editorconfig-checker.javascript v2.0.5. Now works on my colleagues machine.

@mstruebing
Copy link
Member

Great, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug which occured help wanted
Projects
None yet
Development

No branches or pull requests

2 participants