mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 21:18:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
37
brutal.strings/Brutal.Strings.Analyzers/Resources.cs
Normal file
37
brutal.strings/Brutal.Strings.Analyzers/Resources.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace Brutal.Strings.Analyzers;
|
||||
|
||||
public static class Resources
|
||||
{
|
||||
public static readonly DiagnosticDescriptor BrutalCore0001 = new(
|
||||
"BRUTALCORE0001",
|
||||
"Avoid calling ToString on (ReadOnly)Span<byte>",
|
||||
"ToString() on a span does not convert the contents to a string, did you mean to use ToString16?",
|
||||
"Intent",
|
||||
DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true,
|
||||
description: "Span<byte>.ToString() does not decode the bytes to a string."
|
||||
);
|
||||
public const string BrutalCore0001Suggestion = "Use .ToString16()";
|
||||
|
||||
public static readonly DiagnosticDescriptor BrutalCore0002 = new(
|
||||
"BRUTALCORE0002",
|
||||
"Avoid calling ToString on (ReadOnly)Span<T> where T is not string or byte",
|
||||
"ToString() on a span does not convert the contents to a string, did you mean to use a different method?",
|
||||
"Intent",
|
||||
DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true,
|
||||
description: "Span<T>.ToString() does not decode the content to a string."
|
||||
);
|
||||
|
||||
public static readonly DiagnosticDescriptor PreferU8OverloadBrutalCore0011 = new(
|
||||
"BRUTALCORE0011",
|
||||
"Prefer using a UTF8 string",
|
||||
"Prefer using a UTF8 string: {0}",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Warning,
|
||||
isEnabledByDefault: true
|
||||
);
|
||||
public const string PreferU8OverloadBrutalCore0011Suggestion = "Append u8 to the string literal";
|
||||
}
|
||||
Loading…
Reference in a new issue