diff options
author | w0rp <devw0rp@gmail.com> | 2016-09-16 22:53:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-09-16 22:53:53 +0100 |
commit | a32b380b6f31027e2a6f968cc323bb49f62ac3b3 (patch) | |
tree | a6f2127e96c608442bf111774c5c928f454545f6 /dmd-wrapper | |
parent | c84bafe7e78563f8cb2ea2c0171dc9a09c146d34 (diff) | |
download | ale-a32b380b6f31027e2a6f968cc323bb49f62ac3b3.zip |
Add support for linting D code with DMD.
Diffstat (limited to 'dmd-wrapper')
-rwxr-xr-x | dmd-wrapper | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dmd-wrapper b/dmd-wrapper new file mode 100755 index 00000000..e413f083 --- /dev/null +++ b/dmd-wrapper @@ -0,0 +1,16 @@ +#!/bin/bash -eu + +# This script wraps DMD so we can get something which is capable of reading +# D code from stdin. + +temp_file=`mktemp` +mv "$temp_file" "$temp_file".d +temp_file="$temp_file".d + +trap "rm $temp_file" EXIT + +while read line; do + echo "$line" >> "$temp_file" +done + +dmd "$@" "$temp_file" |