mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Log ignored warning messages as info
This commit is contained in:
parent
77da1c1b01
commit
4d9749c5ba
3 changed files with 7 additions and 6 deletions
|
|
@ -3,6 +3,7 @@
|
|||
Changes:
|
||||
- Minimum Python version required is 3.8
|
||||
- HTTP redirect causes a warning, http-redirected
|
||||
- Ignored warning messages are logged as information
|
||||
|
||||
|
||||
10.2.1 (released 05.12.2022)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ filtering
|
|||
Command line option: :option:`--ignore-url`
|
||||
**ignorewarnings=**\ *NAME*\ [**,**\ *NAME*...]
|
||||
Ignore the comma-separated list of warnings. See `WARNINGS`_ for
|
||||
the list of supported warnings.
|
||||
the list of supported warnings. Messages are logged as information.
|
||||
Command line option: none
|
||||
**internlinks=**\ *REGEX*
|
||||
Regular expression to add more URLs recognized as internal links.
|
||||
|
|
|
|||
|
|
@ -384,11 +384,11 @@ class UrlBase:
|
|||
Add a warning string.
|
||||
"""
|
||||
item = (tag, s)
|
||||
if (
|
||||
item not in self.warnings
|
||||
and tag not in self.aggregate.config["ignorewarnings"]
|
||||
):
|
||||
self.warnings.append(item)
|
||||
if item not in self.warnings:
|
||||
if tag in self.aggregate.config["ignorewarnings"]:
|
||||
self.add_info(s)
|
||||
else:
|
||||
self.warnings.append(item)
|
||||
|
||||
def add_info(self, s):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue