From 5beb81ff18cbf0de7593f4fedf453b77cf0c399b Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 25 May 2021 18:31:08 +0100 Subject: [PATCH] include correct character in message --- add-fix-info.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/add-fix-info.py b/add-fix-info.py index 1acf1bd41..15e36be0f 100644 --- a/add-fix-info.py +++ b/add-fix-info.py @@ -1,5 +1,5 @@ import json -import os +import re import sys def main(): @@ -19,11 +19,12 @@ def main(): print('Adding fix for js/regex/duplicate-in-character-class') + repeatedCharacter = re.search("^Character '(.)'", result['message']['text']).group(1) resultPhysicalLocation = result['locations'][0]['physicalLocation'] result['fixes'] = [ { "description": { - "text": "Remove repeated ':' from character class" + "text": "Remove repeated '" + repeatedCharacter + "' from character class" }, "artifactChanges": [ {