Skip to content
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

Can not satisfy SA1649 "File name should match first type name" when type name contains backslash on Windows #3907

Open
Arthri opened this issue Nov 29, 2024 · 4 comments

Comments

@Arthri
Copy link

Arthri commented Nov 29, 2024

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 space
class Name\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.

@julealgon
Copy link

A solution is to expand the escape making the declaration class Namee, but sometimes that is not desirable, especially with more exotic characters.

Why would it not be desirable?

@Arthri
Copy link
Author

Arthri commented Nov 29, 2024

Characters in non-Latin scripts such as Arabic may not display correctly on all computers

@julealgon
Copy link

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?

@Arthri
Copy link
Author

Arthri commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants