You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linter rule: use ASCII quotes not Unicode ones #11209
I added a second commit that replaces a few U+2019 quotes with ASCII quotes so that their files can be stored as one-byte strings.
Probably one for another PR, but this sounds like a good candidate for a lint rule.
Basically we need a lint rule that checks for U+2019 quotes: ’, and suggests that they be replaced with ASCII quotes: '.
Activity
addaleax commentedon Feb 7, 2017
Two things:
lib/and only tolib/, because that’s where we need it.silverwind commentedon Feb 7, 2017
We could do something like this (
matchis fed to the RegExp constructor):The last one might be a bit extreme :)
aqrln commentedon Feb 7, 2017
@silverwind I'd also add replacements for “” and «» to ASCII double quotes.
silverwind commentedon Feb 7, 2017
You can always contribute improvements later, above is just about the general rule config layout.
gibfahn commentedon Feb 8, 2017
This is an open issue looking for someone to raise a PR. If whoever raises it wants to include those then that sounds good to me.
not-an-aardvark commentedon Feb 10, 2017
If the goal is to allow files to be stored as one-byte strings, would it be better for the rule to just disallow all non-ascii characters in files?
edit: Never mind, I see @addaleax also mentioned this above.
hkal commentedon Feb 10, 2017
@gibfahn I'll give this a go if no one else is assigned.
gibfahn commentedon Feb 10, 2017
@hkal go for it!
hkal commentedon Feb 14, 2017
Do we still need this after #11129?
cc @bnoordhuis
bnoordhuis commentedon Feb 14, 2017
Would be good to enforce it because Unicode files take up twice as much space in the binary as plain ASCII files.
10 remaining items
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only
tools: non-Ascii linter for /lib only