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

[Bug]: Cspell 8.10 doesn't find files in a folder #5861

Closed
1 task done
DamianMaslanka5 opened this issue Jul 5, 2024 · 4 comments · Fixed by #5864
Closed
1 task done

[Bug]: Cspell 8.10 doesn't find files in a folder #5861

DamianMaslanka5 opened this issue Jul 5, 2024 · 4 comments · Fixed by #5864

Comments

@DamianMaslanka5
Copy link

Kind of Issue

Change in behavior / Regression

Tool or Library

cspell

Version

8.10.0

Supporting Library

No response

OS

Windows

OS Version

No response

Description

8.10 doesn't find a file in files directory when npx cspell is not executed from a root directory

C:\Users\damia\Desktop\git\cspell-test [master ≡]> cd .\test\
C:\Users\damia\Desktop\git\cspell-test\test [master ≡]> .\test.ps1
1/1 C:\Users\damia\Desktop\git\cspell-test\files\asd.txt 273.75ms
CSpell: Files checked: 1, Issues found: 0 in 0 files.
CSpell: Files checked: 0, Issues found: 0 in 0 files.
C:\Users\damia\Desktop\git\cspell-test\test [master ≡]> 

Steps to Reproduce

See https://github.com/DamianMaslanka5/cspell-test/tree/master

# 1 file
npx cspell@8.9.1 "$PSScriptRoot\..\files\"

# 0 files
npx cspell@8.10.0 "$PSScriptRoot\..\files\"

Expected Behavior

Both versions should return the same results

Additional Information

No response

cspell.json

No response

cspell.config.yaml

No response

Example Repository

https://github.com/DamianMaslanka5/cspell-test

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Jason3S
Copy link
Collaborator

Jason3S commented Jul 5, 2024

@DamianMaslanka5,

Thank you for the excellent example. I'll take a look.

@Jason3S
Copy link
Collaborator

Jason3S commented Jul 5, 2024

@DamianMaslanka5,

It is related to recent changes. I'll work on a fix. In the meantime, the workaround is to set the root.

npx cspell@8.10.0 -r "$PSScriptRoot\..\" files/

Please let me know if that works.

@Jason3S Jason3S removed the new issue label Jul 5, 2024
@DamianMaslanka5
Copy link
Author

@Jason3S

Thank you for a quick response

The workaround works correctly

PS C:\Users\damia\Desktop\git\cspell-test\test> .\test.ps1
1/1 C:\Users\damia\Desktop\git\cspell-test\files\asd.txt 273.59ms
CSpell: Files checked: 1, Issues found: 0 in 0 files.
1/1 .\files\asd.txt 280.83ms
CSpell: Files checked: 1, Issues found: 0 in 0 files.

@Jason3S
Copy link
Collaborator

Jason3S commented Jul 5, 2024

@DamianMaslanka5,

Thank you for raising the issue. It should be fixed in 8.10.2.

I suggest using the -r <rootdir> option in general. CSpell tries its best to resolve file names and directories into globs, but it is not always possible. In any case, the example you gave should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants