File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,16 @@ def spell_check_comment(
146146 if spell_checker .check (wrd ):
147147 valid = True
148148 break
149+ else :
150+ # Try splitting camel case words and checking each sub-words
151+ if output_lvl > 1 :
152+ print ("Trying splitting camel case word: {wrd}" )
153+ sub_words = splitCamelCase (wrd )
154+ if len (sub_words ) > 1 and spell_check_words (
155+ spell_checker , sub_words
156+ ):
157+ valid = True
158+ break
149159 except BaseException :
150160 print (f"Caught an exception for word { error_word } { wrd } " )
151161
Original file line number Diff line number Diff line change 1212//
1313// Prefix and camel case test word:
1414// sitkWhiskeyTangoFoxtrot
15+ // myprefixAttributeName
1516//
1617// Dictionary test word:
1718// BinaryFillholeImageFilter
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ def test_codespell(self):
2323 "--verbose" ,
2424 "--dict" ,
2525 "tests/dict.txt" ,
26+ "--prefix" ,
27+ "myprefix" ,
2628 "tests/example.h" ,
2729 ]
2830 )
@@ -38,6 +40,8 @@ def test_codespell(self):
3840 "python" ,
3941 "codespell.py" ,
4042 "--verbose" ,
43+ "--prefix" ,
44+ "myprefix" ,
4145 "--suffix" ,
4246 ".py" ,
4347 "--suffix" ,
You can’t perform that action at this time.
0 commit comments