diff --git a/hooks/conan-center.py b/hooks/conan-center.py index a5f55037..7fcefedf 100644 --- a/hooks/conan-center.py +++ b/hooks/conan-center.py @@ -748,6 +748,9 @@ def test(out): if topic in invalid_topics: out.warn("The topic '{}' is invalid and should be removed from topics " "attribute.".format(topic)) + if topic != topic.lower(): + out.warn("The topic '{}' is invalid; even names and acronyms should be formatted " + "entirely in lowercase.".format(topic)) @raise_if_error_output diff --git a/tests/test_hooks/conan-center/test_invalid_topics.py b/tests/test_hooks/conan-center/test_invalid_topics.py index ef15fa28..0649fa64 100644 --- a/tests/test_hooks/conan-center/test_invalid_topics.py +++ b/tests/test_hooks/conan-center/test_invalid_topics.py @@ -35,3 +35,11 @@ def test_invalid_topics(self): output = self.conan(['export', '.', 'name/version@user/channel']) self.assertIn("WARN: [INVALID TOPICS (KB-H064)] The topic 'conan' is invalid and should be" " removed from topics attribute.", output) + + def test_uppercase_topics(self): + tools.save('conanfile.py', content=self.conanfile.replace('"foobar",', '"foobar", "Baz", "QUX"')) + output = self.conan(['export', '.', 'name/version@user/channel']) + self.assertIn("WARN: [INVALID TOPICS (KB-H064)] The topic 'Baz' is invalid; even names " + "and acronyms should be formatted entirely in lowercase.", output) + self.assertIn("WARN: [INVALID TOPICS (KB-H064)] The topic 'QUX' is invalid; even names " + "and acronyms should be formatted entirely in lowercase.", output)