Skip to content
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

Rule COMPONENT_INVALID_NAME does not support camelCase as intended #696

Open
CreativeNotice opened this issue Dec 30, 2020 · 1 comment
Open
Labels

Comments

@CreativeNotice
Copy link

When attempting to use camelCase for the ComponentNameChecker.case parameter I noticed it's still applying the PascalCase logic. Digging into the code it looks like the issue is an incomplete method isInvalidComponent() in ValidName.java.

Note the lack of use of the defined caseOk variable. Compare to the method just preceding isInvalid() which does utilize a similarly named variable.

{
	"rule": [],
	"excludes": [],
	"includes": [],
	"inheritParent": false,
	"parameters": {
		"ComponentNameChecker.case": "camelCase"
	}
}

Component name salesOrder is not a valid name. Please use camelCase and start with a capital letter. cflint(COMPONENT_INVALID_NAME) [1, 1]

I'm happy to tackle putting a PR together though can't tackle it immediately. If anyone else wants to tackle first, or perhaps the core team has some ideas on this one, please mention them below.

@KamasamaK KamasamaK added the bug label Dec 30, 2020
@KamasamaK
Copy link
Collaborator

Just be sure to include a new test and proper message (remove "and start with a capital letter") with your fix and your PR should be approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants