GithubHelp home page GithubHelp logo

Comments (4)

kaste avatar kaste commented on August 20, 2024

Yes sure! Actually we don't do anything here, and rely on the lookup algo of flake8 itself.

Iirc flake8 looks for its config starting from the current working dir. The working dir is set to the 'open' folder in Sublime by default but you could change that in the settings. Ref http://www.sublimelinter.com/en/stable/linter_settings.html#working-dir

You could also use http://www.sublimelinter.com/en/stable/linter_settings.html#args and pass any argument you want to flake8. (E.g. --config)

Note: some variables are allowed http://www.sublimelinter.com/en/stable/settings.html#settings-expansion

from sublimelinter-flake8.

tomleo avatar tomleo commented on August 20, 2024

@kaste So I've tried a few different flake8 configurations for a project I'm working on:

// Project File
{
    "folders": [
        {"path": "."}
    ],
    "settings":
	{
		"linters": {
			"flake8": {
				"working_dir": "${project_path}/level_2",
				"args": "--config=${project_path}/level_2/.flake8 --max-line-length=119",
			}
		}
	},
}

However it's show errors around max-line-length being greater than 79 characters

I can confirm that using flake8 from the command-line works as expected. When I reload sublime-linter I don't see any errors in the sublimetext console. So I'm not entirely shore what the next steps are here.

from sublimelinter-flake8.

kaste avatar kaste commented on August 20, 2024

Ah. In the project settings we have flat key-value pairs (similar to VSCode). Ref http://www.sublimelinter.com/en/stable/settings.html#project-settings

Something like:

  ...
  "settings": {
    "SublimeLinter.linters.flake8.args": ...,
    "SublimeLinter.linters.flake8.working_dir": ...
  }   

You probably don't need to set both though.

from sublimelinter-flake8.

tomleo avatar tomleo commented on August 20, 2024

That did the trick!

from sublimelinter-flake8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.