Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Axiallary" isn't a word. #1626

Closed
Kurt-von-Laven opened this issue Aug 30, 2021 · 20 comments
Closed

"Axiallary" isn't a word. #1626

Kurt-von-Laven opened this issue Aug 30, 2021 · 20 comments

Comments

@Kurt-von-Laven
Copy link

"Axillary" is a medical term meaning "relating to the armpit," which appears correctly spelled in the medical terms dictionary. I can't figure out why "axiallary" is a false negative though; I have yet to find it in any cspell dictionary. The obvious workaround in the meantime is to list it as a flag word. I double checked that the term wasn't in an ignored file or listed in a custom dictionary.

@nschonni
Copy link
Contributor

you can try and find what local dictionary that might have it by running cspell trace Axiallary

@Kurt-von-Laven
Copy link
Author

We are using cspell via the GitHub Action, and when I try running cspell trace axiallary, I get: cspell: command not found. Any suggestions on how to run a trace in the context of the GitHub Action?

@nschonni
Copy link
Contributor

nschonni commented Sep 1, 2021

could try running it after cloning the action repo https://github.com/streetsidesoftware/cspell-action/blob/main/action/package.json
Assuming that is the Action you're talking about

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 1, 2021

If you have node / npm installed on your system, then the following should work:

npx cspell trace axiallary

If you are only seeing the issue in certain types of files, like python, try:

npx cspell trace --languageId=python axiallary

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 1, 2021

Is it also possible to copy your cspell.json file here? That would help identify the issue.

@Kurt-von-Laven
Copy link
Author

I wonder how "No matches found" wound up in the middle of the output and whether it's by design that cspell exited with error code 1?

  npx cspell trace axiallary
  shell: /usr/bin/bash -e {0}
npx: installed 133 in 13.711s
Word      F Dictionary           Dictionary Location           
axiallary - [flagWords]*         From Settings `flagWords`
axiallary - [ignoreWords]*       From Settings `ignoreWords`
axiallary - [words]*             From Settings `words` and `userWords`
axiallary - ada                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-ada/ada.txt.gz
axiallary - aws*                 ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-aws/aws.txt.gz
axiallary - backwards-compatibi* ../../../.npm/_npx/1913/lib/node_modules/c...l-bundled-dicts/compatibility-words.txt.gz
axiallary - bash*                ../../../.npm/_npx/1913/lib/node_modules/c...odules/@cspell/dict-bash/bash-words.txt.gz
axiallary - companies*           ../../../.npm/_npx/1913/lib/node_modules/c...es/@cspell/dict-companies/companies.txt.gz
axiallary - cpp                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-cpp/cpp.txt.gz
axiallary - cryptocurrencies*    ../../../.npm/_npx/1913/lib/node_modules/c...t-cryptocurrencies/cryptocurrencies.txt.gz
axiallary - csharp*              ../../../.npm/_npx/1913/lib/node_modules/c..._modules/@cspell/dict-csharp/csharp.txt.gz
axiallary - css                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-css/css.txt.gz
axiallary - custom*              .dictionary.txt
axiallary - django               ../../../.npm/_npx/1913/lib/node_modules/c..._modules/@cspell/dict-django/django.txt.gz
axiallary - dotnet*              ../../../.npm/_npx/1913/lib/node_modules/c..._modules/@cspell/dict-dotnet/dotnet.txt.gz
axiallary - elixir               ../../../.npm/_npx/1913/lib/node_modules/c..._modules/@cspell/dict-elixir/elixir.txt.gz
axiallary - en_us*               ../../../.npm/_npx/1913/lib/node_modules/c...e_modules/@cspell/dict-en_us/en_US.trie.gz
axiallary - en-gb                ../../../.npm/_npx/1913/lib/node_modules/c...e_modules/@cspell/dict-en-gb/en_GB.trie.gz
axiallary - filetypes*           ../../../.npm/_npx/1913/lib/node_modules/c...es/@cspell/dict-filetypes/filetypes.txt.gz
axiallary - fonts*               ../../../.npm/_npx/1913/lib/node_modules/c...de_modules/@cspell/dict-fonts/fonts.txt.gz
axiallary - fullstack            ../../../.npm/_npx/1913/lib/node_modules/c...es/@cspell/dict-fullstack/fullstack.txt.gz
axiallary - golang               ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-golang/go.txt.gz
axiallary - haskell              ../../../.npm/_npx/1913/lib/node_modules/c...odules/@cspell/dict-haskell/haskell.txt.gz
axiallary - html                 ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-html/html.txt.gz
No matches found
axiallary - html-symbol-entitie  ../../../.npm/_npx/1913/lib/node_modules/c.../dict-html-symbol-entities/entities.txt.gz
axiallary - java                 ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-java/java.txt.gz
axiallary - latex                ../../../.npm/_npx/1913/lib/node_modules/c...de_modules/@cspell/dict-latex/latex.txt.gz
axiallary - lorem-ipsum          ../../../.npm/_npx/1913/lib/node_modules/c...@cspell/dict-lorem-ipsum/dictionary.txt.gz
axiallary - lua                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-lua/lua.txt.gz
axiallary - medical terms*       node_modules/@cspell/dict-medicalterms/medicalterms-en.txt.gz
axiallary - node                 ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-node/node.txt.gz
axiallary - npm                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-npm/npm.txt.gz
axiallary - php                  ../../../.npm/_npx/1913/lib/node_modules/c...l/node_modules/@cspell/dict-php/php.txt.gz
axiallary - powershell*          ../../../.npm/_npx/1913/lib/node_modules/c.../@cspell/dict-powershell/powershell.txt.gz
axiallary - public-licenses*     ../../../.npm/_npx/1913/lib/node_modules/c...ict-public-licenses/public-licenses.txt.gz
axiallary - python*              ../../../.npm/_npx/1913/lib/node_modules/c..._modules/@cspell/dict-python/python.txt.gz
axiallary - ruby                 ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-ruby/ruby.txt.gz
axiallary - rust                 ../../../.npm/_npx/1913/lib/node_modules/c...node_modules/@cspell/dict-rust/rust.txt.gz
axiallary - scala                ../../../.npm/_npx/1913/lib/node_modules/c...de_modules/@cspell/dict-scala/scala.txt.gz
axiallary - softwareTerms*       ../../../.npm/_npx/1913/lib/node_modules/c...l/dict-software-terms/softwareTerms.txt.gz
axiallary - typescript           ../../../.npm/_npx/1913/lib/node_modules/c.../@cspell/dict-typescript/typescript.txt.gz
Error: Process completed with exit code 1.

Here is our .cspell.json:

{
  "version": "0.1",
  "language": "en-US",
  "import": ["@cspell/dict-medicalterms/cspell-ext.json"],
  "dictionaryDefinitions": [
    {
      "name": "custom",
      "path": "./.dictionary.txt"
    }
  ],
  "dictionaries": [
    "bash",
    "csharp",
    "custom",
    "dotnet",
    "filetypes",
    "fonts",
    "medicalterms",
    "powershell",
    "python",
    "softwareTerms"
  ],
  "ignorePaths": [
    ".jscpd.json",
    ".vs",
    ".vscode",
    "**/*.lock*",
    "**/*.user",
    "bin/**",
    "obj/**",
    "AppPackages/**",
    "BundleArtifacts/**",
    "super-linter.log",
    "node_modules",
    "package.json",
    "Pipfile",
    ".virtualenv"
  ],
  "flagWords": [
    "bicep",
    "tricep"
  ]
}

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

I wonder how "No matches found" wound up in the middle of the output and whether it's by design that cspell exited with error code 1?

It exits with error code 1 when No Matches are found. That is by design. Strange that it ended up in the middle. I think it is because the output goes to two different streams: stdout and stderr

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

There doesn't seem to be an issue with your configuration.

A couple of questions:

  1. Are you using cspell or VS Code Spell Checker to check the spelling? In the VS Code Extension, there is a file size limit.
  2. Are there a lot of other issues in the file? There is a limit to the number of issues maxNumberOfProblems, by default is 100.

Is it possible to give some sample code or document with the issue?

@Kurt-von-Laven
Copy link
Author

Ah yes, the output going to different streams make sense. I wonder if it would make sense to flush stdout before writing to stderr?

  1. I have tried the official GitHub Action, running cspell locally, and the VSCode extension, all of which report no misspellings, but I double-checked that they are each capable of spotting other misspelled words. Concretely, the VSCode extension considers "axiallars," "axiallary" and "axiallar," "axiali," "axialp," and "axialm" to be spelled correctly, but "axialla" and "axialz" to be misspelled.
  2. No, but that's a good reminder.

Here is a minimal reproduction that I made in a file named Axiallary.cs:

namespace axiallary
{
    public class Axiallary
    {
        public static string axiallary = "axiallary";
        public static string dalek = "dalek";
    }
}

Here is the output of npx cspell Axiallary.cs:

1/1 ./Axiallary.cs 411.27ms X
/home/kurt/Documents/ScribeMD/scribemd-uwp/Axiallary.cs:6:30 - Unknown word (dalek)
/home/kurt/Documents/ScribeMD/scribemd-uwp/Axiallary.cs:6:39 - Unknown word (dalek)
CSpell: Files checked: 1, Issues found: 2 in 1 files

@Jason3S Jason3S transferred this issue from streetsidesoftware/cspell-dicts Sep 2, 2021
@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

I moved this issue to cspell because it isn't really a dictionary error.

I'm trying to reproduce this error:
image

Found it:

image

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

It is the allowCompoundWords setting.

To turn it off:

    "languageSettings": [
        {
            "languageId": "*", // "*" for all languages or "csharp,python" for just C# and Python files. 
            "allowCompoundWords": false
        }
    ],

@Kurt-von-Laven
Copy link
Author

Glorious; yep, that was it. That helped me find a lot of other misspelled words as well, but as you might expect they are mixed in with a lot of false positives too, so I like that this setting defaults to true. I will add all of the legitimate compound words to our custom dictionary, and keep this setting when I get a chance. Thank you!

@Kurt-von-Laven
Copy link
Author

Ideally cspell trace would show where the portions of compound words came from, but that seems low priority to me.

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

cspell trace does show compounds if allowCompoundWords is turned on.

Note: Please see Custom Dictionaries - CSpell.

In your dictionary try using the compound syntax:

*error*
*code*
*time*

will allow any combination of error, code, and time.

@Jason3S Jason3S closed this as completed Sep 2, 2021
Jason3S added a commit that referenced this issue Sep 2, 2021
* dev: add a test case for issue #1626

* ci: do not lint test fixtures
@Kurt-von-Laven
Copy link
Author

Thanks for the pointer. I may be missing something, but I don't understand why cspell trace only shows compounds when allowCompoundWords is explicitly set to true considering that true is also the default setting? On a side note, the documentation describes the opposite of what I observed: "defaults to false; set to true to allow compound words by default."

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

The default setting for allowCompoundWords is false.

With C#, it defaults to true. See: cspell/cspell-default.config.ts

I hope to remove all cases where allowCompoundWords default to true. It causes a lot of issues.

@Kurt-von-Laven
Copy link
Author

Ohhh, that makes a lot of sense given Microsoft's embrace of ALLCAPSWITHOUTUNDERSCORES, for example. In that case, should cspell trace be wired into to the same cascading configs as cspell itself (again, probably as a low priority thing)?

@Jason3S
Copy link
Collaborator

Jason3S commented Sep 2, 2021

Since the trace command does not know what type of files you are using, you have to tell it.

cspell trace --languageId=csharp axiallary

@Kurt-von-Laven
Copy link
Author

You make a good point. It doesn't seem reasonable to open a new can of worms by trying to guess. Thank you!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants