Skip to content

Commit 8c900e5

Browse files
committed
scriptchecker cleaning
1 parent 48f1076 commit 8c900e5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

SharpDenizenTools/ScriptAnalysis/ScriptChecker.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public ScriptChecker(string script)
198198
/// <param name="message">The warning message.</param>
199199
/// <param name="start">The starting character index.</param>
200200
/// <param name="end">The ending character index.</param>
201-
public void Warn(List<ScriptWarning> warnType, int line, string key, string message, int start, int end)
201+
public static void Warn(List<ScriptWarning> warnType, int line, string key, string message, int start, int end)
202202
{
203203
foreach (ScriptWarning warning in warnType)
204204
{
@@ -257,18 +257,18 @@ public string CleanScriptForYAMLProcessing()
257257
{
258258
int dashIndex = Lines[i].IndexOf('-');
259259
result.Append(Lines[i].Substring(0, dashIndex + 1)).Append(" ^1^");
260-
result.Append(Lines[i][(dashIndex + 1)..].Replace(": ", "<&co>").Replace("#", "<&ns>")).Append("\n");
260+
result.Append(Lines[i][(dashIndex + 1)..].Replace(": ", "<&co>").Replace("#", "<&ns>")).Append('\n');
261261
}
262262
else if (line.EndsWith(":") && !line.StartsWith("-"))
263263
{
264-
result.Append(Lines[i].Replace("*", "asterisk").Replace(".", "dot")).Append("\n");
264+
result.Append(Lines[i].Replace("*", "asterisk").Replace(".", "dot")).Append('\n');
265265
}
266266
else
267267
{
268-
result.Append(Lines[i]).Append("\n");
268+
result.Append(Lines[i]).Append('\n');
269269
}
270270
}
271-
result.Append("\n");
271+
result.Append('\n');
272272
return result.ToString();
273273
}
274274

@@ -1331,7 +1331,7 @@ public static string SeparateSwitches(string eventLine, out List<KeyValuePair<st
13311331
}
13321332
else
13331333
{
1334-
output.Append(part).Append(" ");
1334+
output.Append(part).Append(' ');
13351335
}
13361336
}
13371337
return output.ToString().Trim();
@@ -1347,7 +1347,7 @@ public static string SeparateSwitches(string eventLine, out List<KeyValuePair<st
13471347
/// </summary>
13481348
/// <param name="line">The line to check.</param>
13491349
/// <returns>The match range, or null.</returns>
1350-
public Range? ContainsObjectNotation(string line)
1350+
public static Range? ContainsObjectNotation(string line)
13511351
{
13521352
int first = line.Length;
13531353
int last = -1;
@@ -1608,7 +1608,7 @@ public Dictionary<LineTrackedString, object> GatherActualContainers()
16081608
/// <summary>
16091609
/// Helper method to determine whether a section key that looks like it might have been meant as a command should actually show a warning or not.
16101610
/// </summary>
1611-
public bool CanWarnAboutCommandMissingDash(string[] args, Dictionary<LineTrackedString, object> currentRootSection)
1611+
public static bool CanWarnAboutCommandMissingDash(string[] args, Dictionary<LineTrackedString, object> currentRootSection)
16121612
{
16131613
string cmdName = args[0].ToLowerFast();
16141614
if (!(args.Length == 1 ? CommandsWithColonsButNoArguments : CommandsWithColonsAndArguments).Contains(cmdName))

0 commit comments

Comments
 (0)