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

Configure default severity #241

Open
Bobronium opened this issue May 17, 2022 · 4 comments
Open

Configure default severity #241

Bobronium opened this issue May 17, 2022 · 4 comments

Comments

@Bobronium
Copy link

Bobronium commented May 17, 2022

I'm trying to configure default rules severity, but I guess, it doesn't work like that:

    "markdownlint.config": {
        "default": {
            "severity": "Information"
        },
    },

Is there a way to do it?

Upd.

Ok, I see now that severity is hardcoded here:

const diagnostic = new vscode.Diagnostic(range, message, vscode.DiagnosticSeverity.Warning);

Can we make it configurable?

@DavidAnson
Copy link
Owner

Why do you want this? The current use of Warning seems appropriate according to the VS Code definitions:

	/**
	 * Represents the severity of diagnostics.
	 */
	export enum DiagnosticSeverity {

		/**
		 * Something not allowed by the rules of a language or other means.
		 */
		Error = 0,

		/**
		 * Something suspicious but allowed.
		 */
		Warning = 1,

		/**
		 * Something to inform about but not a problem.
		 */
		Information = 2,

		/**
		 * Something to hint to a better way of doing it, like proposing
		 * a refactoring.
		 */
		Hint = 3
	}

@Bobronium
Copy link
Author

I'm not saying it's wrong in any way.

It's usually configurable in other linters (pyright, etc.) and it gives certain flexibility when configuring a bunch of plugins/theme combo.

@DavidAnson
Copy link
Owner

Thanks. What changes if you were able to change these from Warning to Information? Are there different policies that kick in or something?

@Bobronium
Copy link
Author

It allows in turn to configure a visual scheme for one's taste.

For instance: https://github.com/Bobronium/vscode-pycharm-darcula-theme#linting-highlighting

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

No branches or pull requests

2 participants