SublimeLinter / SublimeLinter-flake8

SublimeLinter plugin for python, using flake8.
MIT License
184 stars 28 forks source link

Read flake8 configuration from setup.cfg file #88

Closed boompig closed 6 years ago

boompig commented 6 years ago

When invoked from the command-line, flake8 will read setup.cfg for options. I notice that the flake8 SublimeLinter plugin does not do this.

kaste commented 6 years ago

SublimeLinter itself uses setup.cfg https://github.com/SublimeLinter/SublimeLinter/blob/master/setup.cfg

So there must be something else going on. Enable debug mode for SublimeLinter, check the working dir cwd. Check your flake8 settings either globally or per project.

braver commented 6 years ago

@boompig if you still have issues with, check where your setup.cfg hangs out and perhaps change the working_dir setting.

STRML commented 3 years ago

For anyone picking this up in 2021:

If you want to pick up in-directory config like .flake8 or setup.cfg, your working_dir for flake8 should be $file_path, not ${folder:$file_path}, as this defaults to $folder first when in project mode, which is the project root.

  "linters": {
    "flake8": {
      "working_dir": "$file_path"
    }
  }