Skip to content

Commit c7268f2

Browse files
committed
new names
1 parent 688fcc1 commit c7268f2

29 files changed

Lines changed: 185 additions & 181 deletions

src/ModVerify/Reporting/Diagnostics/Diagnostics.Audio.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying audio sample files.</summary>
7-
public static class Audio
7+
public static class AudioErrors
88
{
99
private static readonly ErrorDescriptor _fileNotFound = new(
1010
VerifierErrorCodes.FileNotFound, "AudioFileNotFound", VerificationSeverity.Error, "Audio");

src/ModVerify/Reporting/Diagnostics/Diagnostics.CommandBar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying the command bar.</summary>
7-
public static class CommandBar
7+
public static class CommandBarErrors
88
{
99
private const string GameCommandBarAsset = "GameCommandBar";
1010

src/ModVerify/Reporting/Diagnostics/Diagnostics.Common.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings that are not specific to a single verifier family.</summary>
7-
public static class Common
7+
public static class CommonErrors
88
{
99
private static readonly ErrorDescriptor _duplicate = new(
1010
VerifierErrorCodes.Duplicate, "DuplicateEntry", VerificationSeverity.Error, "Common");

src/ModVerify/Reporting/Diagnostics/Diagnostics.Engine.cs

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides the engine-initialization descriptor read by the engine reporter.</summary>
7-
public static class Engine
7+
public static class EngineErrors
88
{
99
/// <summary>The game engine reported an error during initialization. The message is supplied by the engine.</summary>
1010
public static readonly ErrorDescriptor InitializationError = new(
1111
VerifierErrorCodes.InitializationError, "EngineInitializationError", VerificationSeverity.Critical, "Engine");
1212
}
1313

1414
/// <summary>Provides factories for hard-coded engine assets that are loaded at startup.</summary>
15-
public static class HardcodedAssets
15+
public static class HardcodedAssetErrors
1616
{
1717
private static readonly ErrorDescriptor _shaderNotFound = new(
1818
VerifierErrorCodes.FileNotFound, "HardcodedShaderNotFound", VerificationSeverity.Error, "HardcodedAssets");
@@ -31,71 +31,8 @@ public static VerificationError TerrainShaderNotFound(IGameVerifierInfo verifier
3131
=> _terrainShaderNotFound.Create(verifier, $"Unable to find terrain shader '{shaderName}'.", shaderName, context);
3232
}
3333

34-
// Descriptors for findings produced by the engine-side reporters. Their messages are supplied by the engine
35-
// (XML parser, asserts), so the reporters read only Id and Severity.
36-
37-
/// <summary>Provides descriptors for findings reported by the engine's XML parser.</summary>
38-
public static class Xml
39-
{
40-
/// <summary>The XML parser reported an error that does not map to a more specific kind.</summary>
41-
public static readonly ErrorDescriptor Generic = new(
42-
VerifierErrorCodes.GenericXmlError, "XmlGenericError", VerificationSeverity.Warning, "Xml");
43-
44-
/// <summary>An XML file has an empty root element.</summary>
45-
public static readonly ErrorDescriptor EmptyRoot = new(
46-
VerifierErrorCodes.EmptyXmlRoot, "XmlEmptyRoot", VerificationSeverity.Critical, "Xml");
47-
48-
/// <summary>An XML file referenced by the parser could not be found.</summary>
49-
public static readonly ErrorDescriptor MissingFile = new(
50-
VerifierErrorCodes.FileNotFound, "XmlMissingFile", VerificationSeverity.Error, "Xml");
51-
52-
/// <summary>An XML element has an invalid value.</summary>
53-
public static readonly ErrorDescriptor InvalidValue = new(
54-
VerifierErrorCodes.InvalidXmlValue, "XmlInvalidValue", VerificationSeverity.Information, "Xml");
55-
56-
/// <summary>An XML element has a malformed value.</summary>
57-
public static readonly ErrorDescriptor MalformedValue = new(
58-
VerifierErrorCodes.MalformedXmlValue, "XmlMalformedValue", VerificationSeverity.Warning, "Xml");
59-
60-
/// <summary>An XML element is missing a required attribute.</summary>
61-
public static readonly ErrorDescriptor MissingAttribute = new(
62-
VerifierErrorCodes.MissingXmlAttribute, "XmlMissingAttribute", VerificationSeverity.Error, "Xml");
63-
64-
/// <summary>An XML element references an entry that does not exist.</summary>
65-
public static readonly ErrorDescriptor MissingReference = new(
66-
VerifierErrorCodes.MissingXmlReference, "XmlMissingReference", VerificationSeverity.Error, "Xml");
67-
68-
/// <summary>An XML value exceeds the maximum allowed length.</summary>
69-
public static readonly ErrorDescriptor ValueTooLong = new(
70-
VerifierErrorCodes.XmlValueTooLong, "XmlValueTooLong", VerificationSeverity.Warning, "Xml");
71-
72-
/// <summary>An XML file contains data before its header.</summary>
73-
public static readonly ErrorDescriptor DataBeforeHeader = new(
74-
VerifierErrorCodes.XmlDataBeforeHeader, "XmlDataBeforeHeader", VerificationSeverity.Information, "Xml");
75-
76-
/// <summary>A required XML node is missing.</summary>
77-
public static readonly ErrorDescriptor MissingNode = new(
78-
VerifierErrorCodes.XmlMissingNode, "XmlMissingNode", VerificationSeverity.Critical, "Xml");
79-
80-
/// <summary>An XML file contains a node the parser does not support.</summary>
81-
public static readonly ErrorDescriptor UnknownNode = new(
82-
VerifierErrorCodes.XmlUnsupportedTag, "XmlUnknownNode", VerificationSeverity.Information, "Xml");
83-
84-
/// <summary>An XML tag unexpectedly contains child elements.</summary>
85-
public static readonly ErrorDescriptor TagHasElements = new(
86-
VerifierErrorCodes.XmlElementsInTag, "XmlTagHasElements", VerificationSeverity.Warning, "Xml");
87-
88-
/// <summary>An XML element has a name the parser did not expect.</summary>
89-
public static readonly ErrorDescriptor UnexpectedElementName = new(
90-
VerifierErrorCodes.XmlUnexceptedElementName, "XmlUnexpectedElementName", VerificationSeverity.Information, "Xml");
91-
92-
/// <summary>An XML node has an empty name.</summary>
93-
public static readonly ErrorDescriptor EmptyNodeName = new(
94-
VerifierErrorCodes.XmlEmptyNodeName, "XmlEmptyNodeName", VerificationSeverity.Warning, "Xml");
95-
}
96-
9734
/// <summary>Provides descriptors for assertions raised by the engine.</summary>
98-
public static class Asserts
35+
public static class AssertErrors
9936
{
10037
/// <summary>The engine asserted that a value was null or empty.</summary>
10138
public static readonly ErrorDescriptor NullOrEmptyValue = new(

src/ModVerify/Reporting/Diagnostics/Diagnostics.GameObjects.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying game object types.</summary>
7-
public static class GameObjects
7+
public static class GameObjectErrors
88
{
99
private static readonly ErrorDescriptor _nameTooLong = new(
1010
VerifierErrorCodes.NameTooLong, "GameObjectNameTooLong", VerificationSeverity.Critical, "GameObjects");

src/ModVerify/Reporting/Diagnostics/Diagnostics.GuiDialogs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying GUI dialog textures.</summary>
7-
public static class GuiDialogs
7+
public static class GuiDialogErrors
88
{
99
private static readonly ErrorDescriptor _mtdFileNotFound = new(
1010
VerifierErrorCodes.FileNotFound, "GuiMtdFileNotFound", VerificationSeverity.Critical, "GuiDialogs");

src/ModVerify/Reporting/Diagnostics/Diagnostics.Models.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying models, particles, and animations.</summary>
7-
public static class Models
7+
public static class ModelErrors
88
{
99
private static readonly ErrorDescriptor _alamoFileNotFound = new(
1010
VerifierErrorCodes.FileNotFound, "AlamoFileNotFound", VerificationSeverity.Error, "Models");
@@ -111,21 +111,3 @@ public static VerificationError ProxyNotFound(IGameVerifierInfo verifier, string
111111
public static VerificationError ShaderNotFound(IGameVerifierInfo verifier, string shaderEffect, string modelFile, IEnumerable<string> context)
112112
=> _shaderNotFound.Create(verifier, $"Shader effect '{shaderEffect}' not found for model '{modelFile}'.", shaderEffect, context);
113113
}
114-
115-
/// <summary>Provides factories for findings produced while verifying textures.</summary>
116-
public static class Textures
117-
{
118-
private static readonly ErrorDescriptor _pathTooLong = new(
119-
VerifierErrorCodes.FilePathTooLong, "TexturePathTooLong", VerificationSeverity.Error, "Textures");
120-
121-
private static readonly ErrorDescriptor _notFound = new(
122-
VerifierErrorCodes.FileNotFound, "TextureNotFound", VerificationSeverity.Error, "Textures");
123-
124-
/// <summary>Creates an error for a texture that could not be found because the resolved path is too long.</summary>
125-
public static VerificationError PathTooLong(IGameVerifierInfo verifier, string texturePath, IEnumerable<string> context)
126-
=> _pathTooLong.Create(verifier, $"Could not find texture '{texturePath}' because the engine resolved a path that is too long.", texturePath, context);
127-
128-
/// <summary>Creates an error for a texture that could not be found.</summary>
129-
public static VerificationError NotFound(IGameVerifierInfo verifier, string texturePath, IEnumerable<string> context)
130-
=> _notFound.Create(verifier, $"Could not find texture '{texturePath}'.", texturePath, context);
131-
}

src/ModVerify/Reporting/Diagnostics/Diagnostics.Sfx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace AET.ModVerify.Reporting.Diagnostics;
55

66
/// <summary>Provides factories for findings produced while verifying SFX events.</summary>
7-
public static class Sfx
7+
public static class SfxErrors
88
{
99
private static readonly ErrorDescriptor _nameTooLong = new(
1010
VerifierErrorCodes.NameTooLong, "SfxEventNameTooLong", VerificationSeverity.Critical, "Sfx");
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Collections.Generic;
2+
using AET.ModVerify.Verifiers;
3+
4+
namespace AET.ModVerify.Reporting.Diagnostics;
5+
6+
/// <summary>Provides factories for findings produced while verifying textures.</summary>
7+
public static class TextureErrors
8+
{
9+
private static readonly ErrorDescriptor _pathTooLong = new(
10+
VerifierErrorCodes.FilePathTooLong, "TexturePathTooLong", VerificationSeverity.Error, "Textures");
11+
12+
private static readonly ErrorDescriptor _notFound = new(
13+
VerifierErrorCodes.FileNotFound, "TextureNotFound", VerificationSeverity.Error, "Textures");
14+
15+
/// <summary>Creates an error for a texture that could not be found because the resolved path is too long.</summary>
16+
public static VerificationError PathTooLong(IGameVerifierInfo verifier, string texturePath, IEnumerable<string> context)
17+
=> _pathTooLong.Create(verifier, $"Could not find texture '{texturePath}' because the engine resolved a path that is too long.", texturePath, context);
18+
19+
/// <summary>Creates an error for a texture that could not be found.</summary>
20+
public static VerificationError NotFound(IGameVerifierInfo verifier, string texturePath, IEnumerable<string> context)
21+
=> _notFound.Create(verifier, $"Could not find texture '{texturePath}'.", texturePath, context);
22+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
using AET.ModVerify.Verifiers;
2+
3+
namespace AET.ModVerify.Reporting.Diagnostics;
4+
5+
/// <summary>Provides descriptors for findings reported by the engine's XML parser.</summary>
6+
public static class XmlErrors
7+
{
8+
/// <summary>The XML parser reported an error that does not map to a more specific kind.</summary>
9+
public static readonly ErrorDescriptor Generic = new(
10+
VerifierErrorCodes.GenericXmlError, "XmlGenericError", VerificationSeverity.Warning, "Xml");
11+
12+
/// <summary>An XML file has an empty root element.</summary>
13+
public static readonly ErrorDescriptor EmptyRoot = new(
14+
VerifierErrorCodes.EmptyXmlRoot, "XmlEmptyRoot", VerificationSeverity.Critical, "Xml");
15+
16+
/// <summary>An XML file referenced by the parser could not be found.</summary>
17+
public static readonly ErrorDescriptor MissingFile = new(
18+
VerifierErrorCodes.FileNotFound, "XmlMissingFile", VerificationSeverity.Error, "Xml");
19+
20+
/// <summary>An XML element has an invalid value.</summary>
21+
public static readonly ErrorDescriptor InvalidValue = new(
22+
VerifierErrorCodes.InvalidXmlValue, "XmlInvalidValue", VerificationSeverity.Information, "Xml");
23+
24+
/// <summary>An XML element has a malformed value.</summary>
25+
public static readonly ErrorDescriptor MalformedValue = new(
26+
VerifierErrorCodes.MalformedXmlValue, "XmlMalformedValue", VerificationSeverity.Warning, "Xml");
27+
28+
/// <summary>An XML element is missing a required attribute.</summary>
29+
public static readonly ErrorDescriptor MissingAttribute = new(
30+
VerifierErrorCodes.MissingXmlAttribute, "XmlMissingAttribute", VerificationSeverity.Error, "Xml");
31+
32+
/// <summary>An XML element references an entry that does not exist.</summary>
33+
public static readonly ErrorDescriptor MissingReference = new(
34+
VerifierErrorCodes.MissingXmlReference, "XmlMissingReference", VerificationSeverity.Error, "Xml");
35+
36+
/// <summary>An XML value exceeds the maximum allowed length.</summary>
37+
public static readonly ErrorDescriptor ValueTooLong = new(
38+
VerifierErrorCodes.XmlValueTooLong, "XmlValueTooLong", VerificationSeverity.Warning, "Xml");
39+
40+
/// <summary>An XML file contains data before its header.</summary>
41+
public static readonly ErrorDescriptor DataBeforeHeader = new(
42+
VerifierErrorCodes.XmlDataBeforeHeader, "XmlDataBeforeHeader", VerificationSeverity.Information, "Xml");
43+
44+
/// <summary>A required XML node is missing.</summary>
45+
public static readonly ErrorDescriptor MissingNode = new(
46+
VerifierErrorCodes.XmlMissingNode, "XmlMissingNode", VerificationSeverity.Critical, "Xml");
47+
48+
/// <summary>An XML file contains a node the parser does not support.</summary>
49+
public static readonly ErrorDescriptor UnknownNode = new(
50+
VerifierErrorCodes.XmlUnsupportedTag, "XmlUnknownNode", VerificationSeverity.Information, "Xml");
51+
52+
/// <summary>An XML tag unexpectedly contains child elements.</summary>
53+
public static readonly ErrorDescriptor TagHasElements = new(
54+
VerifierErrorCodes.XmlElementsInTag, "XmlTagHasElements", VerificationSeverity.Warning, "Xml");
55+
56+
/// <summary>An XML element has a name the parser did not expect.</summary>
57+
public static readonly ErrorDescriptor UnexpectedElementName = new(
58+
VerifierErrorCodes.XmlUnexceptedElementName, "XmlUnexpectedElementName", VerificationSeverity.Information, "Xml");
59+
60+
/// <summary>An XML node has an empty name.</summary>
61+
public static readonly ErrorDescriptor EmptyNodeName = new(
62+
VerifierErrorCodes.XmlEmptyNodeName, "XmlEmptyNodeName", VerificationSeverity.Warning, "Xml");
63+
}

0 commit comments

Comments
 (0)