streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.22k stars 92 forks source link

Why is `optionVAlue` considered correct? #6194

Open Arun-StarApps opened 1 month ago

Arun-StarApps commented 1 month ago

Kind of Issue

Change in behavior / Regression

Tool or Library

cspell

Version

v4.0.4

Supporting Library

Not sure / None

OS

macOS

OS Version

12.7.5 (21H1222)

Description

function abc(optionVAlue) {
  console.log("optionVAlue::", optionVAlue);
}

Steps to Reproduce

  1. Install 'Code Spell Checker' VSCode Extenstion.
  2. Create test.jsx file
  3. paste code:
    function abc(optionVAlue) {
     console.log("optionVAlue::", optionVAlue);
    }

Expected Behavior

"optionVAlue": Unknown word.cSpell

Additional Information

No response

cspell.json

No response

cspell.config.yaml

No response

Example Repository

No response

Code of Conduct

Jason3S commented 1 month ago

@Arun-StarApps,

I can see how this is confusing and non-ideal. The spell checker tries its best to break code up into meaningful words:

image

One of the things it does it to try and find the word all in lower case, if it finds it, it is considered correct.

That is what is happening in this case.

There is not an easy solution to this problem, since it is common to see things like BREAKing, CURLedRequest, and PHPUnit in code.

Arun-StarApps commented 1 month ago

@Jason3S
I was expecting 'optionVAalue' will be broken into three workds 'option', 'V' and 'Alue'. so is there any setting to do this ?