Skip to content

Commit

Permalink
Sonar recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
killij committed Oct 31, 2023
1 parent a78b3c1 commit 645f154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private IEnumerable<string> GetQueryTags(int[] tags)
return _allTags;
}

if (tags.Any(x => x < 0 || x >= _tagInfos.Count))
if (Array.Exists(tags, x => x < 0 || x >= _tagInfos.Count))
{
_logger.LogWarning("Passed tag values do not match known values: {Passed Values}", tags);
return Array.Empty<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task<IEnumerable<TagInfo>> GetSearchTagsAsync()
var allTags = await _cpdClient.GetTags();

var tags = allTags
.Where(x => _tagPrefixes.Any(prefix => x.Name.StartsWith($"{prefix}:")))
.Where(x => Array.Exists(_tagPrefixes, prefix => x.Name.StartsWith($"{prefix}:")))
.Select(x =>
{
var i = x.Name.IndexOf(':');
Expand Down

0 comments on commit 645f154

Please sign in to comment.