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

vim integration issues #25

Closed
tristanwietsma opened this issue Dec 22, 2014 · 4 comments
Closed

vim integration issues #25

tristanwietsma opened this issue Dec 22, 2014 · 4 comments

Comments

@tristanwietsma
Copy link

Syntastic is complaining:

syntastic: error: checker r/lintr returned abnormal status 1

Any thoughts? I'm guessing this is a path issue...

  • I've got lintr enabled in the vimrc per README:
...
" Syntastic
let g:syntastic_r_checkers = 1
let g:syntastic_enable_r_lintr_checker = 1
let g:syntastic_r_lintr_linters = "with_defaults(line_length_linter(80))"
  • I can load the lintr library in R
  • I've got the lintr.vim in the syntax checkers directory:
$ tree .vim/bundle/syntastic/syntax_checkers/r
.vim/bundle/syntastic/syntax_checkers/r
├── lint.vim
├── lintr.vim
└── svtools.vim
  • :echo executable('R') gives 1

Here is the debug output from syntastic:

"EngineXLSX.R" [dos] 659L, 26539C written                                                                                                                                                                                       
syntastic: 56.585804: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shelltemp = 1, &shellxquote = '', &shellxescape = ''                  
syntastic: 56.586569: UpdateErrors (auto): default checkers                                                                                                                                                                     
syntastic: 56.587531: CacheErrors: default checkers                                                                                                                                                                             
syntastic: 56.589386: g:syntastic_aggregate_errors = 0                                                                                                                                                                          
syntastic: 56.589759: getcwd() = /Users/tristan.wietsma/repos/ReportEngine                                                                                                                                                      
syntastic: 56.590313: CacheErrors: Invoking checker: r/lintr                                                                                                                                                                    
syntastic: 56.590954: SyntasticMake: called with options: {'errorformat': '%W%f:%l:%c: style: %m,%W%f:%l:%c: warning: %m,%E%f:%l:%c: error: %m,', 'makeprg': 'R --slave --restore --no-save -e ''library(lintr); lint(cache = TR
UE, commandArgs(TRUE), with_defaults(line_length_linter(80)))'' --args EngineXLSX.R', 'returns': [0]}                                                                                                                           
syntastic: 57.536184: checker output: ['Error in body(fun) : object ''fun'' not found', 'Calls: lint ... lapply -> FUN -> <Anonymous> -> findLocalsList -> body', 'Execution halted', '']                                       
syntastic: error: checker r/lintr returned abnormal status 1                                                                                                                                                                    
syntastic: 57.537370: r/lintr raw: []                                                                                                                                                                                           
syntastic: 57.537783: quiet_messages filter: {}                                                                                                                                                                                 
syntastic: 57.538355: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []} 
@jimhester
Copy link
Member

Try running lint('EngineXLSX.R', with_defaults(line_length_linter(80)) in a normal R session. If there is an error please open a new issue with that error. This doesn't look like an error with the syntactic integration, but instead the linting is failing on your file for some reason.

@tristanwietsma
Copy link
Author

> lint('EngineXLSX.R', with_defaults(line_length_linter(80)))
Error in body(fun) : object 'fun' not found

The source does execute. Granted, it is a steaming pile of technical debt, but it does run.

@tristanwietsma
Copy link
Author

opening new ticket; sorry missed the note.

@jimhester
Copy link
Member

if you can include the results of traceback() after the error as well!

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