34 url = SONAR_URL + url
35 response = None
36 if log:
37 print(f"\n'{url}' response:", flush=True) 38 response = requests.get(url, timeout=60, auth=HTTPBasicAuth(SONAR_LOGIN, SONAR_PASSWORD))
39 response.raise_for_status()
40 if not response.text:
99
100@given('declared suffixes for cxx files to analyze are "{extensions}"')
101def step_impl(context, extensions):
102 assert context.profile_key != '', f"PROFILE KEY NOT FOUND: {str(context.profile_key)}"103 url = ('/api/settings/reset')
104 web_api_set(url, {'keys': 'sonar.cxx.file.suffixes'})
105 url = ('/api/settings/set')
49def before_all(context):
50 global SONAR_STARTED
51
52 print('\n\n' + 80 * '-', flush=True) 53 print('starting SonarQube ...', flush=True)
54 print(80 * '-', flush=True)
55
45def sonar_analysis_finished(logpath):
46 url = ''
47
48 print(' Read Log : ' + logpath, flush=True) 49
50 try:
51 with open(logpath, 'r', encoding='utf8') as log:
137 stdout=subprocess.PIPE,
138 check=True).stdout
139
140 print("Collecting clang checkers ...", end='')141 checker_data = collect_checkers(checkers_output)
142
143 except subprocess.CalledProcessError as cpe:
A Python syntax error is detected.