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

Sublime text plugin #27

Closed
gogogarrett opened this issue Dec 25, 2015 · 22 comments
Closed

Sublime text plugin #27

gogogarrett opened this issue Dec 25, 2015 · 22 comments

Comments

@gogogarrett
Copy link

This is a great tool!

Is there anything in the works around getting a sublime / atom linter setup?

@rrrene
Copy link
Owner

rrrene commented Dec 25, 2015

Not at the moment. What would be needed from Credo for someone to implement that?

I thought about adding Flycheck support in the next revision. Might that be a start?

@gogogarrett
Copy link
Author

I'm not sure about the specifics as I have not done this myself, but I use sublime linter with the eslint - er.

I have found this elixir sublime package that aims to do some basic linting, but I would really love to see if we could get credo integrated as well!

@chenghanlee
Copy link

+1 for this suggestion.

I have no idea how to build a sublime plugin, but having credo as psudo, elixir linter for sublime would be fantastic.

@hunterboerner
Copy link

+1 for Flycheck support.

@rrrene
Copy link
Owner

rrrene commented Jan 11, 2016

Okay, I will try to get something done by the end of the week / on the weekend. 👍

We will need beta testers for this. Any volunteers?

@c-rack
Copy link
Contributor

c-rack commented Jan 11, 2016

@rrrene feel free to ping me if there is anything to test

@rrrene
Copy link
Owner

rrrene commented Jan 18, 2016

@c-rack @hunterboerner I just pushed Credo 0.3.0-dev to Hex.pm ...

{:credo, "0.3.0-dev", only: [:dev, :test]}

You can test the Flycheck output via mix credo --format=flycheck 👍

@smeevil
Copy link
Contributor

smeevil commented Feb 26, 2016

Hi,

I just got Dogma working with Flycheck and am now looking into getting Credo to work as well.
I tested the latest build with the Flycheck format and that is looking quite ok.

My question is though, is it possible to give Credo just one file to check in stead of everything ?

For example mix credo --format=flycheck ./path/to/file.ex which will only run the rule set on that file.
This would significantly speed up the check as well :)

Let me know if i can be of any assistance !

@rrrene
Copy link
Owner

rrrene commented Feb 26, 2016

mix credo --format=flycheck ./path/to/file.ex should work (and does for me on Credo v0.3.3).

Doesn't it for you?

@smeevil
Copy link
Contributor

smeevil commented Feb 26, 2016

Ah that works only in combination with the --format=flycheck
Sorry I did not try that !

I'll attempt to make a Flycheck.checker now :)

@smeevil
Copy link
Contributor

smeevil commented Feb 27, 2016

If you are interested, here is the flycheck checker.
It works like a charm and chains Dogma after it is done as well.

https://github.com/smeevil/flycheck-elixir-credo

I only encounter one slight problem with running credo in the flymode format, which is that every error is being output 4 times and it always gives the duplicate code warning at line 1

example :

example

@rrrene
Copy link
Owner

rrrene commented Feb 27, 2016

Definitely a bug. Will have a look tonight!

@rrrene
Copy link
Owner

rrrene commented Feb 29, 2016

@smeevil Fix included in v0.3.4! Can you confirm this works as expected?

@smeevil
Copy link
Contributor

smeevil commented Mar 1, 2016

I did a quick test and it seems like its fixed indeed :) will let you know tomorrow when i’ve done some more testing with it :)
Thanks for the quick response !

Gerard.

On 29 Feb 2016, at 21:11, René Föhring notifications@github.com wrote:

@smeevil https://github.com/smeevil Fix included in v0.3.4! Can you confirm this works as expected?


Reply to this email directly or view it on GitHub #27 (comment).

@smeevil
Copy link
Contributor

smeevil commented Mar 29, 2016

@gogogarrett I am not an atom user myself, but I gave it a shot to create a linter for it anyways, because, why not :)

Is this what you are looking for :

2016-03-29 at 14 25

You can install it by using apm install linter-elixir-credo
or see https://atom.io/packages/linter-elixir-credo and https://github.com/smeevil/linter-elixir-credo

Please let me know what you think :)

Gerard.

@smeevil
Copy link
Contributor

smeevil commented Mar 30, 2016

@rrrene Getting a lot of positive feedback on Twitter regarding the linter for Atom.
As far as I can see, you can close this issue now, and maybe reference the linter in the readme ?

Anyways, all possible due to the read-from-stdin and flycheck format :)

@gogogarrett
Copy link
Author

Thanks a lot for this - it works really well! Very much appreciated.

@radik909
Copy link

Can anyone create a plugin for sublime as well?

@joshjg
Copy link

joshjg commented Nov 14, 2016

@rrrene
Copy link
Owner

rrrene commented Nov 15, 2016

@joshjg Great! You could post that on http://elixirstatus.com and I will include it in the next ElixirWeekly!

@johantell
Copy link

I just created a plugin for sublime text
https://github.com/mintcore/SublimeLinter-contrib-credo/

It's not in package control just yet (SublimeLinter/package_control_channel#37)

@rrrene
Copy link
Owner

rrrene commented Mar 20, 2017

@mintcore Cool! Feel free to ping me when it's merged into PackageControl 👍

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

No branches or pull requests

9 participants