Skip to content

fix(AEP0004): recommend kebab case#127

Open
kindermoumoute wants to merge 1 commit into
aep-dev:mainfrom
kindermoumoute:typo-camel-kebab
Open

fix(AEP0004): recommend kebab case#127
kindermoumoute wants to merge 1 commit into
aep-dev:mainfrom
kindermoumoute:typo-camel-kebab

Conversation

@kindermoumoute
Copy link
Copy Markdown

@kindermoumoute kindermoumoute commented May 29, 2026

fixes #122

@kindermoumoute kindermoumoute force-pushed the typo-camel-kebab branch 2 times, most recently from 23c3c11 to 7b0ee0d Compare May 29, 2026 15:57
@kindermoumoute kindermoumoute changed the title fix(AEP0004): fix error message to recommend kebab case fix(AEP0004): recommend kebab case May 29, 2026
@toumorokoshi toumorokoshi requested a review from rambleraptor May 31, 2026 20:19
@toumorokoshi
Copy link
Copy Markdown
Member

Thank you, nice catch!

I think there's a few more remnants of camel-case too, such as docs/rules/0122/kebab-case-uris.md#L14. But can send a follow-up after this.

Copy link
Copy Markdown
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

LGTM!

@toumorokoshi
Copy link
Copy Markdown
Member

@rambleraptor do you want to give this a review as well, or should I move ahead on the merge?

* Make error messages recommend kebab case for singular, plural, and segments
* Fix segment implementation to forbid camelCase
* Remove utilsToKebabCase in favor of strcase.KebabCase in order to fix
  some edge cases (e.g. `Foo-Bar`)

Signed-off-by: Olivier Cano <ocano@scaleway.com>
@kindermoumoute
Copy link
Copy Markdown
Author

Found an issue with utils.ToKebabCase and AEP4: Foo-Bar would be formatted into foo--bar.

I completely removed utils.ToKebabCase in favor of github.com/stoewer/go-strcase which is already used across other rules.

Comment thread rules/aep0004/resource_type_name_test.go
Copy link
Copy Markdown
Member

@rambleraptor rambleraptor left a comment

Choose a reason for hiding this comment

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

Looks great, please merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AEP-4: resource patterns should be kebab-cased

3 participants