False positive: Sentence capitalization of sentence in brackets
What got flagged?
I like pizza. (Well, food is nice.)
The word "food" with This sentence does not start with a capital letter Harper: SentenceCapitalization
Why is this incorrect? The sentence is correct.
Removing the brackets, the word "food" is not falsely flagged anymore.
Another example:
A timestamp formatted as `HH:MM:SS` is needed. (For millisecond-precision, use `.timeLog()` instead)
Here use is flagged SentenceCapitalization as well.
Thanks for these! It would be more immediately obvious what it's doing wrong if you could include an image of the wrong lint as well as the text.
I assumed most people prefer the raw text for reproduction, but sure, I can of course also share screenshots for quicker scanning what's going on:
I assumed most people prefer the raw text for reproduction, but sure, I can of course also share screenshots for quicker scanning what's going on:
The raw text is definitely best for reproducing but it's not the most illustrative. I've been trying to train myself to include both in my reports. In any case that is really weird!
A temporary workaround for this would be to disable IsolateEnglish.
This bug happens because IsolateEnglish strips out the (Well, chunk, which causes Harper to see the sentence as:
I like pizza. food is nice.)
hence the incorrect capitalization lint.
I tried taking a crack at this, but there doesn't seem to be a straight-forward solution. IsolateEnglish removes this chunk because it considers it to be code. However, I don't think there is enough context in a chunk like (Well, to confidently say whether it's code or not. Iterating on sentences instead of chunks seems intuitive at first, but it breaks some of the cases IsolateEnglish wants to support. Which leads me to think that IsolateEnglish needs to iterate on tokens instead and do its own chunking as it sees fit, which is no easy feat.