Make JavaScript ignore rule better #636
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Includes JSHint, JSCS, default JSCS excludeFiles, with additional
improvement with test project VSHost typing faster.
I know this must be the top priority work for you all. Must be someone working on it. I just try to contribute.
For JsHintReporter.cs, extract NotJsOrIsMinifiedOrNotExists() from ShouldIgonre(), to be use in MenuItems/JsCodeStyle.cs and JsHint.cs. I think minified js should never been JSHint/JSCS. For other default ignored js, they will still be ignore at build. But if user select them explicitly and choose to run JSHint/JSCS, we should not stop it.
For LintFileInvoker.cs, I try to stop it run on non project items. But in my debug test, I don't know why it never hit. Still commit it.
Set .jcsc.json excludeFiles to
["**/*.min.js", "**/*.debug.js", "**/*.intellisense.js", "**/*-vsdoc.js"]
.For VSHost.cs, original TypeChar will init/cleanup with every single char, I change it into init/cleanup once for a whole string, improve efficiency. And according to http://www.pinvoke.net/default.aspx/Structures/VARIANTARG.html, I change 32 into 16.
This one is not related to others, I don't know whether I should commit/sync/PR this small thing alone, or just put it with other changes like this time.