Skip to content

Feature request: CamelCase spell check in code #37

@janschreiber

Description

@janschreiber

Common behavior for spell checkers that are intended for coding is to turn off checking for everything except comments and strings.
But in quite a lot of software projects, function and variable names consist of plain ordinary English words, often in camel case, such as OnEventReceive( trigger ). Why can't we have those spell-checked, too, only in a novel way?
The idea: If a word is inside a code area, just split it up at the word boundaries marked by the case changes before sending the chunks to the underlying spell-checker (Hunspell or Aspell). In our example, you would send "on", "event", and "received", so, no problem.
If they return for any of the chunks that it is misspelled, mark the function or variable name as misspelled and generate suggestions based on concatenating the suggestions.
For example, if I mistype "OnEventReceive" as "OnEventRecieve", I would expect the following to happen: Aspell suggests "receive" as replacement for "recieve", while not complaining about the other two chunks. As a result, DSpellCheck suggests "OnEventReceive".
I think that could save quite a bit of hassle, in particular when working with a multi-national team.
Obviously, it must be made optional though, because for some projects it won't make sense at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions