No matter where I try to put:
let g:syntastic_python_checker = 'flake8 --ignore=E501'
Syntastic always overrides it to:
let g:syntastic_python_checker = flake8
What do I have to do to get it to obey mine? The only way I can get it to work is either entering it after I've already opened MacVim...
I believe you need to use:
let g:syntastic_python_checker_args='--ignore=E501'
See: https://github.com/datanoise/vimfiles/blob/master/bundle/syntastic/syntax_checkers/python.vim
No that doesn't fix it :(
It does for me. I've been using it.
Maybe you forgot to ":source $MYVIMRC" after you made the change?
I made the change and quit MacVim completely...still no dice :(
Here's my .gvimrc.after file:
https://gist.github.com/2220979
On Tue, Mar 27, 2012 at 2:23 PM, Nick Zalutskiy <
[email protected]
wrote:
It does for me. I've been using it.
Maybe you forgot to ":source $MYVIMRC" after you made the change?
Reply to this email directly or view it on GitHub:
https://github.com/scrooloose/syntastic/issues/204#issuecomment-4724315
Kevin R. Stanton
c | 7348463915
e | [email protected]
Stantonk, I had the same behavior with standard vim.
In my case I had my g:syntastic_python_checker_args statement before the Pathogen infect line in my .vimrc. Basically I was setting the variable then it was getting overwritten when Pathogen actually loaded Syntastic.
Moving the lines after the Pathogen stuff fixed it for me.
stanton, you might want to reduce the size too this,
let g:syntastic_python_checker_args='--ignore=E501'
it could be something not getting escaped properly, like the commas.
I'm having the same problem as stantonk -- no matter where I put the ignore line, syntastic is not picking it up.
I think you may want to replace checker with the name of the subchecker being used (from the docs: syntastic_[filetype]_[subchecker]_args). So, you may want
let g:syntastic_python_flake8_args='--ignore=E501'
This is working for me in my .vimrc
let g:syntastic_python_flake8_post_args='--ignore=E501,E128,E225'
fwiw, @kluikens' suggestion fixed it.
i staill have the same problem:
Bundle "scrooloose/syntastic"
let g:syntastic_python_checkers = ['flake8']t
"need fix not working
let g:syntastic_python_flake8_args = '--ignore="E501,E302,E261,E262,E701,E241,E126,E127,E128,W801"'
will still signal errors (EE)
Try leaving out the double quotes.
thanks seems to work now
no i was wrong there were real warning in the code this time so the style error were ignored
the problem persist with
let g:syntastic_python_flake8_post_args = '--ignore=E501,E302,E261,E262,E701,E241,E126,E127,E128,W801'
and
let g:syntastic_python_flake8_args = '--ignore=E501,E302,E261,E262,E701,E241,E126,E127,E128,W801'
Please add let g:syntastic_debug = 1 to your vimrc, run the checker, and post the output of :messages.
"crawler.py" 108L, 4282C
syntastic: debug: CacheErrors: Invoking checker: flake8
syntastic: debug: SyntasticMake: called with options: {'errorformat': '%E%f:%l: could not compile,%-Z%p^,%W%f:%l:%c: F%n %m,%W%f:%l:%c: C%n %m,%E%f:%l:%c: %t%n %m,%E%f:%l: %t%n %m,%-G%.%#', 'makeprg': 'flake8 ''crawler.py''
--ignore=E501,E302,E261,E262,E701,E241,E126,E127,E128,W801 '}
"crawler.py" 108L, 4282C written
syntastic: debug: CacheErrors: Invoking checker: flake8
syntastic: debug: SyntasticMake: called with options: {'errorformat': '%E%f:%l: could not compile,%-Z%p^,%W%f:%l:%c: F%n %m,%W%f:%l:%c: C%n %m,%E%f:%l:%c: %t%n %m,%E%f:%l: %t%n %m,%-G%.%#', 'makeprg': 'flake8 ''crawler.py''
--ignore=E501,E302,E261,E262,E701,E241,E126,E127,E128,W801 '}
This looks correct. What happens if you run on the command line:
flake8 'crawler.py' --ignore=E501,E302,E261,E262,E701,E241,E126,E127,E128,W801
no output
if i remove the E501 from the list when running flake8 directly i got E501 Errors so it works as it should
So basically the problem is in your exclusion list.
well the problem isn't with flake8 but still i have no idea what is wrong with my exclusion list since it works with flake
Well, syntastic doesn't come up with error messages on its own, it just reads them from the external checkers and shows them to you in a window. Thus, no error message from flake8 means no error message in syntastic.
then the fact that i still got error message is a mistery of the universe?
sorry don't want to be rude but if the same list copied and pasted a a flake8 flag work as it should in plain flake but it won't with syntastic there is something wrong in the middle am i wrong?
Sorry, you just lost me. Is there any error message that flake8 produces on the command line, but not when run (with the same flags) from inside syntastic? I'm not a mind reader, you know.
oh sorry, i was sure to have specified it
yes, syntastic still give me the error messages for these error code
while on flake the same string give me none of them
At this point, the only somewhat rational explanations that come to mind are either a $PATH problem (that is, flake8 that gets run from Vim is not the same as the flake8 that gets run on the command line), or a bug in Vim (perhaps limiting the length of the command line it passes on).
i tried with
--ignore=E501
and it didn't change anything
and there is only one flake8 executable in my system so i don't think that's it
thanks for your help
mmm
i noticed now that the errors generated inside syntastic are from pep8 but it's disabled as a checker and uninstalled from my system
crawler.py|34 col 80 error| E501 line too long (97 > 79 characters) [pep8]
they appear even when i select pylint as my checker
nor is registered as a checker in syntastic:
Syntastic info for filetype: python
Available checkers: flake8 pyflakes pylint python
Currently active checker(s): pylint
Please open the file you're checking, run :SyntasticInfo, and post the output.
edited
Woohoo! I had this problem and couldn't fix it forever. @kluikens suggestion fixed it.
This = win:
let g:syntastic_python_flake8_args='--ignore=E501'
This = fail:
let g:syntastic_python_checker_args='--ignore=E501'
@eupharis: When everything else fail, try reading the manual. It can save you a lot of time.
Hmm. So crazy it might just work!
@kluikens suggestion fixed this issue !
@kurojishi I have met the same problem as you . Have you solved it?
@andyque: Please refrain from contributing to the above Charlie Foxtrot of bug reports. :) Open a new issue, and explain what you did, what you expected to happen, and what happened instead. Mention your OS, your version of syntastic, and your version of Vim. Attaching a small test file that can be used to reproduce the problem would be nice too.
let g:syntastic_python_flake8_args='--ignore=E501'
The better solution is to create a file called flake8 in your home directory with the default args for all calls to flake8.
Most helpful comment
I think you may want to replace
checkerwith the name of the subchecker being used (from the docs:syntastic_[filetype]_[subchecker]_args). So, you may wantThis is working for me in my .vimrc