Scope ConfigReader grader to its class

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8c45529b-2515-483d-9e51-e6c0b7cb6852
This commit is contained in:
Abhitej John
2026-09-10 16:01:38 -07:00
parent e09d3aecda
commit 5535862932
+2 -1
View File
@@ -128,7 +128,8 @@ stimuli:
paths = (path for path in Path('src/Billing').rglob('*.cs')
if 'bin' not in path.parts and 'obj' not in path.parts);
text = '\n'.join(path.read_text(encoding='utf-8', errors='ignore') for path in paths);
body = text.split('class ConfigReader', 1)[1] if 'class ConfigReader' in text else '';
match = re.search(r'class\s+ConfigReader\b[^{]*\{(?P<body>.*?)\n\}', text, re.S);
body = match.group('body') if match else '';
sys.exit(0 if 'AppSettingsHelper.ParseIntSetting' in body
and 'AppSettingsHelper.ParseBoolSetting' in body
and 'TryParse' not in body else 1)"