Git Product home page Git Product logo

linter-flake8's Introduction

AtomLinter Website

Adding a Linter Provider

Made a linter provider? Great! We'd love to include it in our list! Just follow this step-by-step process and you're provider will make it to our webpage in no time.

  • Open the content/data/providers.yml file on GitHub.
  • Press the Pencil Icon in the upper Right Corner of the Code Preview.
  • Add your provider to the correct category, following the following structure:
- title: { linter-provider }
  url: { linter-url }
  • Save your commit, and submit your pull request.

linter-flake8's People

Contributors

2m avatar arcanemagus avatar badray avatar beck avatar bstrdsmkr avatar c0dr avatar chaoticmind avatar eteq avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hd-deman avatar hiroaki-yamamoto avatar hvdklauw avatar idan avatar jjlorenzo avatar keras avatar kevinsawicki avatar lexicalunit avatar lucasdf avatar matthewwithanm avatar patrys avatar pjuren avatar rarguellof avatar renovate-bot avatar schepelin avatar steelbrain avatar tsand avatar urbaniak avatar vstoykov avatar walles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linter-flake8's Issues

Uncaught Error: spawn EINVAL

[Enter steps to reproduce below:]

  1. Install linter
  2. Install linter-flake8
  3. Close Atom
  4. GitHub App on OSX: Open Repo in Atom

Atom Version: 1.0.7
System: Mac OS X 10.10.5
Thrown From: linter-flake8 package, v1.6.1

Stack Trace

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)

Commands

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "linter-flake8": {
    "maxLineLength": 80,
    "executablePath": "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    \n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "
  }
}

Installed Packages

# User
linter, v1.4.3
linter-flake8, v1.6.1
script-runner, v1.8.3

# Dev
No dev packages

Doesn’t work any more with atom 0.190.0

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.

How to STOP linter when editing file with particular extension?

When I editing a markdown file, with extension ".md",I use a python code block in it, and then I found that linter-flake8 is running.

How can I STOP it in this file?
Because wrnings and errors about markdown file is neaningless and sometime interrupt my thinking.

pic of warning and errors

flake8 not found

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

python 2 support

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.

Show more detailed error about not found executable

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

Error: ~/.config/flake8 ignored by linter-flake8

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.

Package.getActivationCommands is deprecated.

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 setup file

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.

Package.getActivationCommands is deprecated.

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)

Not loading tox.ini file

linter-flake8 seems to ignore my project's tox.ini and instead only use the rules defined in Settings.

screen shot 2015-09-18 at 11 23 30 am
screen shot 2015-09-18 at 11 24 14 am
screen shot 2015-09-18 at 11 24 35 am

Leaving Ignore Error Codes blank in settings does not make a difference (thought it may be overriding, but not the case)

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.4
System: "Funtoo Linux
Thrown From: linter-flake8 package, v1.6.0

Stack Trace

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

Commands

     -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)

Config

{
  "core": {
    "autoHideMenuBar": true
  },
  "linter-flake8": {
    "executablePath": "/usr/bin/"
  }
}

Installed Packages

# 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

Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.194.0 ⚠️ in 1.0 API Preview Mode ⚠️
System: Mac OS X 10.10.3
Thrown From: linter-flake8 package, v1.4.0

Stack Trace

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)

Commands

  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)

Config

{
  "core": {
    "projectHome": "/Users/paltman/Development",
    "ignoredNames": [
      ".git",
      ".DS_Store",
      "Thumbs.db",
      "*.pyc"
    ]
  },
  "linter-flake8": {
    "executableDir": "/usr/local/opt/pyenv/shims/"
  }
}

Installed Packages

# User
linter, v0.12.1
linter-flake8, v1.4.0
trailing-spaces, v0.2.5

# Dev
No dev packages

Package.getActivationCommands is deprecated.

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)

Ignore Error Codes not working

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.

Package.getActivationCommands is deprecated.

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)

Clashes with autopep8

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?

Object.activate is deprecated.

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)

Config.unobserve is deprecated.

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)

pep8 project configuration file properties are ignored in some cases

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:

  1. If property from plugin settings (ex. 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.
  2. Totaly ignore plugin settings if config file is found.

This is the last thing that stopped me from making new release.

Add a "select" field in settings to include codes skipped by default

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:

  • pass "--select E, W" (or the specific code). This is not possible with linter-flake8, but should be.

A workaround is:

  • pass "--ignore W191" (or any other valid code). Then the default codes won't be ignored anymore
  • pass "--ignore junk_value". This works if we don't want to ignore anything but still want to include all the codes.

Why is lintOnFly disabled?

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?

PEP257 not being run

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.

Package.getActivationCommands is deprecated.

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)

Windows 10 - Doesn't "flake" the code.

  • atom v1.0.7
  • linter v1.3.4
  • linter-flake8 v1.6.0
  • python v3.5b2
    • flake8-2.4.1
    • pyflakes-0.8.1
    • mccabe-0.3.1
    • pep8-1.5.7

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.

Max Line Length and E501

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:
e501

Document usage of $PATH for {configuration, virtualenv package}-less virtualenv/flake8 setting

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:

  • The usual virtualenv with my python2/python3/pypy choice for project A/B/C.
  • A folder with a 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...

  • ... for a python3 / stdlib-only project with atom /path/to/vanilla_project/
  • ... for exotic projects by prepending a modification to $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

Tilde (~) fails to expand in Config File Names

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.

linter-flake8 not working and no user feeback using Atom 1.0.0

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.

Setting to ignore or specify configuration file?

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.

Uncaught Error: spawn EN0ENT

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!

LinterRubocop.Linter is deprecated.

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)

join da club

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:

  1. apm unpublish
  2. move repo to AtomLInter org
  3. fix repo url in package.json
  4. publish again

LinterFlake8.Linter is deprecated.

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)

Package.getActivationCommands is deprecated.

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)

Add unit test for regexp

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.

Uncaught Error: spawn flake8 ENOENT

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.

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.