-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow non-ASCII identifiers #2457
Merged
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ec728b3
Initial draft of unicode-idents RFC
pyfisch 4c1bda9
Include expected Usage Notes and minor changes
pyfisch 619f5b4
Improve descriptions and fix typos
pyfisch 142d0bc
ACII -> ASCII
pyfisch 6b2a94a
Typos, renames and a minor reference change
pyfisch 3e19d26
Update Reference-level explanation
pyfisch a4830a1
Consider identifiers for confusable detection
pyfisch 12d0623
Note difference between Python and Rust
pyfisch 79bbc8e
Remove mention of scope from guide explanation
pyfisch 41f0723
Rename confusable_non_ascii_idents to confusable_idents
pyfisch 3c96d81
Conformance statement
pyfisch 940dab5
Remove stray "is"
pyfisch da43d09
Add that non-ASCII idents observe UAX31-R3
pyfisch 0e0ca66
Add details for fs, extern, lints
pyfisch 935c917
Add two questions about debuggers and name mangling
pyfisch 8d548d4
Add exotic codepoint detection and mixed script lints
pyfisch 9356fc1
+ Reusability
Manishearth 40d53f5
Global mixed script confusables lint
Manishearth 7732810
notable code points for less_used_codepoints
Manishearth e3f3692
Mention user-supplied strings
Manishearth d389a9c
Add unresolved Q regarding const pat confusion (rust-lang/rust#7526).
pnkfelix 70297a9
Remove old mixed scripts lints
Manishearth 9bf90df
Add new mixed_script_confusables lint
Manishearth a6da03a
Add unresolved questions for RTL and terminal width
Manishearth c4dff64
Allow bare underscore identifiers
Manishearth 0c78631
RFC 2457
Centril File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Improve descriptions and fix typos
Thanks to SimonSapin for the suggestions.
- Loading branch information
commit 619f5b4ed000dffaa504aaf1502ac232d7bd2e52
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the lint should be
allow
by default. It should at least be warn by default. Starting to use non ascii idents should be a conscious choice, not an accidental one.As for checking imported idents as well, I think this should be a separate lint. You might want to be able to import something from a foreign language crate but not want to have foreign language idents in your own code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reposting my comment from #2455 (comment), I think that there should be different lints, with different levels, as some languages should be allow/warn by default, and some others should be deny by default.