atomlinter / linter-flake8 Goto Github PK
View Code? Open in Web Editor NEWLinting Python files on the fly using flake8 with Atom
License: MIT License
Linting Python files on the fly using flake8 with Atom
License: MIT License
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:810:9)
Package.hasActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:735:20)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:189:24)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:167:15)
The error codes that are skipped by pep8 by default (marked with '*' in the list [here](http://pep8.readthedocs.org/en/latest/intro.html#error-codes -- see note after the table) are also skipped by default in linter-flake8.
They are also skipped in flake8 (and of course in pep8). To include them, one has to run pep8 (or flake8) with the parameters "--select E, W". This is not currently possible in linter-flake8.
A workaround is to add a junk value to the 'ignore error codes' field (e.g. 'ignore_me') because it seems that the error codes are actually included if there is anything at all being explicitely ignored. One can argue this is an upstream bug, but it is actually helpful in providing us with a workaround.
ie, if one runs (even in the original pep8): "pep8 --ignore test_param_plz_ignore", then the aforementioned codes are not ignored anymore.
The ignore-by-default behavior also doesn't happen if some other non-junk code is being explicitely ignored (e.g. W191).
To recap: pep8 (and flake8 and therefore linter-flake8) ignore certain error codes by default. The way to solve it is:
A workaround is:
We're in the process of replacing linter
with a rewrite. Our central issue for tracking the plan is https://github.com/AtomLinter/linter-plus/issues/29. We're working hard to make this a smooth transition for you and for your users.
Please let us know here if you'd prefer to do the work yourself. If you have any questions or concerns please join us in our room on gitter.
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (C:\Users\scott.wilson\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:790:9)
Package.hasActivationCommands (C:\Users\scott.wilson\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:715:20)
<unknown> (C:\Users\scott.wilson\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:169:24)
Package.measure (C:\Users\scott.wilson\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:147:15)
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:806:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:731:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)
At present, it seems as if linter-flake8 looks for a configuration file in the CWD (or higher) and tries to use this to configure flake8. If it finds one, then the options entered in the editor settings panel are ignored in favour of the file. The files searched for are 'setup.cfg', 'tox.ini', and '.pep8', in that order.
I have projects where there is a setup.cfg in the root of the project, but this file is for a different purpose. Its presence seems to cause linter-flake8 to ignore the settings I've provided in favour of that, but I can't use this filename for actually configuring flake8, and because it is the first filename in the search order, it seems I can't provide something else (e.g. '.pep8') instead. At present, I can't use the linter for those projects because I need to ignore some rules.
Am I missing some simple workaround for this? If not, it might be nice to allow users to either (1) specify that they want to ignore all configuration files; or (2) that they want a particular search order; or (3) that they have a particular name for their configuration files.
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:790:9)
Package.hasActivationCommands (/usr/share/atom/resources/app.asar/src/package.js:715:20)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:169:24)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:147:15)
[Enter steps to reproduce below:]
Atom Version: 1.0.4
System: "Funtoo Linux
Thrown From: linter-flake8 package, v1.6.0
Uncaught Error: spawn EACCES
At /usr/share/atom/resources/app.asar/src/buffered-process.js:260
Error: spawn EACCES
at exports._errnoException (util.js:734:11)
at ChildProcess.spawn (child_process.js:1145:11)
at Object.exports.spawn (child_process.js:977:9)
at BufferedProcess.module.exports.BufferedProcess.spawn (/usr/share/atom/resources/app.asar/src/buffered-process.js:188:44)
at new BufferedProcess (/usr/share/atom/resources/app.asar/src/buffered-process.js:52:14)
at /home/arkhan/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:40:30
at Object.module.exports.Helpers._exec (/home/arkhan/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:22:16)
at Object.module.exports.Helpers.exec (/home/arkhan/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:13:13)
at Object.provider.lint (/home/arkhan/.atom/packages/linter-flake8/lib/main.coffee:65:24)
at Promise.then._this.emitter.emit.linter (/home/arkhan/.atom/packages/linter/lib/linter-registry.coffee:55:22)
at LinterRegistry.triggerLinter (/home/arkhan/.atom/packages/linter/lib/linter-registry.coffee:54:16)
at /home/arkhan/.atom/packages/linter/lib/linter-registry.coffee:48:17
at Array.map (native)
at /home/arkhan/.atom/packages/linter/lib/linter-registry.coffee:46:27
-0:20.2.0 editor:newline (atom-text-editor.editor.is-focused)
-0:19.4.0 core:backspace (atom-text-editor.editor.is-focused)
2x -0:19 editor:newline (atom-text-editor.editor.is-focused)
7x -0:14.1.0 core:move-left (atom-text-editor.editor.is-focused)
-0:12 core:backspace (atom-text-editor.editor.is-focused)
6x -0:11.6.0 core:move-right (atom-text-editor.editor.is-focused)
8x -0:10.6.0 core:select-left (atom-text-editor.editor.is-focused)
-0:09.6.0 core:backspace (atom-text-editor.editor.is-focused)
2x -0:09.1.0 core:move-up (atom-text-editor.editor.is-focused)
-0:08.5.0 editor:newline (atom-text-editor.editor.is-focused)
-0:08.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:03.1.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
3x -0:02.3.0 core:move-down (atom-text-editor.editor.is-focused)
-0:00.9.0 core:save (atom-text-editor.editor.is-focused)
{
"core": {
"autoHideMenuBar": true
},
"linter-flake8": {
"executablePath": "/usr/bin/"
}
}
# User
autocomplete-plus-python-jedi, v0.3.6
linter, v1.3.1
linter-flake8, v1.6.0
minimap, v4.12.2
odoo-snippets, v0.1.0
project-manager, v1.15.11
python-isort, v0.0.7
# Dev
No dev packages
I'm using Atom 1.0.0 and recently installed this plugin. I've installed flake8 as recommended and it is located in /usr/bin/. In the Atom linter-flake8 settings menu, I've set the Executable Dir to /usr/bin/. I don't see any deprecation warnings or any indication that flake8 is not found. I don't see any evidence that this plugin is functioning when I try to edit Python files. I've tried restarting Atom. Is there something I have to do to enable the plugin or is it automatic? Is there a keyboard shortcut that I have to hit to get it to parse? Does this support Atom 1.0.0?
I'm using Ubuntu 14.04. Flake8 is installed and is found.
$ which flake8
/usr/bin/flake8
Here is my config.
"*":
"exception-reporting":
userId: "***********************"
welcome:
showOnStartup: false
core:
disabledPackages: [
"language-django"
]
editor:
invisibles: {}
tabLength: 4
showIndentGuide: true
"linter-flake8":
maxLineLength: 99
executableDir: "/usr/bin/"
selectErrors: [
"E"
"W"
]
The demo animation is exactly what I'm looking for in a linter for Atom, so this this plugin is very interesting to me. I'm hoping it will work. Thanks for reading.
I confirmed flake8 is available (both in $PATH and in /usr/local/bin), and added this to my config:
'linter-flake8':
'executableDir': '/usr/local/bin/'
OSX 10.10.1 running Atom 0.152.0 (0.152.0) and linter-flake8 1.2.0.
I'm writing code in python 2 but linter-flake8 uses /usr/bin/flake, which treats everything as python 3. In my system (arch linux), there is /usr/bin/flake8-python2 for python 2.
$ flake8-python2 main.py >/tmp/2
$ flake8 main.py >/tmp/3
$ diff /tmp/2 /tmp/3
0a1
> main.py:24:29: E901 SyntaxError: invalid syntax
8d8
< main.py:55:28: E901 SyntaxError: invalid syntax
I could change the executable name in the package code or add an option like ExecutablePath, but it doesn't really work well as it would break when using python 3.
Clicked Uninstall several times, does not work.
Atom 1.0 on Mac OSX 10.10.3
I use the latest atom version (0.120.0) and I have installed Linter and Flake8 on my system.
My OS is MacOS X
By using atom-package-deps
you are able to install linter
automatically on activation. This will allow new Atom users to install only your package and nothing else, removing one step from the installation process.
Please see AtomLinter/linter-ruby#38 for example.
Seems it wasn't re-implemented in the 1.5.0 to 1.6.0 upgrade...
It would be nice if the linter could use a setup.cfg or tox.ini etc. if found in the root project directory.
Normally flake8 will read these automatically if there's one in the same directory as it is invoked from, but there is also a --config option to specify a path.
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (C:\Users\gock\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:790:9)
Package.hasActivationCommands (C:\Users\gock\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:715:20)
<unknown> (C:\Users\gock\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:169:24)
Package.measure (C:\Users\gock\AppData\Local\atom\app-0.196.0\resources\app.asar\src\package.js:147:15)
[Enter steps to reproduce below:]
Atom Version: 1.0.7
System: Mac OS X 10.10.5
Thrown From: linter-flake8 package, v1.6.1
Uncaught Error: spawn EINVAL
At /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:260
Error: spawn EINVAL
at exports._errnoException (util.js:734:11)
at ChildProcess.spawn (child_process.js:1145:11)
at Object.exports.spawn (child_process.js:977:9)
at BufferedProcess.module.exports.BufferedProcess.spawn (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:188:44)
at new BufferedProcess (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:52:14)
at /Users/oratzes/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:100:28
at Object.module.exports.Helpers._exec (/Users/oratzes/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:57:14)
at Object.module.exports.Helpers.exec (/Users/oratzes/.atom/packages/linter-flake8/node_modules/atom-linter/lib/helpers.coffee:27:19)
at Object.provider.lint (/Users/oratzes/.atom/packages/linter-flake8/lib/main.coffee:73:26)
at Promise.then._this.emitter.emit.linter (/Users/oratzes/.atom/packages/linter/lib/linter-registry.coffee:97:31)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
},
"linter-flake8": {
"maxLineLength": 80,
"executablePath": " \n "
}
}
# User
linter, v1.4.3
linter-flake8, v1.6.1
script-runner, v1.8.3
# Dev
No dev packages
I work with autopep8 activated on save and because it takes some time for any issues to be repaired, these pop us as flake8 probs as well even so they are being fixed at the exact moment, flake8 complains about them.
So, could we either (or both) have a delay on the 'check on save' action for flake8, or/and an option where I could perform the check only on command not at every save?
When this package is installed, the console fills up with:
Uncaught Error: spawn ENOENT util.js:682 exports._errnoException util.js:682 ChildProcess._handle.onexit child_process.js:857 (anonymous function) child_process.js:1005 _tickCallback
Seemingly every time it tries to lint. There is no linking feedback on the UI.
I narrowed it down to this package- disabling it stops these messages.
I installed flake9 as per the README, and my terminal can find it no problem, but just incase I tried explicitly stating /usr/local/bin
as the executable dir but this does not help.
Atom 0.117.0 OSX 10.9.4
Let me know if I can provide any more info!
When user will try to use project config (implemented in #17), for example a config which have a maxLineLenght
property, flake8
will ignore config value, and will use value from plugin settings.
This behaviour is bad when user has not set any parameters in linter-flake8
settings by himself and want to use only the config file, pep8
will take a higher priority for arguments and values in config file will be ignored.
Any proposals how to handle this? I think you guys can help me becouse you've were somehow involved in this issue :) @ChaoticMind @matthewwithanm
My proposals:
maxLineLength
) have the default value(ex. 79
) and config file is found, don't use default values, but use value if it is property!= default
value.This is the last thing that stopped me from making new release.
The package doesn’t do any lint anymore (I don’t think it’s an issue of the main linter package, because i.e. linter-tidy still works).
How to replicate: just open a python file, then try messing its syntax; nothing happens.
[Enter steps to reproduce below:]
Atom Version: 0.194.0
System: Mac OS X 10.10.3
Thrown From: linter-flake8 package, v1.4.0
Uncaught TypeError: undefined is not a function
At /Users/paltman/.atom/packages/linter-flake8/lib/linter-flake8.coffee:51
TypeError: undefined is not a function
at LinterFlake8.destroy (/Users/paltman/.atom/packages/linter-flake8/lib/linter-flake8.coffee:51:17)
at LinterView.remove (/Users/paltman/.atom/packages/linter/lib/linter-view.coffee:252:7)
at /Users/paltman/.atom/packages/linter/lib/linter-view.coffee:124:8
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:279:27)
at TextEditor.module.exports.Model.destroy (/Applications/Atom.app/Contents/Resources/app.asar/src/model.js:45:58)
at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:444:18)
at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:419:12)
at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:582:35)
at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:621:21)
at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:307:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)
2x -1:19.2.0 core:backspace (atom-text-editor#linter-flake8.executableDir.editor.mini)
5x -0:50.4.0 core:move-down (atom-text-editor.editor.is-focused)
5x -0:48.7.0 core:move-up (atom-text-editor.editor.is-focused)
-0:44.6.0 core:move-down (atom-text-editor.editor.is-focused)
-0:43.1.0 core:backspace (atom-text-editor.editor.is-focused)
-0:41.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:40.6.0 core:move-down (atom-text-editor.editor.is-focused)
-0:39.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:37.7.0 core:move-down (atom-text-editor.editor.is-focused)
-0:26.8.0 core:save (atom-text-editor.editor)
5x -0:19.7.0 core:backspace (atom-text-editor.editor)
-0:18.7.0 core:save (atom-text-editor.editor)
-0:17.2.0 core:backspace (atom-text-editor.editor.is-focused)
-0:16.8.0 core:save (atom-text-editor.editor.is-focused)
2x -0:05.3.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
-0:00.8.0 core:close (atom-text-editor.editor.is-focused)
{
"core": {
"projectHome": "/Users/paltman/Development",
"ignoredNames": [
".git",
".DS_Store",
"Thumbs.db",
"*.pyc"
]
},
"linter-flake8": {
"executableDir": "/usr/local/opt/pyenv/shims/"
}
}
# User
linter, v0.12.1
linter-flake8, v1.4.0
trailing-spaces, v0.2.5
# Dev
No dev packages
Now linter shows not descriptive for all error if linting executable was not found:
Uncaught Error: spawn ENOENT util.js:682 exports._errnoException util.js:682 ChildProcess._handle.onexit child_process.js:857 (anonymous function) child_process.js:1005 _tickCallback
This package gives this error, but if I open a new terminal:
$ which flake8
/usr/bin/flake8
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:810:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:735:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:189:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:167:15)
Please automatically expand tildes (~
) in Config File Names to the current user's home directory. E.g., ~/.config/flake8
should expand to /Users/andrew/.config/flake8
for user andrew
on Mac OS X.
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API
LinterFlake8.Linter (/Users/artur/.atom/packages/linter/lib/linter.coffee:60:4)
new LinterFlake8 (/Users/artur/.atom/packages/linter-flake8/lib/linter-flake8.coffee:25:4)
Object.lint (/Users/artur/.atom/packages/linter/lib/legacy.coffee:61:21)
<unknown> (/Users/artur/.atom/packages/linter/lib/editor-linter.coffee:69:25)
currentLinter (/Users/artur/.atom/packages/linter/lib/editor-linter.coffee:68:19)
<unknown> (/Users/artur/.atom/packages/linter/lib/editor-linter.coffee:82:22)
Tried open a clean new Django App, which should shout on unused imported module. But it doesn't. When I run flake8.exe views.py
it spits out proper error message:
.\views.py:1:1: F401 'render' imported but unused
Shout if you need more information.
Hello. I have problem with work (don't work) linter-flake8 after update atom-linter to version 1.3.0.
Unit testing have vital role in software development. Currently we have to test things manually which currently is possible but it is error prone and slow(humans have a bug which leads to forgeting random things). Software that have test have bugs, but surely less and is easier to develop.
So i will Try to do ASAP.
You can transfer it to the AtomLinter org if you'd like. You'll still be the maintainer.
The sooner you do it, the less the statistics of downloads you will lose)
flow:
By default, command line flake8 checks for configuration in places such as ~/.config/flake8
. However, linter-flake8 fails to load this configuration file by default, resulting in a surprising experience for newbies: linter-flake8 appears to ignore their preferred style settings.
Please check for flake8 configuration in ~/.config/flake8
by default, in addition to any Atom user specified locations.
Is the "Max Line Length" config parameter supposed to be passed as --max-line-length
to flake8
? If so, it isn't working for me with atom 1.0.0, linter 1.1.0 and linter-flake8 1.4.2. Here are the relevant lines from my config.cson
:
linter: {}
"linter-flake8":
maxLineLength: 95
but I am getting E501 errors based on a max-line-length of 79, as shown in this screen capture:
Got this from Atom deprecation warning:
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API
Object.activate (/home/jborg/.atom/packages/Linter/lib/main.coffee:57:8)
Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:240:19)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:221:30)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:165:15)
Package.activate (/usr/share/atom/resources/app.asar/src/package.js:213:14)
PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:452:21)
Just wondering the reasoning behind disabling lintOnFly, as it seems like it would be better to inherit Linter's setting?
Was it found to make Atom too slow?
Hi, this is not really an "issue", more of a discussion of a nice hack I use that might deserve documentation. If you are interested, feedback welcome, and I can make a PR adding a paragraph at the end of README.md
.
I love this package, but don't like very much having to go to Settings to set my flake8 each time I work on a Python 2 project.
→ Since I start Atom from the command-line anyway (atom /path/to/project_folder/
, for which Atom will remember open files), rather than having to murk with Atom configuration, I set up:
flake8
symlink pointing to my non-default flake8 (in my case under Arch Linux, ln -s /usr/bin/flake8-python2 ~/.flake8-python2/flake8
)Then I can start an Atom session...
atom /path/to/vanilla_project/
$PATH
. For example, I start an Atom session for my python2-based dailygrooves with PATH=~/.virtualenvs/dailygrooves/bin:~/.flake8-python2/:$PATH atom ~/projects/dailygrooves/
Repeatable, stateless virtualenv/flake8 Atom environments! 🎉 . Thoughts? I started the same discussion at autocomplete-python/autocomplete-python#56
No PEP257 errors are being reported despite flake8-pep257
or flake8-docstrings
installed (tested with both).
Running flake8
in the command line on an example Python file gives the output:
build.py:1:1: D100 Missing docstring in public module
build.py:8:1: D103 Missing docstring in public function
build.py:21:1: D103 Missing docstring in public function
However these are not displayed by this linter. In the package settings I've tried changing it to recognise E, W, D
rather than just E, W
, but this has no effect.
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app/src/config.js:374:19)
LinterFlake8.destroy (/Users/joonathan/.atom/packages/linter-flake8/lib/linter-flake8.coffee:40:16)
Attempts to ignore E126 (over-indented line) warnings do not work. I work in a shared code base and am not able to do huge whitespace commits without hearing it from my teammates. However, since Linter no longer supports hiding the status bar errors, now half of my screen is taken up by these errors. Just looking for a way to silence them, as these errors are littered throughout the projects I'm working on.
Happy to provide more info to help debug.
More deprecation warnings
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API
LinterFlake8.Linter (C:\Users\Landon\.atom\packages\linter\lib\linter.coffee:60:4)
new LinterFlake8 (C:\Users\Landon\.atom\packages\linter-flake8\lib\linter-flake8.coffee:25:4)
Object.lint (C:\Users\Landon\.atom\packages\linter\lib\legacy.coffee:61:21)
<unknown> (C:\Users\Landon\.atom\packages\linter\lib\editor-linter.coffee:68:23)
<unknown> (C:\Users\Landon\.atom\packages\linter\lib\editor-linter.coffee:67:24)
Set.forEach (native)
flake8 not found
errorVariable isnt used anymore in 1.6.0
and it just confuses users.
flake8 is installed via my package manager (pacman) and is in my path
me@there ~/ % which flake8
/usr/bin/flake8
But linter-flake8 tells me
Failed to spawn command /usr/bin/flake8. Make sure /usr/bin/flake8 is installed and on your PATH
I already set the executable Directory in ~/.atom/config.cson
. Atom tells me
/usr/share/atom/resources/app/src/buffered-process.js:104 Uncaught BufferedProcessError: Failed to spawn command `/usr/bin/flake8`. Make sure `/usr/bin/flake8` is installed and on your PATH
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.