-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Several different styles in error/warning messages #225
Comments
Most of the messages came from SpiderMonkey by the way of Rhino. Here's the main file: https://hg.mozilla.org/mozilla-central/file/11506aaf7064/js/src/js.msg, and we should try to stick to it when we can. Looking at it, some things have changed over the years (I can't find the last two messages there, and But the predominant style is: lowercase, no period at the end. The quoting is indeed inconsistent. |
Yes, I figured that out from the comments. Given that I do not mind which style is used but rather that it's more uniform, I do not understand what you mean when you say “we should try to stick to it”: would it be welcome a PR that uniformely uses lowercase, no period at the end, consistent quoting, or do you mean aligning |
This, foremost. The link above is to SpiderMonkey, though. Rhino has been stagnating for a while.
And this would be fine for strings with no counterparts in SpiderMonkey (the "added by js2-mode" ones, for instance). |
First approach, to merge current SM msgs with js2-mode's ones: https://gist.github.com/lelit/90b8660771cf16654473 Of course this needs further (possibly manual) tweaks, to make adjustments and probably remove several unused entries. It requires the |
Indeed. Also, the ideal patch wouldn't change the order of the statements. This shouldn't be too hard to automate either - by performing the replacements in And levenshtein isn't enough at least in some cases, take for instance the message string I've mentioned in the first comment. |
Is there a particular reason/need to use different styles in the messages?
missing ] after element list
missing '{' before try block
unmatched ) in regular expression.
continue must be inside loop
yield must be in a function.
'try' without 'catch' or 'finally'
Unexpected end of file
Cannot convert null to an object.
I understand it's a matter of taste, but wouldn't it be nicer if all messages share a common shape?
One possible style guide could be:
What do you think?
The text was updated successfully, but these errors were encountered: