Closed etki closed 10 years ago
You can run code-sniffer in verbose mode (-v) to find what file is causing this. You probably will want to ignore that/those file/s. (minified js and css files will probably cause you problems) Or maybe you want to use another coding standard that does not sniff js and css files. Hope this helps ;)
@hugofonseca i'm doing this just for fun, i want to see the flaming seas of WP coding errors that CS will output once it has finished analyzing WP, and i'm reporting this because this is certainly unwanted behavior.
Well, if this problem is related with minified files then this is a known problem. But I'm trying to replicate this right now to see what I get.
I don't know how you did it. It got stuck in "tinymce.min.js" file here :P
Got it, that's minified js, as expected: wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js
The first script i launched was hanging for four hours lol (didn't turn on verbose, can't say if it hanged or something), WP is quite a beast i'd say. Even when i forgot to omit my vendor folder in one build, whole build including phpcs has finished in under ten minutes.
@hugofonseca can you explain that minified file checking problem you've mentioned in https://github.com/squizlabs/PHP_CodeSniffer/issues/252#issuecomment-55115368 ?
Sure @aik099 , this is a known issue of CodeSniffer. There is already an issue in PEAR issue tracker http://pear.php.net/bugs/bug.php?id=19899 It get stuck every time I check on minified css or js files. At the time I created the issue I would know better what was going on. I tryied to fix it (the wrong way) with https://github.com/squizlabs/PHP_CodeSniffer/pull/153. In that PR you can find more info, ;)
BTW I think that PHP_Metrics (https://github.com/Halleck45/PhpMetrics) may have a solution/workaround for this. I never tried it though .
When I checked WordPress, which I do weekly to generate the coding convention reports, I only check .inc
and .php
files under wp-admin
and I use --ignore=*/tests/,*/includes/class-ftp*,*/class-pclzip.php
. This doesn't generate any errors for me.
@etki It's probably best to check WordPress with the WordPress coding standard rather than the default PEAR standard if you want to see how many errors there are. You'll need to find their standard first. And yes, minified JS files tend to cause problems with the JS tokenizer.
@hugofonseca I imagine PHP_Metrics gets around this by only checking PHP files, which you can do with PHP_CodeSniffer by specifying the extensions. By default, PHP_Metrics checks .php and .inc, so just add --extensions=php,inc
to the phpcs command to do the same.
I don't think there is anything to really be done here. If I've missed something, please let me know. Otherwise I'll close the issue with the resolution being to exclude files that can't and/or shouldn't be checked, which can also be hard-coded into a project's ruleset.xml file.
@gsherwood I guess I was not clear again:)
What I mean to say is that PHP_Metrics uses a way of avoiding memory problems that I find interesting.
you can find its context here.
It gets the size of the file and if above some limit it reads the file line by line with stream_get_line.
Now, I doubt that this would solve anything but it seams to me that some workaround could be made to detect this minified files.
Maybe we can check the line size and put there a limit?
Maybe we should split every file into lines and then do the parsing?
I really don't know if this is a good idea or if it's just me being dumb ;p
PHP_Metrics code:
public function tokenize($filename) {
$size = filesize($filename);
$limit = 102400; // around 100 Ko
if ($size > $limit) {
$tokens = array();
$hwnd = fopen($filename, 'r');
while (!feof($hwnd)) {
$content = stream_get_line($hwnd, $limit);
$content .= '/* */';
$tokens = array_merge($tokens, token_get_all($content));
unset($content);
}
return new TokenCollection($tokens);
}
return new TokenCollection(token_get_all(file_get_contents($filename)));
}
While I could potentially tokenize JS line by line, I'd probably still end up getting into the same loop somewhere. I don't think the file size is typically the isse.
You're idea about checking line length is interesting. If it is extremely long, there is a very good chance it is a minified file.
But I'll take a look again and what happens when minified JS files are tokenized and see if I can find where exactly it is looping. If I can't fix that, I might try that that line length check.
I've committed a change to try and detect minified files, and other files that can't be processed, here: https://github.com/squizlabs/PHP_CodeSniffer/commit/7459a0e279df740650ca45f520207c45870b2bd8
This will be released in the next 2.x version, sometime in the next 7-10 days hopefully.
When running this new version over WordPress, I get the following files being excluded, which looks to be all the minified ones, as well as one highly complex PHP one (not part of WordPress itself):
Processing color-picker-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing color-picker.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colors.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-controls-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-controls.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-widgets-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-widgets.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing deprecated-media-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing deprecated-media.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing ie-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing ie.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing install-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing install.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing login-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing login.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-admin-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-admin.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing accordion.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing color-picker.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing comment.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing common.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing custom-background.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-controls.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-widgets.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing dashboard.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing edit-comments.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing editor-expand.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing editor.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing gallery.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing image-edit.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing inline-edit-post.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing inline-edit-tax.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing iris.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing language-chooser.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing link.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-gallery.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-upload.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing nav-menu.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing password-strength-meter.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin-install.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing post.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing postbox.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing revisions.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing set-post-thumbnail.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing svg-painter.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing tags.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing theme.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing updates.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing user-profile.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing user-suggest.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing widgets.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing word-count.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-fullscreen.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing xfn.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing html5.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing genericons.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing html5.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing genericons.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing html5.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing html5.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing admin-bar-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing admin-bar.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing buttons-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing buttons.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing dashicons.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing editor-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing editor.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery-ui-dialog-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery-ui-dialog.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-views-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-views.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-auth-check-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-auth-check.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-pointer-rtl.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-pointer.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing module.audio-video.quicktime.php [PHP => tokenizer error]... DONE in 521ms (0 errors, 2 warnings)
Processing admin-bar.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing autosave.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing backbone.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing colorpicker.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing comment-reply.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-base.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-loader.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-models.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-preview-widgets.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-preview.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing customize-views.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing heartbeat.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing hoverIntent.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.imgareaselect.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.Jcrop.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery-migrate.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.color.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.form.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.hotkeys.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.masonry.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.query.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.table-hotkeys.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.touch-punch.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing suggest.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.accordion.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.autocomplete.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.button.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.core.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.datepicker.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.dialog.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.draggable.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.droppable.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-blind.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-bounce.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-clip.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-drop.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-explode.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-fold.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-highlight.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-pulsate.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-scale.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-shake.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-slide.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect-transfer.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.effect.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.menu.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.mouse.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.position.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.progressbar.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.resizable.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.selectable.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.slider.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.sortable.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.spinner.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.tabs.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.tooltip.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing jquery.ui.widget.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing json2.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing masonry.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing mce-view.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-audiovideo.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-editor.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-grid.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-models.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing media-views.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing mediaelement-and-player.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing mediaelementplayer.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing handlers.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plupload.full.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-plupload.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing quicktags.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing shortcode.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing swfobject.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing handlers.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing plugin.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing content.inline.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing content.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing skin.ie7.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing skin.min.css [CSS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing theme.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing tinymce.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing tw-sack.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing underscore.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing utils.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-ajax-response.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-auth-check.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-backbone.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-list-revisions.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-lists.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-pointer.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wp-util.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wpdialog.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing wplink.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing zxcvbn-async.min.js [JS => tokenizer error]... DONE in 0ms (0 errors, 1 warnings)
Processing zxcvbn.min.js [JS => tokenizer error]... DONE in 1ms (0 errors, 1 warnings)
Hi, i've tried running up codesniffer against latest wordpress version and got following error several times:
Undefined offset: 1057 in squizlabs/php_codesniffer/CodeSniffer/Tokenizers/JS.php on line 907
full paste
You can recreate it by downloading WP 4.0 (.zip | .tar.gz | archive page) and running
phpcs .
.PHPCS version: 1.5.4; got same thing for 2.0.x-dev (except for notice being raised on line 1004).