Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] jsonlint (Bug 420721)

Hi Michael,

Thanks for this work. A JSON linter in Orion would be a cool feature, and your code looks like a good start.

I guess for some internal technical reason it's normal that the initial console.log() doesn't actually show up on the Console on plug-in installation (because it runs from a iframe?)

That's odd -- logged messages should appear in your browser console if it's open while you install the plugin. I tried your fork and I do see them. Maybe you have some console filters enabled that are hiding these?

Inline image 1

Why don't I see any error markers, despite seeing console.log('jsonlint failed: ' + e); on the console?

Your plugin has hit a bit of an edge case. It's trying to return a problem that contains a _javascript_ Error object. Errors are not cloneable objects, so you cannot send them directly to Orion from a plugin. Try using error.message or error.toString() as the problem description instead. You will also want to use "start:0" to put the error at the very beginning of the file (offsets are numbered from 0).

(MIT license - OK?).

The MIT License is fine. However, like all Eclipse projects, Orion has to go through an approval process before we can ship a 3rd-party library. If you're contributing only code that you wrote yourself, then you can simply sign the Eclipse CLA as Adrian indicated, and ensure your commit messages have the Signoff footer.

How would one actually contribute this - pull request on GitHub?
 
Yes, pull requests are fine -- just add a comment on the bug with the pull request's URL. Gerrit is another option, but not required.

Mark


On Wed, Oct 30, 2013 at 9:46 AM, Michael Vorburger <mike@xxxxxxxxxxxx> wrote:
Hi,


I guess for some internal technical reason it's normal that the initial console.log() doesn't actually show up on the Console on plug-in installation (because it runs from a iframe?), even though the console.log() from inside _computeProblems() does? I found this confusing.

Why don't I see any error markers, despite seeing console.log('jsonlint failed: ' + e); on the console? I must be doing something wrong in the problem object.. but despite having read http://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.validator and tried a few variants, I can't seem to get this to work for the life of me (I don't ever get any red error markers) - help?

If such a contribution would be welcome, I (or someone else..) could make it give better error messages with fine grained location using e.g. https://github.com/arc90/jsonlintdotcom (MIT license - OK?).

How would one actually contribute this - pull request on GitHub? Gerrit (I've never used it!) ?

Best,
Michael
_______________________
Michael Vorburger
http://www.vorburger.ch

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top