Skip to content

Commit 4142b09

Browse files
committed
automated doc comment cleanup
1 parent 1f35314 commit 4142b09

12 files changed

Lines changed: 133 additions & 397 deletions

File tree

SharpDenizenTools/MetaHandlers/MetaDocs.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ public MetaTag FindTag(string tagText)
227227
return null;
228228
}
229229

230-
/// <summary>
231-
/// A list of load-time errors, if any.
232-
/// </summary>
230+
/// <summary>A list of load-time errors, if any.</summary>
233231
public List<string> LoadErrors = new();
234232
}
235233
}

SharpDenizenTools/MetaObjects/MetaAction.cs

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
namespace SharpDenizenTools.MetaObjects
1010
{
11-
/// <summary>
12-
/// A documented action.
13-
/// </summary>
11+
/// <summary>A documented action.</summary>
1412
public class MetaAction : MetaObject
1513
{
1614
/// <summary><see cref="MetaObject.Type"/></summary>
@@ -28,34 +26,22 @@ public override void AddTo(MetaDocs docs)
2826
/// <summary><see cref="MetaObject.MultiNames"/></summary>
2927
public override IEnumerable<string> MultiNames => CleanActions;
3028

31-
/// <summary>
32-
/// The names of the action.
33-
/// </summary>
29+
/// <summary>The names of the action.</summary>
3430
public string[] Actions = Array.Empty<string>();
3531

36-
/// <summary>
37-
/// The names of the actions, autocleaned.
38-
/// </summary>
32+
/// <summary>The names of the actions, autocleaned.</summary>
3933
public string[] CleanActions = Array.Empty<string>();
4034

41-
/// <summary>
42-
/// The trigger reason.
43-
/// </summary>
35+
/// <summary>The trigger reason.</summary>
4436
public string Triggers;
4537

46-
/// <summary>
47-
/// A hacked-in regex matcher.
48-
/// </summary>
38+
/// <summary>A hacked-in regex matcher.</summary>
4939
public Regex RegexMatcher = null;
5040

51-
/// <summary>
52-
/// Context tags. One tag per string.
53-
/// </summary>
41+
/// <summary>Context tags. One tag per string.</summary>
5442
public string[] Context = Array.Empty<string>();
5543

56-
/// <summary>
57-
/// Determination options. One Determination per string.
58-
/// </summary>
44+
/// <summary>Determination options. One Determination per string.</summary>
5945
public string[] Determinations = Array.Empty<string>();
6046

6147
/// <summary><see cref="MetaObject.ApplyValue(MetaDocs, string, string)"/></summary>

SharpDenizenTools/MetaObjects/MetaGuidePage.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
namespace SharpDenizenTools.MetaObjects
99
{
10-
/// <summary>
11-
/// A page of the beginner's guide.
12-
/// </summary>
10+
/// <summary>A page of the beginner's guide.</summary>
1311
public class MetaGuidePage : MetaObject
1412
{
1513
/// <summary><see cref="MetaObject.Type"/></summary>

SharpDenizenTools/MetaObjects/MetaLanguage.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
namespace SharpDenizenTools.MetaObjects
99
{
10-
/// <summary>
11-
/// A language documentation.
12-
/// </summary>
10+
/// <summary>A language documentation.</summary>
1311
public class MetaLanguage : MetaObject
1412
{
1513
/// <summary><see cref="MetaObject.Type"/></summary>
@@ -24,14 +22,10 @@ public override void AddTo(MetaDocs docs)
2422
docs.Languages.Add(CleanName, this);
2523
}
2624

27-
/// <summary>
28-
/// The name of the language.
29-
/// </summary>
25+
/// <summary>The name of the language.</summary>
3026
public string LangName;
3127

32-
/// <summary>
33-
/// The long-form description.
34-
/// </summary>
28+
/// <summary>The long-form description.</summary>
3529
public string Description;
3630

3731
/// <summary><see cref="MetaObject.ApplyValue(MetaDocs, string, string)"/></summary>

SharpDenizenTools/MetaObjects/MetaMechanism.cs

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
namespace SharpDenizenTools.MetaObjects
99
{
10-
/// <summary>
11-
/// A documented mechanism.
12-
/// </summary>
10+
/// <summary>A documented mechanism.</summary>
1311
public class MetaMechanism : MetaObject
1412
{
1513
/// <summary><see cref="MetaObject.Type"/></summary>
@@ -30,39 +28,25 @@ public override void AddTo(MetaDocs docs)
3028
/// <summary><see cref="MetaObject.MultiNames"/></summary>
3129
public override IEnumerable<string> MultiNames => NameForms;
3230

33-
/// <summary>
34-
/// Both forms of the mech name (the full name, and the partial name).
35-
/// </summary>
31+
/// <summary>Both forms of the mech name (the full name, and the partial name).</summary>
3632
public string[] NameForms = Array.Empty<string>();
3733

38-
/// <summary>
39-
/// The full mechanism name (Object.Name).
40-
/// </summary>
34+
/// <summary>The full mechanism name (Object.Name).</summary>
4135
public string FullName;
4236

43-
/// <summary>
44-
/// The object the mechanism applies to.
45-
/// </summary>
37+
/// <summary>The object the mechanism applies to.</summary>
4638
public string MechObject;
4739

48-
/// <summary>
49-
/// The name of the mechanism.
50-
/// </summary>
40+
/// <summary>The name of the mechanism.</summary>
5141
public string MechName;
5242

53-
/// <summary>
54-
/// The input type.
55-
/// </summary>
43+
/// <summary>The input type.</summary>
5644
public string Input;
5745

58-
/// <summary>
59-
/// The long-form description.
60-
/// </summary>
46+
/// <summary>The long-form description.</summary>
6147
public string Description;
6248

63-
/// <summary>
64-
/// Tags documented for this mechanism. One tag per string.
65-
/// </summary>
49+
/// <summary>Tags documented for this mechanism. One tag per string.</summary>
6650
public string[] Tags = Array.Empty<string>();
6751

6852
/// <summary><see cref="MetaObject.ApplyValue(MetaDocs, string, string)"/></summary>

SharpDenizenTools/MetaObjects/MetaObject.cs

Lines changed: 21 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,46 @@
77

88
namespace SharpDenizenTools.MetaObjects
99
{
10-
/// <summary>
11-
/// Abstract base for a type of meta object.
12-
/// </summary>
10+
/// <summary>Abstract base for a type of meta object.</summary>
1311
public abstract class MetaObject
1412
{
15-
/// <summary>
16-
/// Get the meta type of the object.
17-
/// </summary>
13+
/// <summary>Get the meta type of the object.</summary>
1814
public abstract MetaType Type { get; }
1915

20-
/// <summary>
21-
/// Get the name of the object. May have capitals.
22-
/// </summary>
16+
/// <summary>Get the name of the object. May have capitals.</summary>
2317
public abstract string Name { get; }
2418

25-
/// <summary>
26-
/// Whether this object has multiple names.
27-
/// </summary>
19+
/// <summary>Whether this object has multiple names.</summary>
2820
public bool HasMultipleNames = false;
2921

30-
/// <summary>
31-
/// If the object has multiple names, returns the full set of names.
32-
/// </summary>
22+
/// <summary>If the object has multiple names, returns the full set of names.</summary>
3323
public virtual IEnumerable<string> MultiNames => new string[] { CleanName };
3424

35-
/// <summary>
36-
/// Get the clean lowercase name of the object.
37-
/// </summary>
25+
/// <summary>Get the clean lowercase name of the object.</summary>
3826
public virtual string CleanName => Name.ToLowerFast();
3927

40-
/// <summary>
41-
/// Other words that mean the same thing.
42-
/// </summary>
28+
/// <summary>Other words that mean the same thing.</summary>
4329
public List<string> Synonyms = new();
4430

45-
/// <summary>
46-
/// What categorization group the object is in.
47-
/// </summary>
31+
/// <summary>What categorization group the object is in.</summary>
4832
public string Group;
4933

50-
/// <summary>
51-
/// Any warnings applied to this object type.
52-
/// </summary>
34+
/// <summary>Any warnings applied to this object type.</summary>
5335
public List<string> Warnings = new();
5436

55-
/// <summary>
56-
/// Required plugin(s) if applicable.
57-
/// </summary>
37+
/// <summary>Required plugin(s) if applicable.</summary>
5838
public string Plugin;
5939

60-
/// <summary>
61-
/// The file in source code that defined this meta object.
62-
/// </summary>
40+
/// <summary>The file in source code that defined this meta object.</summary>
6341
public string SourceFile;
6442

65-
/// <summary>
66-
/// A deprecation notice, if any.
67-
/// </summary>
43+
/// <summary>A deprecation notice, if any.</summary>
6844
public string Deprecated;
6945

70-
/// <summary>
71-
/// The backing <see cref="MetaDocs"/> instance.
72-
/// </summary>
46+
/// <summary>The backing <see cref="MetaDocs"/> instance.</summary>
7347
public MetaDocs Meta;
7448

75-
/// <summary>
76-
/// Apply a setting value to this meta object.
77-
/// </summary>
49+
/// <summary>Apply a setting value to this meta object.</summary>
7850
/// <param name="docs">The relevant meta docs instance.</param>
7951
/// <param name="key">The setting key.</param>
8052
/// <param name="value">The setting value.</param>
@@ -103,9 +75,7 @@ public virtual bool ApplyValue(MetaDocs docs, string key, string value)
10375
}
10476
}
10577

106-
/// <summary>
107-
/// Finds the closing tag mark, compensating for layered tags.
108-
/// </summary>
78+
/// <summary>Finds the closing tag mark, compensating for layered tags.</summary>
10979
/// <param name="text">The raw text.</param>
11080
/// <param name="startIndex">The index to start searching at.</param>
11181
/// <returns>The closing symbol index, or -1 if not found.</returns>
@@ -131,23 +101,17 @@ public static int FindClosingTagMark(string text, int startIndex)
131101
return -1;
132102
}
133103

134-
/// <summary>
135-
/// Adds the object to the meta docs set.
136-
/// </summary>
104+
/// <summary>Adds the object to the meta docs set.</summary>
137105
/// <param name="docs">The docs set.</param>
138106
public abstract void AddTo(MetaDocs docs);
139107

140-
/// <summary>
141-
/// Checks the object for validity, after all loading is done.
142-
/// </summary>
108+
/// <summary>Checks the object for validity, after all loading is done.</summary>
143109
/// <param name="docs">The relevant docs object.</param>
144110
public virtual void PostCheck(MetaDocs docs)
145111
{
146112
}
147113

148-
/// <summary>
149-
/// Post-check handler to require specific values be set (not-null).
150-
/// </summary>
114+
/// <summary>Post-check handler to require specific values be set (not-null).</summary>
151115
/// <param name="docs">The relevant docs object.</param>
152116
/// <param name="requiredValues">The values that are required.</param>
153117
public void Require(MetaDocs docs, params object[] requiredValues)
@@ -161,9 +125,7 @@ public void Require(MetaDocs docs, params object[] requiredValues)
161125
}
162126
}
163127

164-
/// <summary>
165-
/// Post-check handler to validate synonyms don't duplicate existing values.
166-
/// </summary>
128+
/// <summary>Post-check handler to validate synonyms don't duplicate existing values.</summary>
167129
public void PostCheckSynonyms<T>(MetaDocs docs, Dictionary<string, T> objects) where T : MetaObject
168130
{
169131
IEnumerable<string> badSynonyms = Synonyms.Where(s => objects.ContainsKey(s));
@@ -178,9 +140,7 @@ public void PostCheckSynonyms<T>(MetaDocs docs, Dictionary<string, T> objects) w
178140
}
179141
}
180142

181-
/// <summary>
182-
/// Post-check handler for linkable text, to find bad links.
183-
/// </summary>
143+
/// <summary>Post-check handler for linkable text, to find bad links.</summary>
184144
/// <param name="docs">The relevant docs object.</param>
185145
/// <param name="linkedtext">The relevant linkable list.</param>
186146
public void PostCheckLinkableText(MetaDocs docs, string linkedtext)
@@ -269,9 +229,7 @@ public void PostCheckLinkableText(MetaDocs docs, string linkedtext)
269229
}
270230
}
271231

272-
/// <summary>
273-
/// Post-check handler for tags, used in <see cref="MetaCommand"/> and <see cref="MetaMechanism"/>.
274-
/// </summary>
232+
/// <summary>Post-check handler for tags, used in <see cref="MetaCommand"/> and <see cref="MetaMechanism"/>.</summary>
275233
/// <param name="docs">The relevant docs object.</param>
276234
/// <param name="tags">The relevant tags list.</param>
277235
public void PostCheckTags(MetaDocs docs, string[] tags)

SharpDenizenTools/MetaObjects/MetaObjectType.cs

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
namespace SharpDenizenTools.MetaObjects
1010
{
11-
/// <summary>
12-
/// A documented type of object.
13-
/// </summary>
11+
/// <summary>A documented type of object.</summary>
1412
public class MetaObjectType : MetaObject
1513
{
1614
/// <summary><see cref="MetaObject.Type"/></summary>
@@ -36,54 +34,34 @@ public override void AddTo(MetaDocs docs)
3634
}
3735
}
3836

39-
/// <summary>
40-
/// The name of the object type.
41-
/// </summary>
37+
/// <summary>The name of the object type.</summary>
4238
public string TypeName;
4339

44-
/// <summary>
45-
/// The object identity prefix for this type.
46-
/// </summary>
40+
/// <summary>The object identity prefix for this type.</summary>
4741
public string Prefix;
4842

49-
/// <summary>
50-
/// The name of the base type.
51-
/// </summary>
43+
/// <summary>The name of the base type.</summary>
5244
public string BaseTypeName;
5345

54-
/// <summary>
55-
/// The base type.
56-
/// </summary>
46+
/// <summary>The base type.</summary>
5747
public MetaObjectType BaseType;
5848

59-
/// <summary>
60-
/// A human-readable explanation of the identity format of the tag.
61-
/// </summary>
49+
/// <summary>A human-readable explanation of the identity format of the tag.</summary>
6250
public string Format;
6351

64-
/// <summary>
65-
/// A human-readable description of the object type.
66-
/// </summary>
52+
/// <summary>A human-readable description of the object type.</summary>
6753
public string Description;
6854

69-
/// <summary>
70-
/// The names of other types or pseudo-types implemented by this type.
71-
/// </summary>
55+
/// <summary>The names of other types or pseudo-types implemented by this type.</summary>
7256
public string[] ImplementsNames = Array.Empty<string>();
7357

74-
/// <summary>
75-
/// All tags available directly to this base (not counting base/implements).
76-
/// </summary>
58+
/// <summary>All tags available directly to this base (not counting base/implements).</summary>
7759
public Dictionary<string, MetaTag> SubTags = new();
7860

79-
/// <summary>
80-
/// Other types or pseudo-types implemented by this type.
81-
/// </summary>
61+
/// <summary>Other types or pseudo-types implemented by this type.</summary>
8262
public MetaObjectType[] Implements = Array.Empty<MetaObjectType>();
8363

84-
/// <summary>
85-
/// Other types or pseudo-types that extend this type.
86-
/// </summary>
64+
/// <summary>Other types or pseudo-types that extend this type.</summary>
8765
public List<MetaObjectType> ExtendedBy = new();
8866

8967
/// <summary><see cref="MetaObject.ApplyValue(MetaDocs, string, string)"/></summary>

0 commit comments

Comments
 (0)