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

Corner case for CamelCase #19

Closed
AlekSi opened this issue Aug 24, 2016 · 10 comments
Closed

Corner case for CamelCase #19

AlekSi opened this issue Aug 24, 2016 · 10 comments

Comments

@AlekSi
Copy link
Contributor

AlekSi commented Aug 24, 2016

Consider this:

… and sends PUBLISHed messages to …

Here PUBLISH is capitalized because it's packet type (in MQTT, if you wonder). Spell checker tells me PUBLIS is not a word. Maybe it can also check words PUBLISH and ed?

@Jason3S
Copy link
Collaborator

Jason3S commented Aug 24, 2016

I had to decide which way to go for that one.

Most of the code I have seen have associate the last upper case letter with the next word. Even in GO, this is true. See HTMLEscape.

@AlekSi
Copy link
Contributor Author

AlekSi commented Aug 25, 2016

Can we go both ways? Check both PUBLIS/Hed and PUBLISH/ed (HTML/Escape and HTMLE/scape) and show error only if both are incorrect.

@AlekSi
Copy link
Contributor Author

AlekSi commented Aug 25, 2016

But that can give false positives… I guess I will write PUBLISH'ed when it will work (it gives me error at the moment) or PUBLISH-ed (works now).

@Jason-Rev
Copy link
Collaborator

Hmm, I need to think about what will give the best experience. I might be able to have it as a setting.

@thorn0
Copy link

thorn0 commented Nov 18, 2016

Another corner case are the words like "don't" and "can't". In camel case, they're usually written like dont and cant. E.g. dontModifyModel. Of course, the spellchecker complains about the word "dont". But if we simply add it to the dictionary, "dont" in the comments also won't be detected.

@Jason3S
Copy link
Collaborator

Jason3S commented Nov 28, 2016

Good point. I don't have a good solution for that yet.

@isra-fel
Copy link

isra-fel commented Aug 1, 2017

Hi, Jason, I found "VMware" seemed to be the same case. The warning says Unknown word "Mware".
Why do I get the same warning even after I put "VMware" in the user dictionary?

@Jason3S
Copy link
Collaborator

Jason3S commented Aug 2, 2017

@isra-fel good example. The issue has to do with the rules to break up CamelCase words.

@Paul-Dempsey
Copy link

FWIW proper punctuation for this usage is PUBLISH-ed ;-)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants