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.

Repetitive warning about configuration override

See original GitHub issue

I know this was implemented in response to a previous problem, but the change in https://github.com/DavidAnson/vscode-markdownlint/commit/dd09905d257921094c7c20bacb9ab5869278ffbe. It is giving me a notification that needs to be manually dismissed on every start.

I have checked both user and workspace configurations, and neither contain any settings for markdownlint that are actually overridden. I unfortunately wasn’t able to get the extension set up for development within reasonable time, so I can’t contribute a patch. But I believe a comparison of the loaded config with the default would probably help, something like:

      function loadCustomConfig () {
         var settings = vscode.workspace.getConfiguration(packageJson.displayName);
         customConfig = settings.get("config");
       
         var rootPath = vscode.workspace.rootPath;
         if (rootPath) {
            var configFilePath = path.join(rootPath, configFileName);
            if (fs.existsSync(configFilePath)) {
            isDefaultConfig = customConfig == defaultConfig; // <--- 
               try {
                  customConfig = JSON.parse(fs.readFileSync(configFilePath, "utf8"));
                  if (!isDefaultConfig) { // <----
                      vscode.window.showInformationMessage(configOverride);
               }
               } catch (ex) {
                  vscode.window.showWarningMessage(badConfig + "'" + configFilePath + "' (" + (ex.message || ex.toString()) + ")");
               }
            }
         }

         // Re-lint all open files
         (vscode.workspace.textDocuments || []).forEach(lint);
      }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
DavidAnsoncommented, Apr 20, 2017

Yes, thanks, it may have to. I looked at using a status bar message, but that had issues also. My current plan is to suppress the message more aggressively (per above) and then explore your suggestion to display differently.

0reactions
DavidAnsoncommented, Apr 22, 2017

Update: Switching to a dedicated output window seems to work nicely. I’ll commit and publish soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues for Configuration Override Warn | Drupal.org
Title Status Priority Category Version Automated Drupal 10 compatibility fixes Needs review Normal Task 8.x‑1.x‑dev Warn when permissions are overridden Needs review Normal Feature request...
Read more >
How to override warning in Taskwarrior? - Unix Stack Exchange
It's because I put the config and data files in non-default external location specified by $TASKRC and $TASKDATA environment variables of ...
Read more >
Increase duplicated key overriding warning verbosity #28470
When running a playbook that has a yaml anchor in a task and it is used in a subsequent task that overrides some...
Read more >
Override of Warning Messages - U-Tools
To override a warning message, click the Ok button to close the message box. Then position the mouse over the U-Move dialog window....
Read more >
Removing Kestrel binding warning - asp.net core
This is an old question but you can resolve that conflict between launchSettings.json and appSettings.json with "externalUrlConfiguration": ...
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