Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hooks/conan-center.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions tests/test_hooks/conan-center/test_invalid_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)