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

Check files that are ignored by default #59

Closed
ericcornelissen opened this issue Apr 17, 2019 · 4 comments
Closed

Check files that are ignored by default #59

ericcornelissen opened this issue Apr 17, 2019 · 4 comments

Comments

@ericcornelissen
Copy link

For this project I want to check SVG files. However *.svg is in the exclude string by default and I did not manage to negate this. Any suggestions?

@mstruebing
Copy link
Member

Is your *.svg added to your git repository? (This tool only check files tracked by git)
If so you can disable the default excludes by the i|ignore-flag like this:
ec -i or ec --ignore.

Remember that you need to add the default excludes to your .ecrc-file for filetypes you want to exclude.

Does this help?
If not, feel free to reopen the issue.

@ericcornelissen
Copy link
Author

It does, thanks. However, I tried that before and only now do I realize why I thought it didn't work: I'm trying to ensure that *.svg does not have a final newline but it seems this checker won't report an error when insert_final_newline=false but the file does have a final newline.

From the EditorConfig website (see quote ⬇️) I would expect it does 🤔 Thoughts?

insert_final_newline: set to "true" to ensure file ends with a newline when saving and "false" to ensure it doesn't.

@mstruebing
Copy link
Member

mstruebing commented Apr 17, 2019

Ah good point.
Actually I've thought it wouldn't matter if insert_final_newline is set to false or not set at all.
I think I will implement that soonish but this will result in a major version bumb.

Thanks for pointing at the wrong behaviour.

(BTW, in case you don't know if your file was added to be checked you can use this tool with the -v or --verbose)

@ericcornelissen
Copy link
Author

Ah good point.
Actually I've thought it wouldn't matter if insert_final_newline is set to false or not set at all.
I think I will implement that soonish but this will result in a major version bumb.

Okay, thanks for the update 😄

(BTW, in case you don't know if your file was added to be checked you can use this tool with the -v or --verbose)

I found that out with my second comment, thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants