Giter Site home page Giter Site logo

coala-vim's Introduction

https://cloud.githubusercontent.com/assets/5716520/24838296/a9cf5f04-1d45-11e7-855c-47b816ce1e09.png

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." โ€• John F. Woods


Linux Build Status Windows Build status macOS Build Status codecov.io Documentation Status AGPL OpenHub


coala provides a unified interface for linting and fixing code with a single configuration file, regardless of the programming languages used. You can use coala from within your favorite editor, integrate it with your CI, get the results as JSON, or customize it to your needs with its flexible configuration syntax.

coala supports popular programming languages including Python, C/C++, Java, JavaScript, CSS, and several others out of the box.

Install coala | Get Involved | Chat | Roadmap | Blog | Twitter

coala-vim's People

Contributors

adtac avatar attila0x2a avatar khanchi97 avatar rohanvb avatar sils 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

Watchers

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

coala-vim's Issues

Pass parameters

I would love to pass parameters to coala.
Right now I have the following settings:

  autocmd FileType python map <F8> <ESC>:!coala --no-config --apply-patches
        \--bears=CPDBear,PEP8Bear,PyImportSortBear,PyUnusedCodeBear,RadonBear
        \--files=%

I hope at least I can have --no-config to keep my code base clean.
I do not want to edit .gitignore.

Also, can there be file type dependent settings?

Deprecating coala-vim in favour of syntastic

Syntastic does seem to look pretty promising. It's well-documented. The interface looks good and it does the job. The plugin itself has proper support and works with all the major plugin managers on vim.
It'll need a PR to be added as a checker in syntastic, enabling it to be used (to my understanding at the moment). Also the vimrc will have
let g:syntastic_<filetype>_checkers = ['<checker-name>']
So we'd have it under several filetypes I suppose.

Ref:
https://github.com/vim-syntastic/syntastic

continuously test coala-vim

There should be regular tests of coala-vim to ensure flawless functionality with the latest versions of coala.

Add ISSUE_TEMPLATE.md

Add a file named ISSUE_TEMPLATE.md which includes general information and guidelines for issue reporter, you can see ISSUE_TEMPLATE.md of coala repository for reference.
label: initiatives/gci
Opened by @Monal5031 at gitter//Monal5031

Deprecating coala-vim in favor of neomake

In issue #21, @adtac said your'e thinking about deprecating coala-vim in favor of neomake.

I opened this issue to discuss this.

The following illustrates a working example of coala+neomake, and my thoughts.
TL;DR: I think we shouldn't deprecate this plugin because moving to neomake feels like a hack.

First, here's a the base coala configuration with neomake:

let g:neomake_python_coala_maker = {
         \ 'exe': '/opt/nvim/python3/bin/coala',
         \ 'args': ['--bears=PyUnusedCodeBear,
         \ PyCommentedCodeBear,
         \ PEP8Bear,
         \ PyImportSortBear,
         \ PyUnusedCodeBear',
         \'--no-config',
         \          '--no-orig',
         \          '--apply-patches',
         \          '--no-color',
         \          '--files']}

let g:neomake_python_enabled_makers = ['coala']

The problem with the above configuration is that vim doesn't update the buffer when coala makes changes. autoread and checktime don't work in this scenario because the file was changed inside vim.

To force the buffer to reload, I added a 'JobFinished' hook:

 augroup neomake_hooks
   au!

   function! NeomakeJobFinished()
      let l:jobinfo = g:neomake_hook_context.jobinfo
      if l:jobinfo['maker']['name'] == "coala"
         edit
      endif
   endfunction

   autocmd User NeomakeJobFinished call NeomakeJobFinished()
   autocmd BufWritePost * update | Neomake

augroup END

Now coala updates correctly, but there's a problem. neomake runs all makers in parallel, so if we add another maker that should run after coala, we're in trouble.

To solve that, we need to run each maker sequentially:

let g:neomake_python_coala_serialize = 1

but that creates another problem, because neomake stops maker processing if one of the makers returned a non-zero exit code. coala uses many non-zero status code. this forces us to add:

let g:neomake_python_coala_serialize_abort_on_error = 0

All in all, I think neomake is not the right tool to run coala.

Add PULL_REQUEST_TEMPLATE.md

Add a file named PULL_REQUEST_TEMPLATE.md which includes general information and guidelines for the author of Pull Request, you can see PULL_REQUEST_TEMPLATE.md of coala repository for reference.
label: initiatives/gci
Opened by @Monal5031 at gitter//Monal5031

Close echo panel if it is empty

The message would show up during the scanning, and disappear when the scanning is done and leave the panel open.
Close the panel if it is empty, and try to preserve messages if it is useful.

Plugin runs slower than native coala

It takes about 3 seconds to run in command line, but it will be like a minute when using the plug-in.
Is it scanning only the current file or not?

Installing vundle sucks

they show me like a huge config and claim that some stuff is optional, until I read that I'll switch to something else. :P Can we make that easier for our users?

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.