SonarOpenCommunity / sonar-cxx

At least two spaces before inline comment FLK-E261
Style
Minor
6 months ago3 years old
at least two spaces before inline comment
558            et.SubElement(rule, 'description').append(CDATA(rule_description))
559            if rule_severity != 'MAJOR': # MAJOR is the default
560                et.SubElement(rule, 'severity').text = rule_severity
561            if rule_type != 'CODE_SMELL': # CODE_SMELL is the default562                et.SubElement(rule, 'type').text = rule_type
563            if rule_severity != 'INFO':
564                et.SubElement(rule, 'remediationFunction').text = 'CONSTANT_ISSUE'
at least two spaces before inline comment
556            et.SubElement(rule, 'key').text = rule_key
557            et.SubElement(rule, 'name').text = rule_name
558            et.SubElement(rule, 'description').append(CDATA(rule_description))
559            if rule_severity != 'MAJOR': # MAJOR is the default560                et.SubElement(rule, 'severity').text = rule_severity
561            if rule_type != 'CODE_SMELL': # CODE_SMELL is the default
562                et.SubElement(rule, 'type').text = rule_type
at least two spaces before inline comment
270
271def is_webui_up():
272    try:
273        response = web_api_get('/api/system/status', log=False) # debug log=True274        status = response.json()['status']
275        print(status + ' ', end='', flush=True)
276        return status == 'UP'
at least two spaces before inline comment
 68            break
 69
 70        time.sleep(1)
 71        response = web_api_get(url, log=False) # debug log=True 72        if not response.text:
 73            print('     CURRENT STATUS : no response', flush=True)
 74            continue
at least two spaces before inline comment
409    if args.match_rules:
410        parser.match(args.match_rules)
411    parser.print_grammar()
412    if args.verify_rules: # verify rules413        parser.verify_rules()
414
415    return 0