From 55d0248d021e3bd6407ef5c91437052800c8f0a2 Mon Sep 17 00:00:00 2001 From: mpenning Date: Sun, 15 Oct 2023 17:58:52 -0500 Subject: [PATCH] Add SonarCloud exceptions --- tests/test_Ccp_Util.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test_Ccp_Util.py b/tests/test_Ccp_Util.py index b41b3e03..6e07821e 100755 --- a/tests/test_Ccp_Util.py +++ b/tests/test_Ccp_Util.py @@ -21,6 +21,19 @@ If you need to contact the author, you can do so by emailing: mike [~at~] pennington [/dot\] net """ +############################################################################## +# Disable SonarCloud warnings in this file +# - S1192: Define a constant instead of duplicating this literal +# - S1313: Disable alerts on magic IPv4 / IPv6 addresses +# - S5843: Avoid regex complexity +# - S5852: Slow regex are security-sensitive +# - S6395: Unwrap this unnecessarily grouped regex subpattern. +############################################################################## +#pragma warning disable S1192 +#pragma warning disable S1313 +#pragma warning disable S5843 +#pragma warning disable S5852 +#pragma warning disable S6395 import sys @@ -886,3 +899,9 @@ def test_CiscoRange_contains(): assert isinstance(uut_str, str) # Ethernet1/5 is in CiscoRange("Ethernet1/1-20")... assert "Ethernet1/5" in CiscoRange(uut_str) + +#pragma warning restore S1192 +#pragma warning restore S1313 +#pragma warning restore S5843 +#pragma warning restore S5852 +#pragma warning restore S6395