google / google/error-prone

Avoid using non-ASCII Unicode characters outside of comments and literals

Open
#3,092 12 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

In error-prone 2.11.0 I've started getting the following error when building within IntelliJ

```
Foo.java:17:2
java: [UnicodeInCode] Avoid using non-ASCII Unicode characters outside of comments and literals, as they can be confusing.
(see https://errorprone.info/bugpattern/UnicodeInCode)
```

When I view the file in VIM or HexDump there I can't see any non-unicode characters.

Line 17 is the end of the file, I can't supply the whole file due to work constraints. But below is a screenshot of the end of the file from hexedit
image

Within IntelliJ the formatter is doing
![image](https://user-images.githubusercontent.com/21182014/162489106-e9bd1d98-f91d-48f8-a793-42be605c1ed7.png)

If I down grade error-prone to 2.10.0 it works fine on the offending file

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.