osxpeppermint / peppermint

The official bug/features tracker for Peppermint
8 stars 2 forks source link

Can additional linters be added? #69

Closed bobrocke closed 9 years ago

bobrocke commented 9 years ago

Such as scss-lint (https://github.com/brigade/scss-lint)?

osxpeppermint commented 9 years ago

Well, let me put it this way. In Peppermint :

So, basically we're talking about Coffee/JavaScript code again.

Now, the ideal scenario would be to find a linter in JavaScript - so that it can be imported directly.

The next scenario would be to use something already installed in the system (e.g. the python, ruby, php compilers could come in really handy, if you wanted to create a Python/Ruby/PHP linter).

Now, regarding this linter (scss-lint):

From what I can see, it's in ruby. Now, if we could package it (meaning: the linter + all of its dependencies) in a folder and have it within the Builtin plugin - without the user having to have anything installed beforehand - then obviously this can work.

P.S. I'm pretty much Ruby-illiterate, so I don't know a lot about Ruby gems' portability. However, the idea is the same: if you can put the "gem" into a file/folder (and package it along with the builtin), then the builtin can surely make use of it.

bobrocke commented 9 years ago

Can Peppermint call an arbitrary piece of code and let the system worry about executing it? That is, let the user worry about getting scss-lint and its dependencies installed, and the Peppermint just calls it?

osxpeppermint commented 9 years ago

Well, of course.

Peppermint can execute any type of app that the "normal" OSX terminal app can. And then process the output. (See: http://osxpeppermint.com/documentation#api-terminal-method-exec)

P.S. What I was mostly thinking of when writing the above answer (and plugins) is the portability: meaning you can't write a plugin (e.g. for SCSS), supposedly with a Linter included, and then tell the user "oops, there are some tons of dependencies/libraries/binaries missing. If you don't install them, the Linter won't work" (I personally hate this approach. Either make it work out-of-the-box, or not make it all). Now, if we're talking about something to be used by you (or with the risk of binary "X" not being installed), then you are sure free to do whatever you wish... :)

bobrocke commented 9 years ago

OK, that's not too bad. I agree, packaging up the whole thing is MUCH nicer. But can be a lot of work. Sublime Text and Atom linters mostly expect the user to have installed the binary and they'll just call that. Brackets has at least one extension that does package up linters written in JavaScript and I sure does make things easier on the user.

But many (most?) users of these editors are not "users" but rather developers. So they can handle some extra complexity, even if they don't like it (me).

That said, https://github.com/MiguelCastillo/Brackets-InteractiveLinter has JavaScript linters within. Do you already have all of those? Or can any of them help you?

I really like the idea that the editor comes with its own linters pre-installed, as you're doing with Peppermint.

osxpeppermint commented 9 years ago

Well, the thing to know who your "end users" are is really important. And developers are by far my preferred audience haha. However, me being a developer for as long as I can remember myself, I assure you, when opening an editor (most likely to work on something), I don't want to waste my time doing housekeeping... :)

Now, as for the link with the Brackets' Linters, unfortunately I don't think it's much of a help. All of them are already included (The "official" list of Linters included - http://osxpeppermint.com - is pretty much up-to-date. The only thing missing is the Haxe one, and one in Python that I'm currently working on).

In any case, the ability to use/write external Linters is a very new addition to Peppermint (only one week old, If I remember right), so there are lots of things to be done. And most importantly, add as many Linters as possible. So... whatever you find that you think it might be useful, just let me know. Especially JS-based linters for any language (not already included).

osxpeppermint commented 9 years ago

SCSS Linter implemented as of the upcoming 1.5 beta 19.