-
-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1929 from andre2007/reportfile
Lint: Add --report-file argument merged-on-behalf-of: Petar Kirov <[email protected]>
- Loading branch information
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Dub lint now supports --report-file argument. | ||
|
||
Dub lint can now be called with --report-file argument: | ||
dub lint --report-file report.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#!/usr/bin/env bash | ||
. $(dirname "${BASH_SOURCE[0]}")/common.sh | ||
DIR=$(dirname "${BASH_SOURCE[0]}") | ||
cd ${CURR_DIR}/issue1773-lint | ||
rm -rf report.json | ||
|
||
if ! { ${DUB} lint --root ${DIR}/issue1773-lint || true; } | grep -cF "Parameter args is never used."; then | ||
if ! { ${DUB} lint || true; } | grep -cF "Parameter args is never used."; then | ||
die $LINENO 'DUB lint did not find expected warning.' | ||
fi | ||
|
||
${DUB} lint --report-file report.json | ||
if ! grep -c -e "Parameter args is never used." report.json; then | ||
die $LINENO 'Linter report did not contain expected warning.' | ||
fi |