614
615def print_usage_and_exit():
616 script_name = os.path.basename(sys.argv[0])
617 print("""Usage: %s rules <path to clang-tidy source directory with RST files>618 %s rules_fixurls <path to clang-tidy source directory with RST files>
619 %s diagnostics <path to the JSON diagnostics descriptions>
620 see the source code for inline documentation""" % (script_name, script_name, script_name))
104 line = int(elems[1].replace("\"", ""), 0)
105
106 # we are likely in presence of adress instead of line
107 if(line > 1000000):108 line = 0
109
110 severity = elems[2].replace("\"", "")
Extra parentheses in code can be removed for improved readability.
In the examples below, the first example is more readable than the second one.
Preferred:
if len(some_variable) + 1 < 1:
...
Not preferred:
if (len(some_variable) + 1) < 1:
...