question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding overrides to cspell.json has no effect

See original GitHub issue

Kind of Issue

  • change in behavior

Which Tool or library

  • cspell – the command-line spelling tool cspell --version: 5.15.2

Issue with supporting library?

  • No

OS:

  • Linux

version: OS version if applicable. 5.11.16-arch1-1

Attached: cspell.json cspell.json.txt

Following the documentation here: https://cspell.org/configuration/overrides/#overrides

Adding the following lines into cspell.json

 "overrides": [
    {
      "filename": "**/{*.pgsql,*.psql}",
      "languageId": "sql"
    }
  ],

Desired behavior: treat pgsql and psql files as sql file: only spell check ‘–’ comments

    {
      "languageId": "sql",
      "includeRegExpList": [
        "/--.*/"
      ]
    },

Actual behavior: No change

Screencast Top left: pgsql file Bottom left: sql file Right side: cspell.json

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
RRikorcommented, Jan 21, 2022

@Jason3S It tinkered around a bit with your suggestions and it works! thank you! All it needed was the globRoot This is what fixed it:

  "version": "0.2", <-- was already there
  "overrides": [
    {
      "filename": "/**/{*.pgsql,*.psql}",
      "languageId": "sql"
    }
  ],
  "globRoot": "${cwd}",
0reactions
github-actions[bot]commented, Feb 21, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression: cspell breaks when an override includes a ...
The following cspell.json will cause CSpell to break when spell checking TypeScript files. cspell.json { "overrides": [ { "name": "Override ...
Read more >
Configuration Settings | Spell Checker
A Spell Checker for Code! ... If addWords is true words will be added to this dictionary. Example: ... To disable a language,...
Read more >
Overrides
Overrides are useful for forcing configuration on a per file basis. Example: "overrides": [ // Force `*.hrr` and `*.crr` files to be treated...
Read more >
In Rails, how do I override the format from the URL
I've tried adding :formats => :html or :formats => [:html] to the call to render, but it has no effect. I've also tried...
Read more >
XHTML Editor JSON Configuration
How to Configure XHTML Editor JSON Overrides | Configure JSON overrides to customize XHTML editor (TinyMCE) ... In this case, no filters are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found