mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-17 08:03:44 -04:00
Merge branch 'pspacek/danger-log-level' into 'main'
Flag new user-visible log messages for manual review See merge request isc-projects/bind9!5980
This commit is contained in:
commit
da101c1386
1 changed files with 21 additions and 0 deletions
|
|
@ -273,3 +273,24 @@ annotations_added = lines_containing(configure_added_lines, '# [pairwise: ')
|
|||
if len(switches_added) > len(annotations_added):
|
||||
fail('This merge request adds at least one new `./configure` switch that '
|
||||
'is not annotated for pairwise testing purposes.')
|
||||
|
||||
###############################################################################
|
||||
# USER-VISIBLE LOG LEVELS
|
||||
###############################################################################
|
||||
#
|
||||
# WARN if the merge request adds new user-visible log messages (INFO or above)
|
||||
|
||||
user_visible_log_levels = [
|
||||
'ISC_LOG_INFO',
|
||||
'ISC_LOG_NOTICE',
|
||||
'ISC_LOG_WARNING',
|
||||
'ISC_LOG_ERROR',
|
||||
'ISC_LOG_CRITICAL',
|
||||
]
|
||||
source_added_lines = added_lines(target_branch, ['*.[ch]'])
|
||||
for log_level in user_visible_log_levels:
|
||||
if (lines_containing(source_added_lines, log_level)):
|
||||
warn('This merge request adds new user-visible log messages with '
|
||||
'level INFO or above. Please double-check log levels and make '
|
||||
'sure none of the messages added is a leftover debug message.')
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in a new issue