mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-25 12:50:03 +03:00
Add dub.selections.json, upgrade libdparse 0.22.0
Note: currently a warning is emitted when building, because dscanner now depends on libdparse 0.22.0, but dsymbol doesn't support it officially yet. We just force it with dub.selections.json to build with 0.22.0 for executable builds.
This commit is contained in:
parent
9abcf49544
commit
d5d6920502
7 changed files with 37 additions and 7 deletions
13
.github/workflows/default.yml
vendored
13
.github/workflows/default.yml
vendored
|
@ -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' },
|
||||
|
@ -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 }}
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -34,4 +34,3 @@ dsc
|
|||
|
||||
# Dub stuff
|
||||
.dub
|
||||
dub.selections.json
|
||||
|
|
2
DCD
2
DCD
|
@ -1 +1 @@
|
|||
Subproject commit 4c426d73d1a7e8428a66eddd4fb98cc70ab1cff8
|
||||
Subproject commit 4946d49abdc35810254151923bab30fb3cc2c004
|
2
dub.json
2
dub.json
|
@ -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",
|
||||
|
|
12
dub.selections.json
Normal file
12
dub.selections.json
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 592ef39a73a58439afc75a3e6c13a0d87d0b847d
|
||||
Subproject commit 98bf0f4166578717e0b78472ff5054d6f918e797
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue