MarcusCalidus / marcuscalidus-svg-panel

Grafana panel for displaying metric sensitive SVG images using the snap svg library
MIT License
63 stars 28 forks source link

Events. Too many errors. (37% scanned). #15

Closed ZuperZee closed 6 years ago

ZuperZee commented 6 years ago

Hey. I was writing some code in events and it said "Too many errors. (37% scanned)." I copied the code to JSHint, and the only thing it was complaining about was.

Two undefined variables

1 | Snap 1 | svgnode

My first line is : var s = Snap(svgnode);

How do I fix that?

ZuperZee commented 6 years ago

Sorry, there is no problem with the first line, but after 100 lines (all filled lines) there will come an error with the message "Too many errors. (50% scanned)." or something similar.

If you could help me get rid of that error message, that would help a lot.

MarcusCalidus commented 6 years ago

Hi, sorry for my late reply. I was on vacation. Could you please send me the code and SVG that I can test your setup? Also a Screenshot of the error message would be great.

Thank you in advance

ZuperZee commented 6 years ago

Just make some lines and it will pop up.

bitmap

var a1 = 1; var a2 = 1; var a3 = 1; var a4 = 1; var a5 = 1; var a6 = 1; var a7 = 1; var a8 = 1; var a9 = 1; var a10 = 1; var a11 = 1; var a12 = 1; var a13 = 1; var a14 = 1; var a15 = 1; var a16 = 1; var a17 = 1; var a18 = 1; var a19 = 1; var a20 = 1; var a21 = 1; var a22 = 1; var a23 = 1; var a24 = 1; var a25 = 1; var a26 = 1; var a27 = 1; var a28 = 1; var a29 = 1; var a30 = 1; var a31 = 1; var a32 = 1; var a33 = 1; var a34 = 1; var a35 = 1; var a36 = 1; var a37 = 1; var a38 = 1; var a39 = 1; var a40 = 1; var a41 = 1; var a42 = 1; var a43 = 1; var a44 = 1; var a45 = 1; var a46 = 1; var a47 = 1; var a48 = 1; var a49 = 1; var a50 = 1; var a51 = 1; var a52 = 1; var a53 = 1; var a54 = 1; var a55 = 1; var a56 = 1; var a57 = 1; var a58 = 1; var a59 = 1; var a60 = 1; var a61 = 1; var a62 = 1; var a63 = 1; var a64 = 1; var a65 = 1; var a66 = 1; var a67 = 1; var a68 = 1; var a69 = 1; var a70 = 1; var a71 = 1; var a72 = 1; var a73 = 1; var a74 = 1; var a75 = 1; var a76 = 1; var a77 = 1; var a78 = 1; var a79 = 1; var a80 = 1; var a81 = 1; var a82 = 1; var a83 = 1; var a84 = 1; var a85 = 1; var a86 = 1; var a87 = 1; var a88 = 1; var a89 = 1; var a90 = 1; var a91 = 1; var a92 = 1; var a93 = 1; var a94 = 1; var a95 = 1; var a96 = 1; var a97 = 1; var a98 = 1; var a99 = 1; var b1 = 1; var b2 = 1; var b3 = 1; var b4 = 1; var b5 = 1; var b6 = 1; var b7 = 1; var b8 = 1; var b9 = 1; var b10 = 1; var b11 = 1; var b12 = 1; var b13 = 1; var b14 = 1; var b15 = 1; var b16 = 1; var b17 = 1; var b18 = 1; var b19 = 1; var b20 = 1; var b21 = 1; var b22 = 1; var b23 = 1; var b24 = 1; var b25 = 1; var b26 = 1; var b27 = 1; var b28 = 1; var b29 = 1; var b30 = 1; var b31 = 1; var b32 = 1; var b33 = 1; var b34 = 1; var b35 = 1; var b36 = 1; var b37 = 1; var b38 = 1; var b39 = 1; var b40 = 1; var b41 = 1; var b42 = 1; var b43 = 1; var b44 = 1; var b45 = 1; var b46 = 1; var b47 = 1; var b48 = 1; var b49 = 1; var b50 = 1; var b51 = 1; var b52 = 1; var b53 = 1; var b54 = 1; var b55 = 1; var b56 = 1; var b57 = 1; var b58 = 1; var b59 = 1; var b60 = 1; var b61 = 1; var b62 = 1; var b63 = 1; var b64 = 1; var b65 = 1; var b66 = 1; var b67 = 1; var b68 = 1; var b69 = 1; var b70 = 1; var b71 = 1; var b72 = 1; var b73 = 1; var b74 = 1; var b75 = 1; var b76 = 1; var b77 = 1; var b78 = 1; var b79 = 1; var b80 = 1; var b81 = 1; var b82 = 1; var b83 = 1; var b84 = 1; var b85 = 1; var b86 = 1; var b87 = 1; var b88 = 1; var b89 = 1; var b90 = 1; var b91 = 1; var b92 = 1; var b93 = 1; var b94 = 1; var b95 = 1; var b96 = 1; var b97 = 1; var b98 = 1; var b99 = 1;

MarcusCalidus commented 6 years ago

Hi ZuperZee,

seems that this is an issue with ace editor. (https://github.com/ajaxorg/ace/issues/2535) It has nothing to do with the functionality of your code or the plugin. Only the linting of the code is the problem here.

Regards Marco

ZuperZee commented 6 years ago

Thank you.

ZuperZee commented 6 years ago

Is it an easy way to change the Maxerr in https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_worker.js#L92 ?

MarcusCalidus commented 6 years ago

It is quite easy to set that value. But I usually don't meddle with the presets of 3rd party components. Especially since they say that it can cause performance issues (https://github.com/ajaxorg/ace/issues/2535#issuecomment-109979823) But nonetheless you can change that value yourself in the plugin folder "node_modules".There you'll find the ace component.