This commit is contained in:
Hackerpilot 2014-08-25 12:52:01 -07:00
parent 77d6b1baf6
commit a6325f1cf2
3 changed files with 11 additions and 7 deletions

View File

@ -22,23 +22,26 @@ DEBUG_VERSIONS = -version=std_parser_verbose
all: dmdbuild
debug:
${DMD} -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
${DMD} -g -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
dmdbuild:
mkdir -p bin
${DMD} -O -release -inline -ofdscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
${DMD} -O -release -inline -ofbin/dscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
rm -f bin/dscanner.o
gdcbuild:
${GDC} -O3 -frelease -odscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
${GDC} -O3 -frelease -obin/dscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
ldcbuild:
${LDC} -O5 -release -oq -of=dscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
${LDC} -O5 -release -oq -of=bin/dscanner ${VERSIONS} ${INCLUDE_PATHS} ${SRC}
test:
@./test.sh
clean:
rm -rf dsc dsc.o
rm -rf bin
rm -f dscanner-report.json
report: all
dscanner --report src > dscanner-report.json

View File

@ -93,7 +93,7 @@ void analyze(string[] fileNames, StaticAnalysisConfig config,
writeJSON(result.key, result.fileName, result.line, result.column, result.message);
}
}
else
else if (results !is null)
{
foreach (result; results[])
writefln("%s(%d:%d)[warn]: %s", result.fileName, result.line,

View File

@ -3,13 +3,14 @@ rm -f test
rm -f test.o
dmd\
*.d\
src/*.d\
libdparse/src/std/*.d\
libdparse/src/std/d/*.d\
inifiled/source/*.d\
analysis/*.d\
src/analysis/*.d\
-oftest\
-g -unittest
./test
rm -f test test.o