Примеры ошибок, обнаруженных с помощью диагностики V3191
V3191. Iteration through collection makes no sense because it is always empty.
S&Box
V3191 Iteration through the 'results' collection makes no sense because it is always empty. ConVarSystem.AutoComplete.cs 23
public static ConCmdAttribute.AutoCompleteResult[]
GetAutoComplete(....)
{
var parts = partial.SplitQuotesStrings();
List<ConCmdAttribute.AutoCompleteResult> results = new();
// if we have more than one part, complete a specific command
if ( parts.Length > 1 )
{
if ( !Members.TryGetValue( parts[0], out var command )
return Array
.Empty<ConCmdAttribute.AutoCompleteResult>();
//results.Add( new ConCmd.AutoCompleteResult
// { Command = command.Name, Description = command.Help } );
// TODO - dig into it for auto complete
return results.Take( count ).ToArray();
}