redhat-developer / redhat-developer/vscode-yaml
I can't find how to ignore or exclude .env files (PEBSAK?)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
The extension's default settings incorrectly assume that all files with no extension that could possibly be YAMl, are intended to be YAML. For example .env files are not intended to be yaml.
I could not find a way to make it only parse files with .yaml or .yml extensions only, after looking twice through the options. Apologies if I missesd it. It's otherwise a great extension and caught an annoying bug for me straight away - cheers.
Erroneous error:
[{
"resource": ".postgres",
"owner": "generated_diagnostic_collection_name#7",
"severity": 8,
"message": "Unexpected scalar token in YAML stream: "POSTGRES_PORT=5432\r\nPOSTGRES_DB=...\r\nPOSTGRES_USER=...\r\nPOSTGRES_PASSWORD=..."",
"source": "YAML",
"startLineNumber": 9,
"startColumn": 1,
"endLineNumber": 9,
"endColumn": 21
}]
This is on Windows. Switching the line endings from CRLF to LF did not fix it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the extension's default settings and file-selection behavior, then reproduce the reported Windows case with a .env or .postgres-style file containing environment assignments. Check how YAML diagnostics are selected and whether the requested exclusion or extension-only behavior is represented in the available settings; done means such files no longer receive unintended YAML diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100