Skip to content

Improve JsonEncoder.EscapeString and fix test warnings for ToString() #2258

Improve JsonEncoder.EscapeString and fix test warnings for ToString()

Improve JsonEncoder.EscapeString and fix test warnings for ToString() #2258

Triggered via pull request February 17, 2024 12:50
Status Success
Total duration 28m 40s
Artifacts

codeql-analysis.yml

on: pull_request
Matrix: Analyze
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L92
The behavior of 'byte.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'byte.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L93
The behavior of 'byte.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'byte.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L99
The behavior of 'sbyte.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'sbyte.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L100
The behavior of 'sbyte.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'sbyte.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L106
The behavior of 'ushort.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'ushort.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L107
The behavior of 'ushort.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'ushort.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L113
The behavior of 'short.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'short.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L114
The behavior of 'short.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'short.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L120
The behavior of 'uint.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'uint.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)
Analyze (csharp): Tests/Opc.Ua.Core.Tests/Types/Encoders/JsonEncoderTests.cs#L121
The behavior of 'uint.ToString()' could vary based on the current user's locale settings. Replace this call in 'JsonEncoderTests.Data' with a call to 'uint.ToString(IFormatProvider)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305)