From 31fddbf9c59531ff28df7d93446e1500ce0d9d18 Mon Sep 17 00:00:00 2001 From: JWM Date: Wed, 20 Nov 2024 17:43:58 +0100 Subject: [PATCH] Use Finding class in Polyspace checker; Update test code quality reports --- src/mlx/warnings/polyspace_checker.py | 34 +- src/mlx/warnings/warnings.py | 2 + tests/test_in/polyspace_code_quality.json | 296 +++++++++--------- .../polyspace_code_quality_exclude.json | 176 +++++------ 4 files changed, 248 insertions(+), 260 deletions(-) diff --git a/src/mlx/warnings/polyspace_checker.py b/src/mlx/warnings/polyspace_checker.py index 78a98f85..952ffbbc 100644 --- a/src/mlx/warnings/polyspace_checker.py +++ b/src/mlx/warnings/polyspace_checker.py @@ -4,6 +4,7 @@ import os from string import Template +from .code_quality import Finding from .exceptions import WarningsConfigError from .warnings_checker import WarningsChecker @@ -215,44 +216,29 @@ def add_code_quality_finding(self, row): Args: row (dict): The row of the warning with the corresponding colomn names ''' - finding = { - "severity": "major", - "location": { - "path": self.cq_default_path, - "positions": { - "begin": { - "line": 1, - "column": 1 - } - } - } - } - try: description = self.cq_description_template.substitute(os.environ, **row) except KeyError as err: raise WarningsConfigError(f"Failed to find environment variable from configuration value " f"'cq_description_template': {err}") from err + finding = Finding(description) # Attention to bug finder: items have color red for impact: high, medium and low. if row["information"].lower() in self.code_quality_severity.keys(): - finding["severity"] = self.code_quality_severity[row["information"].lower()] + finding.severity = self.code_quality_severity[row["information"].lower()] elif row["color"].lower() in self.code_quality_severity.keys(): - finding["severity"] = self.code_quality_severity[row["color"].lower()] + finding.severity = self.code_quality_severity[row["color"].lower()] else: - finding["severity"] = "info" + finding.severity = "info" if row["file"]: - finding["location"]["path"] = row["file"] + finding.path = row["file"] if "line" in row: - finding["location"]["positions"]["begin"]["line"] = int(row["line"]) + finding.line = int(row["line"]) if "col" in row: - finding["location"]["positions"]["begin"]["column"] = int(row["col"]) - finding["description"] = description - exclude = ("new", "status", "severity", "comment", "key") - row_without_key = [value for key, value in row.items() if key not in exclude] - finding["fingerprint"] = hashlib.md5(str(row_without_key).encode('utf-8')).hexdigest() - self.cq_findings.append(finding) + finding.column = int(row["col"]) + + self.cq_findings.append(finding.to_dict()) def check(self, content): ''' diff --git a/src/mlx/warnings/warnings.py b/src/mlx/warnings/warnings.py index b8c6ec12..ad1991b2 100644 --- a/src/mlx/warnings/warnings.py +++ b/src/mlx/warnings/warnings.py @@ -12,6 +12,7 @@ from ruamel.yaml import YAML +from .code_quality import Finding from .exceptions import WarningsConfigError from .junit_checker import JUnitChecker from .regex_checker import CoverityChecker, DoxyChecker, SphinxChecker, XMLRunnerChecker @@ -277,6 +278,7 @@ def warnings_wrapper(args): help='Possible not-used flags from above are considered as command flags') args = parser.parse_args(args) + Finding.fingerprints = {} # Make sure the class variable is an empty dict code_quality_enabled = bool(args.code_quality) # Read config file if args.configfile is not None: diff --git a/tests/test_in/polyspace_code_quality.json b/tests/test_in/polyspace_code_quality.json index f25d5078..29a8a494 100644 --- a/tests/test_in/polyspace_code_quality.json +++ b/tests/test_in/polyspace_code_quality.json @@ -1,6 +1,7 @@ [ { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -10,11 +11,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "07bf7b7981eea1d6f5a95d69c9b0d05d" + "fingerprint": "5b0d2bef143e340c629b1704b3322538" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -24,11 +25,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "1e18bf5563037b1193f838617b4be1af" + "fingerprint": "0d49ff422c3685a0891eda36d4ea7d9b" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.h", "positions": { @@ -38,11 +39,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "839e418eda6b091c2413aa0722796fb9" + "fingerprint": "74e171f2f92bd5acc546421ee7c27636" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.h", "positions": { @@ -52,11 +53,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "1961351c7f028d02202f915a6d36c658" + "fingerprint": "27b1ad917684a8f217ad44e30793fc70" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -66,11 +67,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "187908fe3b88f8c6e304bd5aebd2fa7b" + "fingerprint": "e749f0ee41d56a130d4bf696b8bf85e9" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -80,11 +81,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "872e350adf6f6de0e3d530eef532876a" + "fingerprint": "665c4b7b049eec5c2953bb9be2cc2731" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -94,11 +95,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "0c01c54227a1a7529293c8d814d55bce" + "fingerprint": "e8f4c1c74aab1c90d3a04f2363dcb31a" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -108,11 +109,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "ed5eb28ed0310f70d012bb13cf95f794" + "fingerprint": "032ad18cc7ee1a26a119121f41a24ece" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -122,11 +123,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "e790d2d7f4e8fc2fb244ab0f74beca64" + "fingerprint": "0121792fc8a0ab5136efafa5b3ff22eb" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -136,11 +137,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "71afd01823400c4504d8d0fb125fba4b" + "fingerprint": "fc80aadbe343e7e894682b361ee3c388" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -150,11 +151,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "c94b3a08f0577dd14445bb53bb8f810f" + "fingerprint": "7bb064028e42cbcebb0fd583aa1dc5c7" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -164,11 +165,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "863424d52785aa5300b20cf60b9ada57" + "fingerprint": "d775f0821051899a776b16ea6c27e6a0" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -178,11 +179,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "4073ecbcb0efc2c87ae28c56e40672a9" + "fingerprint": "a4c66925580d178c6e6897767f040714" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -192,11 +193,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "9cf71035380a184965966250b7cc78c7" + "fingerprint": "f4263c02bd5b9e172c9221d2e6bad767" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -206,11 +207,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "b277b928287c7dd51390ae8079db12f9" + "fingerprint": "0e0b585a9464084130ec205e724bf6cb" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -220,11 +221,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "591d152475bd60b07e0e7f00ec000229" + "fingerprint": "75b3f63a9680afdda576d594ef679c77" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -234,11 +235,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "df6c0d8aa86f4d937c674635753a5f46" + "fingerprint": "5e78269181e578d81898273663d11154" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -248,11 +249,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "4a7e2e12cae10b03859b3b0e0a592b38" + "fingerprint": "9f0db83026a8d35faf547e01a4e4cf38" }, { "severity": "major", + "description": "Polyspace: Overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -262,11 +263,11 @@ } } }, - "description": "Polyspace: Overflow", - "fingerprint": "ac3cbdf7ee478c09ddf35b1eec469211" + "fingerprint": "9a3697faef437ec3bcdaf1c34912aad5" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -276,11 +277,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "f4386da30a89e4923f3ab11f0300a5b1" + "fingerprint": "382a120a7f45cdcbeec5117361965a68" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -290,11 +291,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "d95f456b2787e9043443e73f3fc58aad" + "fingerprint": "ee2e167f2edbcf98b180304c0e5cde5f" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -304,11 +305,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "507064b5f812014fa76db4d182f10ef9" + "fingerprint": "cffef099a70ee703d85318b58aaee3ae" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -318,11 +319,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "8fbf02530e02a7a59fb7983f5f4b6730" + "fingerprint": "21c436bad7047cfb5605797b4dd2e57f" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -332,11 +333,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "ff3442b2b4d93ba99df38dab2de5fa58" + "fingerprint": "ca87b7b1c876c09261b84d7a46331890" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -346,11 +347,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "d81f5651853816b9307a1e708c602f45" + "fingerprint": "ce96768fc2d1ec79a1187ed7a7240d46" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -360,11 +361,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "aeaa0e8647882ca64437f80574ff6f43" + "fingerprint": "12b0f09fa6a3a951688a1da7df58f5f6" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -374,11 +375,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "c97c42c094fb4136830063eec4efba5a" + "fingerprint": "44840dd6509374e45d3e4e9f6d1a791b" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -388,11 +389,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "2b34873a1dec1df49fba7e4efcb8ed44" + "fingerprint": "9b97b406a7decd5738144269e0708692" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -402,11 +403,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "c0772453dfe0d42bc001f4364fe81aa5" + "fingerprint": "638b9256aca9f3517e67e90c11063616" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -416,11 +417,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "46d63703689a4e9affa63d753e731bb4" + "fingerprint": "98068371b4c1f2efc59bd12de75a83d9" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -430,11 +431,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "8ad2982125a25d4080d9cf1bffbf35f3" + "fingerprint": "229bd0263d410b0af1cf419502e6a507" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -444,11 +445,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "24e1d7c73a8a75e4aae91535d3107bdf" + "fingerprint": "f9abbc4816c1f64329b71fe23c8d7940" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -458,11 +459,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "77bba0241d8b0ab1416e5a40019fe569" + "fingerprint": "ca86994653cbd6e2bd0a21a315684e25" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -472,11 +473,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "000c466b7c9f3e654a9451b34d3ca2b9" + "fingerprint": "18ee6acc431c871dfe31aa8c5348316c" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -486,11 +487,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "08bd07ff0d862e7d6838f18ec9770d71" + "fingerprint": "4d62c97a5a6ed9a41b9af832ec0d4be3" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -500,11 +501,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "b4288f0f2c21f3b74ff67ca44c1770f3" + "fingerprint": "506fa8b19ce9918b2dcee7bfcda2ac82" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -514,11 +515,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "0e80b89973f7ce6ee7e0b7019f560203" + "fingerprint": "7fa6a9325e456eb1058718476beae0b2" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -528,11 +529,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "348768724ae6b4582714b7cba122cccf" + "fingerprint": "59cfffe68c18dbcd136a6a16ee2bbbb5" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -542,11 +543,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "88de3b477121b6d96b1b461858bef89a" + "fingerprint": "d0bfe2255eff847bae72a167313fd2a5" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -556,11 +557,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "1fcccf3c922c431c7fd13e2d543cb93b" + "fingerprint": "8585e6d19f4be1e8d61c97492306077a" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -570,11 +571,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "48047596758b4de4642eb6a8d4187636" + "fingerprint": "28be3be6683be483250b4d59ef3cc16d" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -584,11 +585,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "beff306f5b48db5b53e825c93bcf99e8" + "fingerprint": "8be85b513aba167a92c30b337451742c" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -598,11 +599,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "e704200bcf976066d129699ed18bca5a" + "fingerprint": "591dad475acb333461a76cc67ae00f51" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -612,11 +613,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "847843859724033ca453baa07514d2ab" + "fingerprint": "bb70a1151afad3baa3f91b11f97d8fa3" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -626,11 +627,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "e44901228d9133623c9213cc2de0fa03" + "fingerprint": "e6a1a28fcb8acb2f3365f60adac9e3e7" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -640,11 +641,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "e1a9645dbe789ab9067ab4841e00e757" + "fingerprint": "a51217d802fc9e5de843c63141db4f44" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -654,11 +655,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "904db74d6533868571599af54a576e6f" + "fingerprint": "0d8ac421ed864cc9d7ddd83f00bf3f52" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -668,11 +669,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "0ae50553c92012904994af8fc028daf6" + "fingerprint": "ecfecca0bea5d7910d370cb8f0189b42" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -682,11 +683,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "a7f1fe9a9eef30de1c690da89cd1df6c" + "fingerprint": "361b72a0f44c09132dfe74b4e1686562" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -696,11 +697,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "6dd5de4df76e03f814ffa3737fed8472" + "fingerprint": "33b0de8008338b1425ffc60287deffcb" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -710,11 +711,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "954a867487289986ec5376f2e3153322" + "fingerprint": "93e43e05f593bea4d4d51a2c40366de4" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -724,11 +725,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "b136cd326ac8fc169cdb853dff7629f6" + "fingerprint": "9f1d8d3cb0970aba4bc8014c6b03dad2" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -738,11 +739,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "1ec7c2c9d9590d54896c21a422fedc9f" + "fingerprint": "e0320f565a04d8a76a9149937dd88a51" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -752,11 +753,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "8daff69c6394864723ef2270e08df5c6" + "fingerprint": "bd6fd417f4b5fbe497e103eb5e0640ce" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -766,11 +767,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "09a0975abac18772472f95038c66c3ac" + "fingerprint": "6926e5801c6fbcf2c5097df2e058fe3d" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -780,11 +781,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "7e32a22a66763d665e954d5840a4ce4f" + "fingerprint": "344fc7a680122a63080f122b9365910c" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -794,11 +795,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "7f7694b77bfa1f2f31c819ea3bbac911" + "fingerprint": "19b12728d5681c134c1e89fd5ccf6d0e" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -808,11 +809,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "7ac65d0792b130472117eb7845b47c78" + "fingerprint": "fdf4cbad36c706a8007795370a78ee6e" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -822,11 +823,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "25f58aa6ae27914be357df591b857c12" + "fingerprint": "01d00ab7be7bd88cbed8efdc869ad2bb" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -836,11 +837,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "f851f1962ae59883cabeda61613d989a" + "fingerprint": "d12420f28bc3b5dff820fc7d28753136" }, { "severity": "critical", + "description": "Polyspace: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -850,11 +851,11 @@ } } }, - "description": "Polyspace: Data race", - "fingerprint": "f610cc31147b59a271436e925845247d" + "fingerprint": "48a92e97833e72b5eec5be985a4b6423" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -864,11 +865,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "33e52e2708064ec03c02f4d5fea9177d" + "fingerprint": "eefa825d3c16acc3ad71f32d19576012" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -878,11 +879,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "96c5ccd9570a83ad30a80aec37354a25" + "fingerprint": "5bb1f0dca3fa13ef4165d0a4b784eec3" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -892,11 +893,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "761c46473d2baba43807c2436af41516" + "fingerprint": "859cb9236282bb6ef524cb5539ec5e31" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -906,11 +907,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "aed8d3bdc16ae565024bf537e3fb309e" + "fingerprint": "22c0e8ab9c611b8823cf5d21ba36edd6" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -920,11 +921,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "971b4e1ccd3512a0fc36cdcda90b6b72" + "fingerprint": "f766c4f9940d1efef8a238e5c79906dd" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -934,11 +935,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "ec35a2ca1a81a27f7954f417129c0d08" + "fingerprint": "ecfeb007c472ddfd15ed7f3f0148b92c" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -948,11 +949,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "ed87e9679203350ce4b74e5872bbb6a3" + "fingerprint": "0dba0185c7ee7d9e179045298b39cca2" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -962,11 +963,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "515eddb9bc378eed8762559d6608a181" + "fingerprint": "ea51d0f24965712bef29f7e8ebead82d" }, { "severity": "major", + "description": "Polyspace: Sign change integer conversion overflow", "location": { "path": "dummy_file_name.c", "positions": { @@ -976,11 +977,11 @@ } } }, - "description": "Polyspace: Sign change integer conversion overflow", - "fingerprint": "d02eea0a48ec32debb50e4fe0a1038f4" + "fingerprint": "55113c9f4327039bd2d36d66b2526021" }, { "severity": "minor", + "description": "Polyspace: Dead code", "location": { "path": "dummy_file_name.c", "positions": { @@ -990,11 +991,11 @@ } } }, - "description": "Polyspace: Dead code", - "fingerprint": "4fc4aa18191faedbcd3158961ab32e29" + "fingerprint": "42e7906fee2d6fb1da1fa7204dffb985" }, { "severity": "minor", + "description": "Polyspace: Dead code", "location": { "path": "dummy_file_name.c", "positions": { @@ -1004,11 +1005,11 @@ } } }, - "description": "Polyspace: Dead code", - "fingerprint": "b602a67f00eaee672407241d386c2cda" + "fingerprint": "bb5dab56fea1e09c1c4b3f3dbfb94f73" }, { "severity": "minor", + "description": "Polyspace: Dead code", "location": { "path": "dummy_file_name.c", "positions": { @@ -1018,11 +1019,11 @@ } } }, - "description": "Polyspace: Dead code", - "fingerprint": "25b08a6b66361fa8f0c988d4831339ca" + "fingerprint": "0b6e94d73c02c57d8365d2ae17aeb84d" }, { "severity": "minor", + "description": "Polyspace: Dead code", "location": { "path": "dummy_file_name.c", "positions": { @@ -1032,7 +1033,6 @@ } } }, - "description": "Polyspace: Dead code", - "fingerprint": "de0523fb6c1ad76ccdcb524c7185648b" + "fingerprint": "10cda2122bafa56e9bbebf6fb3a49a2d" } ] diff --git a/tests/test_in/polyspace_code_quality_exclude.json b/tests/test_in/polyspace_code_quality_exclude.json index 66d448b2..0da26405 100644 --- a/tests/test_in/polyspace_code_quality_exclude.json +++ b/tests/test_in/polyspace_code_quality_exclude.json @@ -1,6 +1,7 @@ [ { "severity": "major", + "description": "12345 Run-time Check: Overflow", "location": { "path": "dummy_file_name.h", "positions": { @@ -10,11 +11,11 @@ } } }, - "description": "12345 Run-time Check: Overflow", - "fingerprint": "839e418eda6b091c2413aa0722796fb9" + "fingerprint": "122ecb35b9200b91d54483901909c848" }, { "severity": "major", + "description": "12345 Run-time Check: Overflow", "location": { "path": "dummy_file_name.h", "positions": { @@ -24,11 +25,11 @@ } } }, - "description": "12345 Run-time Check: Overflow", - "fingerprint": "1961351c7f028d02202f915a6d36c658" + "fingerprint": "bfa559b2a0fa5ade43ff6a5c39111ac7" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -38,11 +39,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "f4386da30a89e4923f3ab11f0300a5b1" + "fingerprint": "d06f0a8b7cadfe5aae99e0037d2ad02f" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -52,11 +53,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "d95f456b2787e9043443e73f3fc58aad" + "fingerprint": "405bb0ce3c75f40e566a94d4fcf9c962" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -66,11 +67,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "507064b5f812014fa76db4d182f10ef9" + "fingerprint": "9038ff941a14172648bbb5f77ac0332b" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -80,11 +81,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "8fbf02530e02a7a59fb7983f5f4b6730" + "fingerprint": "8f88c1753308517b6443b04ae44dc099" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -94,11 +95,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "ff3442b2b4d93ba99df38dab2de5fa58" + "fingerprint": "67eb7f85cb446a59a5cde52c38f9bc25" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -108,11 +109,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "d81f5651853816b9307a1e708c602f45" + "fingerprint": "fc494c5da2b169503226280bed437afe" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -122,11 +123,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "aeaa0e8647882ca64437f80574ff6f43" + "fingerprint": "cb493ae3841474886840e4b4ac067171" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -136,11 +137,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "c97c42c094fb4136830063eec4efba5a" + "fingerprint": "a48fb029eb7f486aa6f2235f598698fd" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -150,11 +151,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "2b34873a1dec1df49fba7e4efcb8ed44" + "fingerprint": "9854126dfbf667b3cfefccf72a4c2518" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -164,11 +165,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "c0772453dfe0d42bc001f4364fe81aa5" + "fingerprint": "f026f6af789a0e30dd6dd98195e9869a" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -178,11 +179,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "46d63703689a4e9affa63d753e731bb4" + "fingerprint": "334bbee14583a3c70de5803e481f63d9" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -192,11 +193,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "8ad2982125a25d4080d9cf1bffbf35f3" + "fingerprint": "4707452de6d95f470d3f7a86e5772d4d" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -206,11 +207,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "24e1d7c73a8a75e4aae91535d3107bdf" + "fingerprint": "669be32a54912b8297d76aa8eb767bba" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -220,11 +221,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "77bba0241d8b0ab1416e5a40019fe569" + "fingerprint": "3728f98d4ad581db5d6d5de043d80b04" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -234,11 +235,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "000c466b7c9f3e654a9451b34d3ca2b9" + "fingerprint": "7c660f9e0f14fead09b0397ca2acd81a" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -248,11 +249,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "08bd07ff0d862e7d6838f18ec9770d71" + "fingerprint": "26b17531deb8c583d2eb5a16da425f8e" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -262,11 +263,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "b4288f0f2c21f3b74ff67ca44c1770f3" + "fingerprint": "bf71042969e7b96fa1b21079f8c31395" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -276,11 +277,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "0e80b89973f7ce6ee7e0b7019f560203" + "fingerprint": "f45770faf0e5cc8220489d6cc2e62737" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -290,11 +291,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "348768724ae6b4582714b7cba122cccf" + "fingerprint": "78440805017f37372cdbb0851c3cfcca" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -304,11 +305,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "88de3b477121b6d96b1b461858bef89a" + "fingerprint": "f8a86a99fc1adba9fbb07c8e9b68b79c" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -318,11 +319,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "1fcccf3c922c431c7fd13e2d543cb93b" + "fingerprint": "0d97a1d886982edd59bbf7f10fbdfc24" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -332,11 +333,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "48047596758b4de4642eb6a8d4187636" + "fingerprint": "bdf2511fe1597205c379b5af82713cfe" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -346,11 +347,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "beff306f5b48db5b53e825c93bcf99e8" + "fingerprint": "0fa76bb815a6fa3aca64f5c48f699103" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -360,11 +361,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "e704200bcf976066d129699ed18bca5a" + "fingerprint": "c131d8c8bc6290127971feaf7c7a03f9" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -374,11 +375,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "847843859724033ca453baa07514d2ab" + "fingerprint": "6bcccdbb84dc9494e37fb5382e762930" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -388,11 +389,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "e44901228d9133623c9213cc2de0fa03" + "fingerprint": "08b5bcd24716127672b423948d246a79" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -402,11 +403,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "e1a9645dbe789ab9067ab4841e00e757" + "fingerprint": "6181bb25765b9f4cc9bb472753395f8b" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -416,11 +417,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "904db74d6533868571599af54a576e6f" + "fingerprint": "fba38b38ef359f162d0fdbbca6a2b85b" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -430,11 +431,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "0ae50553c92012904994af8fc028daf6" + "fingerprint": "fa06c8cb83debf6f41dc568a617e4ae8" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -444,11 +445,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "a7f1fe9a9eef30de1c690da89cd1df6c" + "fingerprint": "386412d3fb3ece2810a7655018ff71e3" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -458,11 +459,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "6dd5de4df76e03f814ffa3737fed8472" + "fingerprint": "1ed1653dac0abc0c883375f93094ee07" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -472,11 +473,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "954a867487289986ec5376f2e3153322" + "fingerprint": "863ae8436f16a7b38f8ff128896e19c6" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -486,11 +487,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "b136cd326ac8fc169cdb853dff7629f6" + "fingerprint": "81444065299446274cb5cbcf0a3b4e7b" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -500,11 +501,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "1ec7c2c9d9590d54896c21a422fedc9f" + "fingerprint": "72bdc0784fb80dcb68fde8a39f780679" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -514,11 +515,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "8daff69c6394864723ef2270e08df5c6" + "fingerprint": "f0b880a4decc5b519824b56f25ccab4c" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -528,11 +529,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "09a0975abac18772472f95038c66c3ac" + "fingerprint": "30c70dfeabf40e76e8717a7bc23d5180" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -542,11 +543,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "7e32a22a66763d665e954d5840a4ce4f" + "fingerprint": "bf3332c2a47e7445664e8eed086e562e" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -556,11 +557,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "7f7694b77bfa1f2f31c819ea3bbac911" + "fingerprint": "d5420278d788d3fe6507be1eebc26bea" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -570,11 +571,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "7ac65d0792b130472117eb7845b47c78" + "fingerprint": "97b4a6b5258d0c30af08487c94866119" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.h", "positions": { @@ -584,11 +585,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "25f58aa6ae27914be357df591b857c12" + "fingerprint": "e888cfa5101c241580610779f4679f20" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -598,11 +599,11 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "f851f1962ae59883cabeda61613d989a" + "fingerprint": "196d016ae2b75535590d8b895341b667" }, { "severity": "critical", + "description": "12345 Defect: Data race", "location": { "path": "dummy_file_name.c", "positions": { @@ -612,7 +613,6 @@ } } }, - "description": "12345 Defect: Data race", - "fingerprint": "f610cc31147b59a271436e925845247d" + "fingerprint": "874cc7f5ff95f687143afdff125fe2f8" } ]