Fix yaml linter and misc errors (#37444)
* Fix yaml linter
* Revert "fix cluwne pda pen slot (#35611)"
This reverts commit 66e926843f.
* More fixes
* Try again with the engine requirement removed
* Decrease number of brass sheets dropped by clockwork windoors
---------
Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -36,7 +36,9 @@ namespace Content.YAMLLinter
|
||||
{
|
||||
foreach (var errorNode in errorHashset)
|
||||
{
|
||||
Console.WriteLine($"::error file={file},line={errorNode.Node.Start.Line},col={errorNode.Node.Start.Column}::{file}({errorNode.Node.Start.Line},{errorNode.Node.Start.Column}) {errorNode.ErrorReason}");
|
||||
// TODO YAML LINTER Fix inheritance
|
||||
// If a parent/abstract prototype has na error, this will misreport the file name (but with the correct line/column).
|
||||
Console.WriteLine($"::error in {file}({errorNode.Node.Start.Line},{errorNode.Node.Start.Column}) {errorNode.ErrorReason}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,22 +145,24 @@ namespace Content.YAMLLinter
|
||||
foreach (var (key, val) in clientErrors.YamlErrors)
|
||||
{
|
||||
var newErrors = val.Where(n => n.AlwaysRelevant).ToHashSet();
|
||||
if (newErrors.Count == 0)
|
||||
continue;
|
||||
|
||||
if (yamlErrors.TryGetValue(key, out var errors))
|
||||
errors.UnionWith(val.Where(n => n.AlwaysRelevant));
|
||||
else
|
||||
yamlErrors[key] = newErrors;
|
||||
|
||||
// Include any errors that relate to client-only types
|
||||
foreach (var errorNode in val)
|
||||
{
|
||||
if (errorNode is FieldNotFoundErrorNode fieldNotFoundNode && !serverTypes.Contains(fieldNotFoundNode.FieldType.Name))
|
||||
if (errorNode is FieldNotFoundErrorNode fieldNotFoundNode
|
||||
&& !serverTypes.Contains(fieldNotFoundNode.FieldType.Name))
|
||||
{
|
||||
newErrors.Add(errorNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (newErrors.Count == 0)
|
||||
continue;
|
||||
|
||||
if (yamlErrors.TryGetValue(key, out var errors))
|
||||
errors.UnionWith(newErrors);
|
||||
else
|
||||
yamlErrors[key] = newErrors;
|
||||
}
|
||||
|
||||
// Finally, combine the prototype ID field errors.
|
||||
|
||||
Reference in New Issue
Block a user