microsoft / microsoft/vscode-flake8

Cannot configure severity for partial error code

Open
#7 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request needs community feedback
Dominant language
Python
Stars
52
Forks
34
Avg merge
1d 1h
Merged PRs (30d)
5

Description

I am trying to configure flake8 as such:

class test:
    __init__(self): pass  # pylint: disable=syntax-error

    a = 0
    c = 2
    b = 1

    if True:
        if True:
            pass
  "flake8.severity": {
    "convention": "Warning",
    "error": "Error",
    "fatal": "Error",
    "refactor": "Warning",
    "warning": "Warning",
    "info": "Warning",
    // builtins
    "A": "Warning",
    // mccabe
    "C": "Warning",
    // class attributes order
    "CCE": "Warning",
    // pycodestyles
    "E": "Warning",
    "E9": "Error", // Runtime
    "W": "Warning",
    // Pyflakes
    "F": "Warning",
    // PEP8 Naming convention
    "N": "Warning",
    // Simplify
    "SIM": "Warning",
    "SIM9": "Information",
    // PYI
    "Y": "Warning",
  },

Only single characters or full error code work. The following do nothing: CCE, E9, SIM, SIM9.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the vscode-flake8 extension handles the flake8.severity configuration, especially matching configured prefixes against reported error codes. Add coverage for CCE, E9, SIM, and SIM9 while preserving the existing behavior for single-character prefixes and full error codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.