Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a way to run multiple checkers. #130

Open
mforbes opened this issue Apr 27, 2014 · 4 comments
Open

Added a way to run multiple checkers. #130

mforbes opened this issue Apr 27, 2014 · 4 comments

Comments

@mforbes
Copy link

mforbes commented Apr 27, 2014

From the documentation, it seems like one should be able to run multiple checkers with something like the following:

(epy-setup-checker "pyflakes %f; pep8 %f")

but because of the abstraction, this is passed to flymake as the command pyflakes with the rest as arguments (which fails). Ideally one would be able to add multiple commands with something like

(epy-add-checker "pyflakes %f")
(epy-add-checker "pep8 %f")

which would fail gracefully if one of the commands does not work, but still runs the others. Unfortunately I have been unable to grok the flymake documentation well enough to suggest a reasonable course of action here. Hoping this is an easy fix for you.

As a workaround, one can always define a custom script like and run this instead, but this is an ugly solution for deployment as it requires distribution and installation of this script:

#!/bin/bash
pyflakes $*
pep8 $*
@gabrielelanaro
Copy link
Owner

Unfortunately I wasn't able to circumvent the issue by running multiple statements as you mentioned.. As far as I remember flymake processes just one statement at a time.

@mforbes
Copy link
Author

mforbes commented May 12, 2014

I also had difficulty getting things to work. My biggest issue now is to be able to use project-specific configurations for the various checkers. It seems your strategy of copying the files before checking breaks the search for configuration files in parent directories.

Have you considered using flycheck instead? It seems to solve both problems (have only used it for a little bit though, so I am not sure how stable it is yet. The issues with TRAMP will probably cause me problems later.)

@gabrielelanaro
Copy link
Owner

I'm not a huge fan of flymake, in fact I've patched it to add some features. flycheck looks really interesting I'll try it out and include it if it's a suitable replacement! Thank you so much for your feedback it's very useful. I'll keep you updated.

@mforbes
Copy link
Author

mforbes commented May 12, 2014

Here is how I am presently using your project:

https://bitbucket.org/mforbes/mmfemacs

I use myrepos to pull in your project and then add a few customizations of my own. In particular, I use a common configuration file -- setup.cfg -- for pylint and and flake8 configuration. If a project defines these in the top level, then they automatically apply, otherwise the user's defaults apply.

However, I could not find a good way of disabling flymake without patching your code. I will open this as a separate issue: please suggest how I can do this better.

Thanks for pulling together these packages: it is very helpful to be able to just pull in a project like yours and get going!

(As an aside, the only things I have found I do not like are:

  1. I often want to open a file from my home directory. I used to do this by c-x c-f then backspacing to clear the line, then starting with "~". This no longer works as backspacing leaves me at root "/" and I need to then get to my home directory from there somehow. Is there a simple solution?
  2. The autoclosing parentheses and quotes are a bit of a pain since I often type the closing one, thus I end up with (1+1)) quite a bit. The best solution is that if a closing parenthesis etc. was automatically inserted, then inserting one at that point will simply move the point outside. I don't know where to go to configure this (or if it is possible).

Sorry for hijacking this issue. I can open these in a new request or put them on the wiki if you like. Just let me know and I will delete this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants