Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Once correction is made, then it stops working properly and you can add nonsense that is not linted #41

Open
David-Else opened this issue Dec 13, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@David-Else
Copy link

David-Else commented Dec 13, 2020

Linux
vale version 2.6.6 (directly downloaded)
VS Code 1.52

.vale.ini
[*.md]
BasedOnStyles = Vale, Microsoft

I am using the CLI version, not the server.

On the following line, I get an error Use 'what's' instead of 'What is'.ValeMicrosoft.Contractions

“What is that pink mist coming out of the engine?” asked Alice.

So I correct to:

“What's that pink mist coming out of the engine?” asked Alice.

and I save, the red squiggle goes away. Now add:

"What'ssssssss that pink mist coming out of the engine?” asked Alice."

and hit save... NOTHING, no red squiggle.

You can add all sorts of nonsense at the end and it does not work. There is definitely a bug! It is not just for this sentence, I have encountered it often.

PS Awesome free software, thanks!

@ChrisChinchilla
Copy link
Collaborator

@David-Else Couple of things here to help us debug this.

ValeMicrosoft.Contractions for the style you're using… That is strange syntax, is that a custom style you've created?

Do you have a copy of the Microsoft style locally? I don't see any paths in your ini file.

I can't speak for the "all sorts of nonsense" as I'm not sure what you're putting, but for "What'ssssssss, that's a spelling error, not a contraction, do you have a rule enabled for checking spelling?

@David-Else
Copy link
Author

David-Else commented Dec 14, 2020

Hi, I don't know what you mean by ValeMicrosoft.Contractions, I am using BasedOnStyles = Vale, Microsoft in my .ini file and the official untouched style files from https://github.com/errata-ai/Microsoft/releases/latest/download/Microsoft.zip.

It is all installed locally, the Microsoft.zip file is extracted into /home/david/bin/styles/Microsoft. Here is my full .ini file:

StylesPath = /home/david/bin/styles

Vocab = story

[*.md]
BasedOnStyles = Vale, Microsoft

When I say 'all sorts of nonsense' I mean you can type any spell error you want and it does not detect it. Yes, spell check is on using Vale in the .ini

@ChrisChinchilla
Copy link
Collaborator

@David-Else In your message above you mention the following error, that's what I am referring to…

On the following line, I get an error Use 'what's' instead of 'What is'.ValeMicrosoft.Contractions

for spelling errors, do you have an aspell/hunspell compatible dictionary installed? Using Linux, you probably do, but worth asking.

@David-Else
Copy link
Author

David-Else commented Dec 14, 2020

OK, got it, to save you downloading the file it is:

extends: substitution
message: "Use '%s' instead of '%s'."
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-contractions
level: error
ignorecase: true
action:
  name: replace
swap:
  are not: aren't
  cannot: can't
  could not: couldn't
  did not: didn't
  do not: don't
  does not: doesn't
  has not: hasn't
  have not: haven't
  how is: how's
  is not: isn't
  it is: it's
  should not: shouldn't
  that is: that's
  they are: they're
  was not: wasn't
  we are: we're
  we have: we've
  were not: weren't
  what is: what's
  when is: when's
  where is: where's
  will not: won't

I do have hunspell on the system. It is setup using this:

        # Allow ban.spellright to access built in hunspell directories
        sudo ln -s /usr/share/myspell "$HOME/.config/Code/Dictionaries

NOTE spellright is uninstalled now

@David-Else
Copy link
Author

@ChrisChinchilla Did you manage to reproduce the bug, and do you need any more info? Cheers.

@ChrisChinchilla
Copy link
Collaborator

@David-Else Not yet! I have a day job :)

@ChrisChinchilla ChrisChinchilla self-assigned this Dec 17, 2020
@jdkato jdkato added the bug Something isn't working label Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants