Skip to content

Commit e706438

Browse files
committed
Fix: Some tweaks to structure and wording
1 parent 571f9ac commit e706438

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CodeOfChaos.Extensions.sln

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{C6
3030
EndProject
3131
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples.CodeOfChaos.Extensions.Analyzers", "examples\Examples.CodeOfChaos.Extensions.Analyzers\Examples.CodeOfChaos.Extensions.Analyzers.csproj", "{50072DFE-34A3-4E93-A2A1-02CDDCA66CBE}"
3232
EndProject
33+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "analyzers", "analyzers", "{9F807E1D-D361-4CAB-8FD2-39B8A4F7AFFF}"
34+
EndProject
3335
Global
3436
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3537
Debug|Any CPU = Debug|Any CPU
@@ -91,7 +93,8 @@ Global
9193
{BC0AB42E-28A5-47FC-9017-1191C6899645} = {8DD280D4-1E14-4D5E-AFE6-58DD8F079DCC}
9294
{DCFDADB7-06BE-49BB-A71F-3124A48B0ECF} = {197E72AD-DEAB-4350-AFC3-A3BB38720BF5}
9395
{8670FBAC-E420-4DC6-82B1-AF0C5BF7F797} = {8DD280D4-1E14-4D5E-AFE6-58DD8F079DCC}
94-
{E9BB7403-5167-46CA-BE84-F420CF28C910} = {197E72AD-DEAB-4350-AFC3-A3BB38720BF5}
9596
{50072DFE-34A3-4E93-A2A1-02CDDCA66CBE} = {C632855B-76D1-4D5E-9A0A-E631B5FE71A2}
97+
{9F807E1D-D361-4CAB-8FD2-39B8A4F7AFFF} = {197E72AD-DEAB-4350-AFC3-A3BB38720BF5}
98+
{E9BB7403-5167-46CA-BE84-F420CF28C910} = {9F807E1D-D361-4CAB-8FD2-39B8A4F7AFFF}
9699
EndGlobalSection
97100
EndGlobal

examples/Examples.CodeOfChaos.Extensions.Analyzers/ToGuidDiagnostic.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ public class ToGuidDiagnostic {
1212
public Guid Something() {
1313
return "b60fbc5b-86eb-472b-bfc6-0439d9a70e94".ToGuid();
1414
}
15+
public Guid SomethingWrong() {
16+
return "alpha".ToGuid();
17+
}
1518
}

src/CodeOfChaos.Extensions.Analyzers/AnalyzerReleases.Shipped.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
Rule ID | Category | Severity | Notes
66
--------|----------|----------|------------------------
7-
COCE001 | Usage | Warning | ToGuid was not parsable
7+
CODE001 | Usage | Warning | GuidValidationAnalyzer

src/CodeOfChaos.Extensions.Analyzers/GuidValidationAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace CodeOfChaos.Extensions.Analyzers;
1515
[DiagnosticAnalyzer(LanguageNames.CSharp)]
1616
public class GuidValidationAnalyzer : DiagnosticAnalyzer {
1717
private static readonly DiagnosticDescriptor Rule = new(
18-
"COCE001",
18+
"CODE001",
1919
"Invalid GUID in .ToGuid() call",
20-
"The string '{0}' is not a valid GUID",
20+
"The string '{0}' is not a valid GUID and will raise an exception",
2121
"Usage",
2222
DiagnosticSeverity.Warning,
2323
true,

0 commit comments

Comments
 (0)