Comments (4)
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.
@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.
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.
That did the trick!
from sublimelinter-flake8.
Related Issues (20)
- recent update triggers ImportError of configparser module HOT 4
- Does not work at all in Sublime 3.1.1 HOT 3
- F401 handling trips on star imports HOT 3
- No linting errors reported but there should be
- Can't find this package in Package control HOT 3
- can get E,W type errors, but no F type errors HOT 7
- Error: 'selector' is mandatory in 'cls.defaults' HOT 3
- Is --per-file-ignores supported for flake8 >= 3.7.0? HOT 11
- Package not showing in packaging control anymore HOT 1
- Shows E251 for function definitions having type annotations HOT 2
- Args seem to be getting ignored HOT 1
- Extend "E501 line too long" match till end of line HOT 1
- AttributeError: 'int' object has no attribute 'rstrip' HOT 3
- W type errors not showing HOT 1
- SublimeText 4 Support HOT 2
- Using per-file-ignores argument in settings causes an error HOT 4
- TypeError: expected str, bytes or os.PathLike object, not TextIOWrapper. Why extra " -" is being added after `flake8 --format default`? HOT 6
- plugin_host-3.3 has exited unexpectedly HOT 6
- List unpack operator in assignment triggers false positive HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sublimelinter-flake8.