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
Can not satisfy SA1649 "File name should match first type name" when type name contains backslash on Windows #3907
Assume that a file, Namee.cs, exists and has the following contents,
// \u0065 is 'e', but the same happens with other characters such as// \u200B or zero-width spaceclassName\u0065;
It is impossible to satisfy this condition on Windows because \ is not permitted in file names. A solution is to expand the escape making the declaration class Namee, but sometimes that is not desirable, especially with more exotic characters.
Characters in non-Latin scripts such as Arabic may not display correctly on all computers
If you had characters such as that in your source code, wouldn't installing whatever was needed to display them properly be a development requirement for that particular project?
This case seems sufficiently obscure that a pragma suppression would suffice. We should at minimum allow the issue to be resolved by evaluating the escape sequence, but I'm not sure further handling is warranted.
Activity
julealgon commentedon Nov 29, 2024
Why would it not be desirable?
Arthri commentedon Nov 29, 2024
Characters in non-Latin scripts such as Arabic may not display correctly on all computers
julealgon commentedon Nov 29, 2024
If you had characters such as that in your source code, wouldn't installing whatever was needed to display them properly be a development requirement for that particular project?
Arthri commentedon Nov 29, 2024
It was simply an example. The issue is still about the lack of handling or behavior regarding Unicode character escapes in type identifiers
sharwell commentedon Dec 4, 2024
This case seems sufficiently obscure that a pragma suppression would suffice. We should at minimum allow the issue to be resolved by evaluating the escape sequence, but I'm not sure further handling is warranted.