提交 c8d6cd85 编写于 作者: L Laine Stump

build: detect/prohibit hardcoded XML indent in syntax-check

This rule wouldn't be able to find any case of a hardcoded indent that
was in the middle of a string, but then virBuffer doesn't add
indentation in the middle of a string either.
上级 68d63c6b
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2008-2013 Red Hat, Inc.
# Copyright (C) 2008-2014 Red Hat, Inc.
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
......@@ -517,6 +517,11 @@ sc_prohibit_virBufferAsprintf_with_string_literal:
halt='use virBufferAddLit, not virBufferAsprintf, with a string literal' \
$(_sc_search_regexp)
sc_forbid_manual_xml_indent:
@prohibit='virBuffer.*" +<' \
halt='use virBufferAdjustIndent instead of spaces when indenting xml' \
$(_sc_search_regexp)
# Not only do they fail to deal well with ipv6, but the gethostby*
# functions are also not thread-safe.
sc_prohibit_gethostby:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册