Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
]
build: [
{ type: make },
{ type: dub, version: 'current' },
{ type: dub, version: 'min libdparse' },
# Fail due to unresolvable dependencies
# { type: dub, version: 'max libdparse' },
Expand Down Expand Up @@ -104,14 +105,22 @@ jobs:

# Compile D-Scanner and execute all tests using a specific dependency version
# Currently skipped for GDC (dub installed from apt-get is broken)
- name: Build and test with dub
if: ${{ matrix.build.type == 'dub' }}
- name: Build and test with dub (min or max libdparse test)
if: ${{ matrix.build.type == 'dub' && matrix.build.version != 'current' }}
env:
DC: ${{ matrix.compiler.dmd }}
run: |
rdmd ./d-test-utils/test_with_package.d ${{ matrix.build.version }} -- dub build
rdmd ./d-test-utils/test_with_package.d ${{ matrix.build.version }} -- dub test

- name: Build and test with dub (with dub.selections.json)
if: ${{ matrix.build.type == 'dub' && matrix.build.version == 'current' }}
env:
DC: ${{ matrix.compiler.dmd }}
run: |
dub build
dub test

- uses: actions/upload-artifact@v2
with:
name: bin-${{matrix.build.type}}-${{matrix.build.version}}-${{ matrix.compiler.dmd }}-${{ matrix.host }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ dsc

# Dub stuff
.dub
dub.selections.json
2 changes: 1 addition & 1 deletion DCD
2 changes: 1 addition & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"StdLoggerDisableWarning"
],
"dependencies": {
"libdparse": ">=0.20.0 <0.22.0",
"libdparse": ">=0.20.0 <0.23.0",
"dcd:dsymbol": ">=0.14.0 <0.16.0",
"inifiled": "~>1.3.1",
"emsi_containers": "~>0.9.0",
Expand Down
12 changes: 12 additions & 0 deletions dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"fileVersion": 1,
"versions": {
"dcd": "0.15.2",
"dsymbol": "0.13.0",
"emsi_containers": "0.9.0",
"inifiled": "1.3.3",
"libddoc": "0.8.0",
"libdparse": "0.22.0",
"stdx-allocator": "2.77.5"
}
}
12 changes: 11 additions & 1 deletion src/dscanner/analysis/assert_without_msg.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ final class AssertWithoutMessageCheck : BaseAnalyzer

override void visit(const AssertExpression expr)
{
if (expr.assertArguments && expr.assertArguments.message is null)
static if (__traits(hasMember, expr.assertArguments, "messageParts"))
{
// libdparse 0.22.0+
bool hasMessage = expr.assertArguments
&& expr.assertArguments.messageParts.length > 0;
}
else
bool hasMessage = expr.assertArguments
&& expr.assertArguments.message !is null;

if (!hasMessage)
addErrorMessage(expr.line, expr.column, KEY, MESSAGE);
}

Expand Down