-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI Rule for Testing camelCase Naming Convention #10848
Comments
As a bit of background, the reason we've ended up ignoring this is because of Lines 42 to 50 in 2c32e02
History/context: #6319 Fundamentally, its hard to consistently enforce camelCase everywhere when we deal with lots of API responses that contain snake_case or kebab-case names. Simultaneously, this allowed some of our own identifiers to fall through the cracks. I think doing this as a static analysis check is going to be really difficult, but what we probably can do is make it a check at service registration time. So maybe somewhere like: shields/core/base-service/service-definitions.js Lines 46 to 54 in 2c32e02
shields/core/base-service/loader.js Lines 46 to 99 in 2c32e02
There we can specifically inspect the queryParams schema for a service in a context where we know what that is/means.
Of course, the next issue is: At the moment we can't just say "all keys in the query params schema must be camelCase" because we have lots that aren't, so we need a way to incrementally adopt it, or adopt it at the same point we make changes under discussion in #10804 (e.g: only throw |
I had in mind a npm task that users can run to return what services dont use camelCase, then implement a github action that checks and only warns if relevant users don't use camelCase. |
Develop a CI rule to verify that all identifiers in the codebase that are not dictated by upstream adhere to the camelCase naming convention.
The text was updated successfully, but these errors were encountered: