You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-lin...@googlegroups.com
I have some embedded JSON in my source code, but the linter complains about the double-quotes.
I agree with the linter in general about quotes, but would like to make an exception for JSON: is there any way to suppress the quote warning for a single variable definition?
thanks,
Nick
Hochhaus, Andrew
unread,
Aug 20, 2013, 5:59:23 PM8/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Closure Linter Discuss
Which specific error are you receiving?
Some (all?) of the closure-linter errors can be turned off using the @suppress jsdoc. I normally grep the linter code to locate the required suppression (eg: extraRequire, extraProvide, missingProvide, accessControls, underscore, etc)
If it is UNNECESSARY_DOUBLE_QUOTED_STRING I don't see a corresponding suppress that is supported by the linter.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-lin...@googlegroups.com
Unfortunately you cannot suppress the unnecessary double quoted string error on a case by case basis using the @suppress annotation. You can see the list of valid values for the @suppress annotation here: https://code.google.com/p/closure-linter/source/browse/trunk/closure_linter/statetracker.py#108 , though not all those suppressions are used by the linter, some are just there for compatibility with the Closure Compiler.
As of a fairly recent release of the linter you can suppress any error for all occurrences on the command line via the --disable flag. You can see the flag source here: https://code.google.com/p/closure-linter/source/browse/trunk/closure_linter/errorrules.py#28 . We don't allow this blanket suppression internally at Google (don't want to allow us to ignore our own style guide) so if there are issues please report them. But it does sound like this is overkill for your case, unfortunately. You are welcome to file a feature request to allow @suppress of arbitrary errors for case by case suppression but I do not know when it would get addressed.
(another) Andy
Nick Thompson
unread,
Aug 20, 2013, 6:13:55 PM8/20/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to closure-lin...@googlegroups.com
That's the one I'm afraid:
E:0131: Single-quoted string preferred over double-quoted string.
Guess I'll put it in a separate file that doesn't go through the linter, or something along those lines.