Skip to content

CFE-4667: Improve error message from cfbs about illegal characters in module names#317

Merged
olehermanse merged 1 commit into
cfengine:masterfrom
sarakthon:improve-error-message
Jun 12, 2026
Merged

CFE-4667: Improve error message from cfbs about illegal characters in module names#317
olehermanse merged 1 commit into
cfengine:masterfrom
sarakthon:improve-error-message

Conversation

@sarakthon

@sarakthon sarakthon commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Ticket: CFE-4667

I made some test modules to verify and test the suggested name fixes, e.g. "name": "MY.MoDuLe.test_123" and module_TEST:

Command and output before changes:

% cfbs add https://github.com/sarakthon/module-example.test.git     
Error: Error in cfbs.json for module 'MY.MoDuLe.test_123': Module name must start with a lowercase ASCII letter ('MY.MoDuLe.test_123' starts with 'M')
% cfbs add https://github.com/sarakthon/module-example.test.git
Error: Error in cfbs.json for module 'module_TEST': Module name contains illegal characters (only lowercase ASCII alphanumeric characters and single dash separators are allowed)

Command and output after changes:

% cfbs add https://github.com/sarakthon/module-example.test.git
Error: Error in cfbs.json for module 'MY.MoDuLe.test_123': Module name must start with a lowercase ASCII letter ('MY.MoDuLe.test_123' starts with 'M') Consider renaming it to 'my-module-test-123'.
% cfbs add https://github.com/sarakthon/module-example.test.git
Error: Error in cfbs.json for module 'module_TEST': Module name contains illegal characters (only lowercase ASCII alphanumeric characters and single dash separators are allowed) Consider renaming it to 'module-test'.

@cf-bottom

Copy link
Copy Markdown

Thank you for submitting a PR! Maybe @craigcomstock can review this?

@sarakthon sarakthon marked this pull request as draft June 11, 2026 09:00
@sarakthon sarakthon force-pushed the improve-error-message branch 2 times, most recently from 3600a99 to b61581f Compare June 11, 2026 09:27
@sarakthon sarakthon force-pushed the improve-error-message branch from b61581f to ada9a3c Compare June 11, 2026 09:34
@sarakthon sarakthon marked this pull request as ready for review June 11, 2026 09:34

@olehermanse olehermanse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@olehermanse olehermanse merged commit 243909f into cfengine:master Jun 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants