Lukas Renggli wrote:
Glad you like the tests.
In my version of RBSpellChecker>>normalize, I also commented out the line: Â Â Â Â "or: [ input peek = $' ]" "this causes false positives eg 'OK' in class comments"
That change breaks word like
don't Smalltalk's etc.
I see that there are a few other cases where you don't want any $'. So I removed it for now.
OK returns an error on k, RB b etc.
So that's what causes the two cases on a Linux box (fairly sure). I'm guessing you have letters k i b and t in the Mac dictionary, or it specifically doesn't check one letter words?
RBSpellChecker>>#normalize: removes one letter words, so I don't think this can be the error. If you show the individual words that are checked against the dictionary on the transcript, you will see that they all look pretty ok.
BTW, it looks like RBPoolVariableNameSpellingRule should be RBPoolDictionaryNameSpellingRule, as that's what it looks at?
Ok, I renamed that. Probably this rule isn't really needed anyway ...
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Hi Lukas, I think you didn't pick up the other fix in RBBugFixes RBLiteralValuesSpellingRule>>initialize super initialize. matcher := RBParseTreeSearcher new. matcher matches: '`#literal' do: [ :node :answer | | nodeValue | nodeValue := node value. (nodeValue isString or: [ nodeValue isSymbol or: [ nodeValue isCollection ] ]) ifTrue: [ answer add: nodeValue ]. answer ] Currently it checks the node, not the node value. When I load this method, all tests run green.
RBSpellChecker>>#normalize: removes one letter words, so I don't think this can be the error.
The tests are on 'RB' 'OK' etc, in the quotes in class comments. Leading capitals are stripped off. If $' is passed through, the check gets made on K', and as it is 2 characters doesn't get disallowed. That's why the tests need the pass through of ' taken out at the moment. If instead, where you store the result: result add: output contents if you strip out trailing $' before storing, this would let you verify don't and smalltalk's as well, I think. Then you'd need a different test from the position in the stream for size = 1. I only hit this edge case because I had a class comment about namespace related prefixes- 'WA' 'RB' etc. So now 'OK' is not checked, under the 'strip out leading capitals' scenario. At some point it might be nice to check these as well - eg WARenderCanvas rather than WBRenderCanvas. YAGNI, NASA, other abbreviations. Code Critics browser still doesn't show Method Protocols in bold. Cheers, ...Stan -- View this message in context: http://n2.nabble.com/Spell-check-test-cases-tp4288633p4290734.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.