diff --git a/changelog.d/+sa1143-outlet-size-chain.fixed.md b/changelog.d/+sa1143-outlet-size-chain.fixed.md new file mode 100644 index 0000000..5f2422b --- /dev/null +++ b/changelog.d/+sa1143-outlet-size-chain.fixed.md @@ -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. diff --git a/src/FwAssist.AppLogic/Services/Map/WaterPointsGeoJson.cs b/src/FwAssist.AppLogic/Services/Map/WaterPointsGeoJson.cs index 5627f95..8cd4203 100644 --- a/src/FwAssist.AppLogic/Services/Map/WaterPointsGeoJson.cs +++ b/src/FwAssist.AppLogic/Services/Map/WaterPointsGeoJson.cs @@ -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 : + 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;