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
There will be a infinite loop in
File: SonarAnalyzer.CSharp/Rules/ClassName.cs
Class: internal class CamelCaseConverter
Method: public static string Convert(string identifierName)
When
char.IsLower(suggestion[currentIndex])
char.IsNumber(suggestion[currentIndex])
char.IsUpper(suggestion[currentIndex])
all return false
Repro steps
Create a project with a class named in non-Latin characters. e.g. Chinese which is fine in C#.
class 你好{}
Run.
Expected behavior
Finish when done.
Actual behavior
Runs forever with high CPU usage.
Known workarounds
Use all Latin characters in class name.
Related information
SonarC# Version: 6.0.0.2033
Visual Studio Version: 2017
If running through the Scanner for MSBuild, its version: MSBuild15
The text was updated successfully, but these errors were encountered:
valhristov
changed the title
Class Name with non-Latin Characters
Fix S110: "Class Name" infinite loop when class name contains non-Latin Characters
Jul 6, 2017
michalb-sonar
changed the title
Fix S110: "Class Name" infinite loop when class name contains non-Latin Characters
Fix S101: "Class Name" infinite loop when class name contains non-Latin Characters
Jul 19, 2017
Description
There will be a infinite loop in
File: SonarAnalyzer.CSharp/Rules/ClassName.cs
Class: internal class CamelCaseConverter
Method: public static string Convert(string identifierName)
When
char.IsLower(suggestion[currentIndex])
char.IsNumber(suggestion[currentIndex])
char.IsUpper(suggestion[currentIndex])
all return false
Repro steps
Create a project with a class named in non-Latin characters. e.g. Chinese which is fine in C#.
class 你好{}
Run.
Expected behavior
Finish when done.
Actual behavior
Runs forever with high CPU usage.
Known workarounds
Use all Latin characters in class name.
Related information
The text was updated successfully, but these errors were encountered: