-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Detect specifical character in EnumConverter.cs #76873
Detect specifical character in EnumConverter.cs #76873
Conversation
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsIt is possible for enum identifiers to contain commas in IL. Use reflection to check whethe enum value contains specifical character ( chars except digit, letter and underscore). Fail early, before pass bogus tokens into the naming policy. closes #73712
|
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
...es/System.Text.Json/tests/System.Text.Json.FSharp.Tests/System.Text.Json.FSharp.Tests.fsproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Outdated
Show resolved
Hide resolved
…ests/EnumTests.fs
…ests/EnumTests.fs
…ests/EnumTests.fs
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
…ion/Converters/Value/EnumConverter.cs
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.
Thank you!
CI test failures are flagged as known issues. |
It is possible for enum identifiers to contain commas in IL.
Use reflection to check whethe enum value contains specifical character ( chars except digit, letter and underscore). Fail early, before pass bogus tokens into the naming policy.
closes #73712