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]: broken handling of filenames with special character # #4811

Closed
1 task done
rivy opened this issue Sep 10, 2023 · 2 comments · Fixed by #5087
Closed
1 task done

[Bug]: broken handling of filenames with special character # #4811

rivy opened this issue Sep 10, 2023 · 2 comments · Fixed by #5087

Comments

@rivy
Copy link
Contributor

rivy commented Sep 10, 2023

Kind of Issue

Change in behavior or regression.

Tool or Library

cspell

Version

6+

Supporting Library

No response

OS

Windows

OS Version

10.0.19045.3324

Description

  1. Files with internal # characters are not displayed correctly for v6+.
>  echo %CD%
C:\Users\Roy\#ark\Projects\deno\dxx\repo.GH
> cspell --version
6.31.3
> cspell lint --config .vscode\cspell.json **
...
20/65 .\src\dxr.ts 56.71ms X
c:\Users\Roy\:23:7 - Unknown word (SIGBREAK)
...
  1. Dictionaries with internal # characters are not loadable for v7+.
>  echo %CD%
C:\Users\Roy\#ark\Projects\deno\dxx\repo.GH
> cspell --version
7.3.3
> cspell lint --config .vscode\cspell.json **
Dictionary Error with (#local) Error: EISDIR: illegal operation on a directory, read
CSpell: Files checked: 0, Issues found: 0 in 0 files

Prior versions (v5 and lower) appear to work correctly, loading all dictionaries and printing full filenames.

For v7, changing the dictionary filename in cspell.json to one with no # allows loading of the dictionary, but still displays incorrect file names for errors.

Steps to Reproduce

  • shown above

Expected Behavior

No response

Additional Information

No response

cspell.json

// `cspell` configuration/settings
// ref: <https://cspell.org/configuration>
// v2022.11.25 [rivy]
{
	"version": "0.2", // configuration/settings file version
	"language": "en", // language - current active spelling language
	"dictionaries": ["typescript", "#local", "acronyms+names", "jargon", "people", "shell"],
	"dictionaryDefinitions": [
		{ "name": "#local", "path": "./cspell.dictionaries/#local-project-only.wordlist.txt" },
		{ "name": "acronyms+names", "path": "./cspell.dictionaries/acronyms+names.wordlist.txt" },
		{ "name": "jargon", "path": "./cspell.dictionaries/jargon.wordlist.txt" },
		{ "name": "people", "path": "./cspell.dictionaries/people.wordlist.txt" },
		{ "name": "shell", "path": "./cspell.dictionaries/shell.wordlist.txt" }
	],
	// ignorePaths -  a list of globs to specify which files are to be ignored
	"ignorePaths": [
		"{,.,_,#,@}build/**",
		"{,.,_,#,@}coverage/**",
		"{,.,_,#,@}target/**",
		"tests/**/fixtures/**",
		"vendor/**"
	],
	// ignoreWords
	"ignoreWords": [],
	// words - list of words to be always considered correct
	"words": []
}

Code of Conduct

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

Jason3S commented Oct 15, 2023

@rivy,

Thank you for raising this issue. This is a problem with how cspell parses file names. It attempts to convert them into URLs. The # is a special character.

@Jason3S Jason3S removed the new issue label Oct 15, 2023
Jason3S added a commit that referenced this issue Dec 20, 2023
Copy link
Contributor

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

Successfully merging a pull request may close this issue.

2 participants