Internals: Add some missing Python files to lint
This commit is contained in:
parent
44102de362
commit
3ab21332c9
31
Makefile.in
31
Makefile.in
|
|
@ -477,6 +477,12 @@ MAKE_FILES = \
|
||||||
src/Makefile*.in \
|
src/Makefile*.in \
|
||||||
test_regress/Makefile* \
|
test_regress/Makefile* \
|
||||||
|
|
||||||
|
# Perl programs
|
||||||
|
PERL_PROGRAMS = \
|
||||||
|
bin/redirect \
|
||||||
|
bin/verilator \
|
||||||
|
bin/verilator_coverage \
|
||||||
|
|
||||||
# Python programs, subject to format and lint
|
# Python programs, subject to format and lint
|
||||||
PY_PROGRAMS = \
|
PY_PROGRAMS = \
|
||||||
bin/verilator_ccache_report \
|
bin/verilator_ccache_report \
|
||||||
|
|
@ -484,25 +490,28 @@ PY_PROGRAMS = \
|
||||||
bin/verilator_gantt \
|
bin/verilator_gantt \
|
||||||
bin/verilator_includer \
|
bin/verilator_includer \
|
||||||
bin/verilator_profcfunc \
|
bin/verilator_profcfunc \
|
||||||
examples/json_py/vl_file_copy \
|
|
||||||
examples/json_py/vl_hier_graph \
|
|
||||||
docs/guide/conf.py \
|
|
||||||
docs/bin/vl_sphinx_extract \
|
docs/bin/vl_sphinx_extract \
|
||||||
docs/bin/vl_sphinx_fix \
|
docs/bin/vl_sphinx_fix \
|
||||||
src/astgen \
|
docs/guide/conf.py \
|
||||||
src/bisonpre \
|
examples/json_py/vl_file_copy \
|
||||||
src/config_rev \
|
examples/json_py/vl_hier_graph \
|
||||||
src/flexfix \
|
|
||||||
src/vlcovgen \
|
|
||||||
src/.gdbinit.py \
|
|
||||||
test_regress/*.py \
|
|
||||||
test_regress/t/*.pf \
|
|
||||||
nodist/clang_check_attributes \
|
nodist/clang_check_attributes \
|
||||||
nodist/dot_importer \
|
nodist/dot_importer \
|
||||||
nodist/fuzzer/actual_fail \
|
nodist/fuzzer/actual_fail \
|
||||||
nodist/fuzzer/generate_dictionary \
|
nodist/fuzzer/generate_dictionary \
|
||||||
nodist/install_test \
|
nodist/install_test \
|
||||||
|
nodist/lint_py_test_filter \
|
||||||
nodist/log_changes \
|
nodist/log_changes \
|
||||||
|
nodist/uvm_pkg_packer \
|
||||||
|
nodist/verilator_saif_diff \
|
||||||
|
src/.gdbinit.py \
|
||||||
|
src/astgen \
|
||||||
|
src/bisonpre \
|
||||||
|
src/config_rev \
|
||||||
|
src/flexfix \
|
||||||
|
src/vlcovgen \
|
||||||
|
test_regress/*.py \
|
||||||
|
test_regress/t/*.pf \
|
||||||
|
|
||||||
# Python files, subject to format but not lint
|
# Python files, subject to format but not lint
|
||||||
PY_FILES = \
|
PY_FILES = \
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# mypy: disallow-untyped-defs
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=
|
# pylint: disable=C0114,C0116
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
SUPPRESSES = [
|
SUPPRESSES = [
|
||||||
|
|
@ -18,10 +17,11 @@ SUPPRESSES = [
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
def process() -> None:
|
def process() -> None:
|
||||||
anymsg = False
|
anymsg = False
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
line = line.rstrip();
|
line = line.rstrip()
|
||||||
show = True
|
show = True
|
||||||
for msg in SUPPRESSES:
|
for msg in SUPPRESSES:
|
||||||
if msg in line:
|
if msg in line:
|
||||||
|
|
@ -34,6 +34,7 @@ def process() -> None:
|
||||||
if anymsg:
|
if anymsg:
|
||||||
sys.exit("%Error: See messages above")
|
sys.exit("%Error: See messages above")
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# mypy: disallow-untyped-defs
|
# mypy: disallow-untyped-defs
|
||||||
# pylint: disable=
|
# pylint: disable=C0114,C0116
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -12,7 +12,7 @@ import sys
|
||||||
|
|
||||||
def process() -> None:
|
def process() -> None:
|
||||||
in_header = True
|
in_header = True
|
||||||
in_backslash = False
|
in_backslash = None
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
line = line.expandtabs(tabsize=8)
|
line = line.expandtabs(tabsize=8)
|
||||||
|
|
@ -23,7 +23,6 @@ def process() -> None:
|
||||||
if in_header:
|
if in_header:
|
||||||
if re.match(r'^//', line):
|
if re.match(r'^//', line):
|
||||||
continue
|
continue
|
||||||
else:
|
|
||||||
in_header = False
|
in_header = False
|
||||||
print_header()
|
print_header()
|
||||||
in_header = False
|
in_header = False
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# pylint: disable=C0114,C0115,C0116,R0902,R0903,R0912,R0915,W0719,W0718
|
# pylint: disable=C0114,C0115,C0116,C0301,R0902,R0903,R0912,R0915,W0719,W0718
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2025 by Wilson Snyder. This program is free software; you
|
# Copyright 2025 by Wilson Snyder. This program is free software; you
|
||||||
|
|
@ -225,9 +225,11 @@ def compare_saif_contents(first_file: str, second_file: str) -> int:
|
||||||
return SUCCESS_CODE
|
return SUCCESS_CODE
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(allow_abbrev=False,
|
parser = argparse.ArgumentParser(
|
||||||
|
allow_abbrev=False,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
description="""verilator_saif_diff checks if two SAIF files are logically-identical. It returns first encountered difference as output.
|
description=
|
||||||
|
"""verilator_saif_diff checks if two SAIF files are logically-identical. It returns first encountered difference as output.
|
||||||
Run as:
|
Run as:
|
||||||
cd $VERILATOR_ROOT
|
cd $VERILATOR_ROOT
|
||||||
nodist/code_coverage --first example.saif --second other.saif""")
|
nodist/code_coverage --first example.saif --second other.saif""")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue