Le ven. 18 mars 2022 à 22:01, Erik Parawell <eri...@si...> a
écrit :
> Hi,
>
> I’m managing a lot of module files and I was wondering if there is a
> linter for modules files or maybe some formatter (espeically for
> indentation). I have seen that nagelfar132 is a good linter for TCL code
> and that you can create a new syntax database using a provided scrip, but I
> can’t figure out if I can even run that script with the module interpreter.
>
> Suggestions are welcome!
>
> Regards,
> Erik Parawell
>
Hi Erik,
As far as I know there is no linter existing for modulefiles. Best thing
available at the moment is to use "module test" against the modulefiles to
see if there are syntax errors.
Using Nagelfar for linting seems quite interesting. Need to figure out how
a new syntax db could be generated with all Tcl commands and variables
added by the modulefile interpreter.
Regarding code formatter, it seems there are not a lot of solution
available out there. I have found (but not tested) this script proposed by
the Tcl community:
https://wiki.tcl-lang.org/page/Reformatting+Tcl+code+indentation
Regards,
Xavier
|