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

The name of unknown key in userscript meta data warning is truncated: @supportURL triggers an 'Expected "author", "description", ... or "version" but "s" found.' warning #2684

Closed
juozaspo opened this Issue Nov 16, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@juozaspo

juozaspo commented Nov 16, 2017

Having @supportURL or any other unknown key such as gibberish in userscript meta info triggers CodeMirror lint warning with truncated key name:
Expected "author", "description", "downloadURL", "exclude", "grant", "homepageURL", "icon", "include", "installURL", "match", "name", "namespace", "noframes", "require", "resource", "run-at", "updateURL" or "version" but "s" found.
Full text captured using firefox debug tools, screenshots below.
pazymejimas 2017-11-16 15 14 43
pazymejimas 2017-11-18 16 17 46
Greasemonkey 4.1beta3 and 4.1beta4

@Sxderp

This comment has been minimized.

Contributor

Sxderp commented Nov 16, 2017

Would be nice if it reported the entire string "supportURL."

@Eselce

This comment has been minimized.

Contributor

Eselce commented Nov 17, 2017

You guessed it: Same with @copyright and "c" found... ;-)

@juozaspo juozaspo changed the title from @supportURL in userscript meta info triggers a warning: Expected "author", "description", ... or "version" but "s" found. to The name of unknown key in userscript meta data warning is truncated: @supportURL triggers an 'Expected "author", "description", ... or "version" but "s" found.' warning Nov 18, 2017

badbrainz added a commit to badbrainz/greasemonkey that referenced this issue Nov 19, 2017

Issue greasemonkey#2684 Replace unhelpful lint message
Swap the truncated part with the word that's in the editor doc.
Since we're computing the 'to' position (metaline parser doesn't
give us the one we want) change that as well.

@arantius arantius added this to the 4.x milestone Nov 21, 2017

@arantius arantius modified the milestones: 4.x, 4.2 Jan 6, 2018

@arantius

This comment has been minimized.

Collaborator

arantius commented Jan 6, 2018

#2703 has been packaged in a new beta version:
https://addons.mozilla.org/firefox/downloads/file/830369/greasemonkey-4.2beta1-an+fx.xpi?src=devhub

Testing and confirmation would be appreciated!

@arantius arantius closed this Jan 6, 2018

@Eselce

This comment has been minimized.

Contributor

Eselce commented Jan 6, 2018

You've probably already registered, that it works fine.

For me, it was @copyright (I use it, although GM doesn't accept it).

GM 4.1 (and earlier) mentioned "c", while this fix extends it to "copyright".
The whole word is underlined to mark the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment