Created
October 17, 2013 07:07
-
-
Save alexgarel/7020353 to your computer and use it in GitHub Desktop.
Using Geany and launching jshint ? This script parse jshint output and add line filename and line numbers and produce an output suitable for Geany (underlining errors and jumping to related line as you cilck on jshint ouput).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Geany jshint output reformater | |
When defining your compile command in geany | |
just use /path/to/jshint %f |/path/to/reformat_jshint.py | |
""" | |
import re | |
import sys | |
line_indic = re.compile(r": line (?P<line>\d+), col (?P<col>\d+),") | |
while True: | |
l = sys.stdin.readline() | |
if not l: | |
break | |
print(line_indic.sub(':\g<line>:\g<col>:', l), end='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment