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

apostrophe is not a word separator #36

Closed
ssbarnea opened this issue Apr 27, 2018 · 6 comments
Closed

apostrophe is not a word separator #36

ssbarnea opened this issue Apr 27, 2018 · 6 comments

Comments

@ssbarnea
Copy link
Contributor

It seems that foobar's is reported as a word instead of checking for foobar.

@Jason3S
Copy link
Collaborator

Jason3S commented Apr 28, 2018

It is not a word separator because it is valid for contractions: don't, won't, couldn't, etc.

It might be worth it to add an option to ignore the trailing 's.

You can already tell the spell checker to ignore these:

  "ignoreRegExpList": ["/'s\\b/"]

cspell provides a way to see what has been ignored. If you run:
cspell check -c <cspell.json> <file_to_check.ext> it will out put a colorized version of the file.

image

@Jason3S
Copy link
Collaborator

Jason3S commented Apr 28, 2018

ignoreRegExpList can be included at both the root level of the cspell.json file or inside languageSettings:

    "languageSettings": [
        {
            "languageId": "c,cpp",
            // By default the whole text of a file is included for spell checking
            // Adding patterns to the "includeRegExpList" to only include matching patterns
            "includeRegExpList": [
                "CStyleComment",
                "string"
            ],
            // To exclude patterns, add them to "ignoreRegExpList"
            "ignoreRegExpList": [
                "/#include.*/"
            ]
        }
    ]

@Jason3S
Copy link
Collaborator

Jason3S commented Apr 28, 2018

There is a beta level feature to override settings for matching files:

    "overrides": [
        {
            "filename": "**/*.py",
            "ignoreRegExpList": ["/'s\\b/"]
        }
    ]

@ssbarnea
Copy link
Contributor Author

After reading the comments I realise that there is no perfect solution for this issue, maybe we should close it after documenting the workaround for disabling the 's in the main readme.

@devjgm
Copy link

devjgm commented Sep 22, 2020

FWIW, I think it would be very useful if cspell had an option to consider /'s\\b/ a word separator, so that it wouldn't ignore the whole word, but would ignore the 's and still spell check the leading part of the word.

Jason3S pushed a commit that referenced this issue Aug 30, 2021
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.3 to 26.5.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v26.5.3...v26.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@Jason3S Jason3S closed this as completed Apr 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2022

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 May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants