schorfES / grunt-lintspaces

A Grunt task for checking spaces in files.
https://npmjs.com/package/grunt-lintspaces
MIT License
31 stars 9 forks source link

Linting is very slow #30

Closed dominikwilkowski closed 9 years ago

dominikwilkowski commented 9 years ago

Hey there,

I've been using this plugin in all my projects and never had issues until now. I don't know why yet but it now takes almost a minute to lint 6 files:

Running "lintspaces:all" (lintspaces) task
Verifying property lintspaces.all exists in config...OK
Files: 1.0.0/js/module-1.js, 1.0.0/less/module-mixins.less, 1.0.0/less/settings.less, 1.0.0/html/footer.html, 1.0.0/html/header.html, 1.0.0/html/source.html
Options: showCodes=false, showTypes=false, showValid=false, editorconfig="../.editorconfig", ignores=["js-comments","c-comments","java-comments","as-comments","xml-comments","html-comments","python-comments","ruby-comments","applescript-comments"]
>> 6 lint free.

Each of those files don't have more than 35 lines of code in them.

No minified code either so lines never exceed more than 160 characters per line (as per our style-guide) ...

And this is the .editorconfig

# editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false

Any idea?

schorfES commented 9 years ago

Hi, which version of grunt-lintspaces are you using? Did you add/load other grunt plugins to your grund file?

dominikwilkowski commented 9 years ago

hey Version: "grunt-lintspaces": "^0.6.2", Lots of other grunt tasks but they are all waiting for lintspaces before they run ;)

dominikwilkowski commented 9 years ago

I just updated to 0.6.3 and ran it again. Might now only take 50sec but that still feels too long :)

schorfES commented 9 years ago

Its too long. Can you set up a clean Gruntfile.js with only the load and configuration of lintspaces and test again? I run that task against more than 100 files and didn't noticed problems like that.

dominikwilkowski commented 9 years ago

mh well I did and I also restarted my computer... Can't replicate it now anymore... Will reopen this if I find this again and get you a more reduced case. :)