Showing posts with label linting. Show all posts
Showing posts with label linting. Show all posts

Thursday, March 20, 2014

JSONLint.com, an online JSON validator

By Vasudev Ram



JSON page on Wikipedia.

JSON, as most developers nowadays know, has become useful as a data format both for web client-server communication and for data interchange between different languages, since most popular programming languages have support for it (see the lower part of the JSON home page linked above in this sentence).

While searching for information about some specific aspects of JSON for some Python consulting work, I came across this site:

JSONLint.com

JSONLint.com is an online JSON validator. It is from the Arc90 Lab. (Arc90 is the creator of Readability, a tool that removes the clutter from web pages and makes a clean view for reading now or later on your computer, smartphone, or tablet.)

You paste some JSON data into a text box on the site and then click the Validate button, and it tells you whether the JSON is valid or not.

JSONLint.com is a useful resource for any language with JSON support, including Python.

P.S. Arc90 is being acquired by SFX Entertainment, Inc. (NASDAQ:SFXE).

- Vasudev Ram - Python consulting and training

Contact Page

Monday, November 4, 2013

ShellCheck.net, useful site for sh/bash scripters

By Vasudev Ram



Saw this via a tweet by Cameron Laird (@Phaseit):

ShellCheck.net is a web site where you can paste in your sh or bash script, and it will statically analyse and lint it.

Excerpt from the ShelllCheck.net site:

[ ShellCheck is a static analysis and linting tool for sh/bash scripts. It's mainly focused on handling typical beginner and intermediate level syntax errors and pitfalls where the shell just gives a cryptic error message or strange behavior, but it also reports on a few more advanced issues where corner cases can cause delayed failures. ]

Apparently the tool is written in Haskell.

I tried it with the default example shown, and it seems to work, since it gave 5 errors or warnings about the code.

I then tried it again with this simple shell script:
a=1
while $a -lt 5
do
    echo $a
    a=`expr $a + 1`
done

and it found a couple of issues with it: that the backquotes are deprecated, and that expr is antiquated.

- Vasudev Ram - Dancing Bison Enterprises

Contact me



DiscountMags.com