Add support for linting D code with DMD.

This commit is contained in:
w0rp
2016-09-16 22:53:53 +01:00
parent c84bafe7e7
commit a32b380b6f
3 changed files with 120 additions and 0 deletions

16
dmd-wrapper Executable file
View File

@@ -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"