Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/+sa1143-outlet-size-chain.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The build passes again with StyleCop.Analyzers 1.3.180, whose new rule SA1143 rejected how the Hydrantenkarte laid out a conditional.
6 changes: 3 additions & 3 deletions src/FwAssist.AppLogic/Services/Map/WaterPointsGeoJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ private static bool IsOffTheMains(string? waterSource) =>
}

var match = OutletValue().Match(token);
char? size = !match.Success ? null
: match.Groups["letter"].Success ? char.ToUpperInvariant(match.Groups["letter"].Value[0])
: match.Groups["mm"].Value switch { "110" => 'A', "75" => 'B', "52" => 'C', "25" => 'D', _ => null };
char? size = !match.Success ? null :
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
match.Groups["letter"].Success ? char.ToUpperInvariant(match.Groups["letter"].Value[0]) :
match.Groups["mm"].Value switch { "110" => 'A', "75" => 'B', "52" => 'C', "25" => 'D', _ => null };
if (size is not { } s)
{
return diameters.Length > MaxLabelPartLength ? diameters[..MaxLabelPartLength] : diameters;
Expand Down