mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Lint code in doc directory
Adjust ignore lists of linters to check more code.
(cherry picked from commit 0fb7403ef4)
This commit is contained in:
parent
68b9928f0f
commit
a2cdf5d8cd
2 changed files with 17 additions and 10 deletions
|
|
@ -355,7 +355,7 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
|
|||
)
|
||||
|
||||
def get_statement_name(self, signature):
|
||||
return "{}.{}.{}".format(domainname, "statement", signature)
|
||||
return f"{domainname}.statement.{signature}"
|
||||
|
||||
def add_statement(self, signature, tags, short, short_node, lineno):
|
||||
"""
|
||||
|
|
@ -363,7 +363,7 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
|
|||
No visible effect.
|
||||
"""
|
||||
name = self.get_statement_name(signature)
|
||||
anchor = "{}-statement-{}".format(domainname, signature)
|
||||
anchor = f"{domainname}-statement-{signature}"
|
||||
|
||||
new = {
|
||||
"tags": tags,
|
||||
|
|
|
|||
|
|
@ -38,21 +38,27 @@ disable = [
|
|||
[tool.pylint.main]
|
||||
ignore-paths = [
|
||||
".git",
|
||||
# Temporary directories created by the system test runner
|
||||
# (see bin/tests/system/conftest.py:system_test_dir)
|
||||
"bin/tests/system/.*_tmp_.*/",
|
||||
"bin/tests/system/vulture_ignore_list.py",
|
||||
"contrib",
|
||||
"dangerfile.py",
|
||||
"doc",
|
||||
"doc/arm/conf.py",
|
||||
"doc/man/conf.py",
|
||||
]
|
||||
ignore-patterns = [
|
||||
"^.*_tmp_.*\\.py$",
|
||||
|
||||
# Both `init-hook` and `source-roots` are needed to avoid import errors,
|
||||
# enable plugin loading and calling pylint from CI as `pylint $(git ls-files '*.py')`
|
||||
init-hook = "import sys; sys.path.extend(('bin/tests/system', 'doc/misc', 'doc/arm/_ext'));"
|
||||
source-roots = [
|
||||
"bin/tests/system",
|
||||
"doc/misc",
|
||||
"doc/arm/_ext",
|
||||
]
|
||||
init-hook = "import sys; sys.path.append('bin/tests/system')"
|
||||
load-plugins = [
|
||||
"re_compile_checker",
|
||||
]
|
||||
source-roots = [
|
||||
"bin/tests/system/",
|
||||
]
|
||||
|
||||
[tool.vulture]
|
||||
paths = [
|
||||
|
|
@ -92,5 +98,6 @@ extend-exclude = [
|
|||
"bin/tests/system/vulture_ignore_list.py",
|
||||
"contrib",
|
||||
"dangerfile.py",
|
||||
"doc",
|
||||
"doc/arm/conf.py",
|
||||
"doc/man/conf.py",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue