diff --git a/cpplint.py b/cpplint.py index 81bc98b..ba510bb 100755 --- a/cpplint.py +++ b/cpplint.py @@ -282,6 +282,7 @@ 'build/include_alpha', 'build/include_order', 'build/include_what_you_use', + 'build/namespaces_headers', 'build/namespaces_literals', 'build/namespaces', 'build/printf_format', @@ -5084,7 +5085,7 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension, if (IsHeaderExtension(file_extension) and Search(r'\bnamespace\s*{', line) and line[-1] != '\\'): - error(filename, linenum, 'build/namespaces', 4, + error(filename, linenum, 'build/namespaces_headers', 4, 'Do not use unnamed namespaces in header files. See ' 'https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces' ' for more information.') diff --git a/cpplint_unittest.py b/cpplint_unittest.py index f5e3845..72f842a 100755 --- a/cpplint_unittest.py +++ b/cpplint_unittest.py @@ -4255,7 +4255,7 @@ def doTestUnnamedNamespacesInHeaders(self, extension): 'foo.' + extension, 'namespace {', 'Do not use unnamed namespaces in header files. See' ' https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces' - ' for more information. [build/namespaces] [4]') + ' for more information. [build/namespaces_headers] [4]') # namespace registration macros are OK. self.TestLanguageRulesCheck('foo.' + extension, 'namespace { \\', '') # named namespaces are OK.