Hi list,

Haskell has a really cool package called ShellCheck which you can run
against shell scripts. It's a linting tool that catches a ton of issues,
especially escaping ones.
Unfortunately nix expressions embed the shell fragments so it's hard to run
the tool against them. Has anyone had any success doing that or
experimented with attaching a build.sh that contains the steps as functions
instead ?

Another thing I noticed, since we depend on bash4+ features in the stdenv
setup.sh script, what is our policy regarding shell style ?
It's rather inconsistent across the board. Luckily $out is guaranteed not
to contain any spaces so escaping is less of an issue but we could make use
of [[ ]] tests for example that don't have the escaping problems that the [
] has.

That's all I have to say on bash for now, maybe other person have had more
thoughts about this subject.

Cheers,
z
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to