Fix incorrect condition for error filtering
Fixes: #87643 The original condition stopped immediately after checking for 'searchText' in the 'Message' field, resulting in premature termination of subsequent checks. This fix ensures that all relevant conditions are appropriately evaluated before determining the filtering outcome. Additionally, accompanying changes include improved code readability for better comprehension. This adjustment enhances the maintainability of the error filtering mechanism, contributing to a more robust codebase overall.
This commit is contained in:
parent
313f623b9d
commit
d81c9c32c5
1 changed files with 7 additions and 7 deletions
|
@ -308,14 +308,14 @@ namespace GodotTools.Build
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
string searchText = _searchBox.Text;
|
string searchText = _searchBox.Text;
|
||||||
if (!string.IsNullOrEmpty(searchText) &&
|
if (string.IsNullOrEmpty(searchText))
|
||||||
(!diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase) ||
|
return true;
|
||||||
!(diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)))
|
if (diagnostic.Message.Contains(searchText, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
return true;
|
||||||
return false;
|
if (diagnostic.File?.Contains(searchText, StringComparison.OrdinalIgnoreCase) ?? false)
|
||||||
}
|
return true;
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color? GetProblemItemColor(BuildDiagnostic diagnostic)
|
private Color? GetProblemItemColor(BuildDiagnostic diagnostic)
|
||||||
|
|
Loading…
Add table
Reference in a new issue