Skip to content

Sentence case bugs & false positives #71

@chrisgrieser

Description

@chrisgrieser

Some issues I noticed with the sentence case rule:

  1. The rule fails with leading emojis. For instance, the line new Notice("✅ Text is good, nothing to change."); is reported by the rule.
  2. As opposed to names like "iOS", "OpenAI" is apparently not in the default list of exception words, resulting in a lot of false positives if you have an AI plugin.
  3. The rule also reports the line .setPlaceholder("sk-123456789…"), even though, arguably, the sentence case requirement does not make sense for a placeholder.
  4. The string 'If there is a file "Template.md" at the root of the vault, …' is marked due to the "Template", even though this is correct here due to the use of quotes.
  5. new Notice("Cannot assign id to line.") triggers the sentence case rule, even though the sentence is correct. The issue appears to be that "id" should be spelled "ID," probably because that's one of the acronym-exceptions of the rule. While requiring "ID" to be uppercased makes sense, it is confusing that the line just says "sentence case issue".
  6. Similar to 5., .setDesc("Separator used when exporting as .csv file.") triggers the rule, since "csv" is not capitalized. But as opposed to 5., ".csv" is lowercased when used as an extension, making the lowercased spelling valid. (While 5. is technically only a wrong description)
  7. Another issue is that parentheses apparently break the rule. For instance, this gets reported, even though they are obviously two sentences: new Notice("Foobar. (Hello.)");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions