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
9 changes: 5 additions & 4 deletions .github/workflows/trustfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ jobs:
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Check SPDX license compliance
run: |
# All source files must use MPL-2.0
# Estate licence policy: code is MPL-2.0, docs are CC-BY-SA-4.0.
# Flag only files whose SPDX header is neither of the two.
WRONG_LICENSE=$(grep -rl "SPDX-License-Identifier:" src/ ffi/ bindings/ 2>/dev/null | \
xargs grep -L "MPL-2.0" 2>/dev/null | wc -l)
xargs grep -LE "MPL-2.0|CC-BY-SA-4.0" 2>/dev/null | wc -l)
if [ "$WRONG_LICENSE" -gt 0 ]; then
echo "ERROR: $WRONG_LICENSE files have incorrect SPDX license headers"
echo "ERROR: $WRONG_LICENSE files have an SPDX header that is neither MPL-2.0 (code) nor CC-BY-SA-4.0 (docs)"
grep -rl "SPDX-License-Identifier:" src/ ffi/ bindings/ 2>/dev/null | \
xargs grep -L "MPL-2.0" 2>/dev/null | head -20
xargs grep -LE "MPL-2.0|CC-BY-SA-4.0" 2>/dev/null | head -20
exit 1
fi
echo "License compliance: PASS"
Expand Down
4 changes: 2 additions & 2 deletions bindings/d/source/proven/safe_color.d
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ struct ColorResult
string error;
bool ok;

static ColorResult success(RGB color)
static ColorResult success(RGB color) nothrow
{
return ColorResult(color, "", true);
}

static ColorResult failure(string error)
static ColorResult failure(string error) nothrow
{
return ColorResult(RGB.init, error, false);
}
Expand Down
4 changes: 2 additions & 2 deletions bindings/d/source/proven/safe_currency.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ struct CurrencyResult
string error;
bool ok;

static CurrencyResult success(long amount, ubyte[3] code, ubyte decimals)
static CurrencyResult success(long amount, ubyte[3] code, ubyte decimals) nothrow
{
return CurrencyResult(amount, code, decimals, "", true);
}

static CurrencyResult failure(string error)
static CurrencyResult failure(string error) nothrow
{
return CurrencyResult(0, [0, 0, 0], 0, error, false);
}
Expand Down
4 changes: 2 additions & 2 deletions bindings/d/source/proven/safe_datetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ struct DateTimeResult
string error;
bool ok;

static DateTimeResult success(DateTime dt)
static DateTimeResult success(DateTime dt) nothrow
{
return DateTimeResult(dt, "", true);
}

static DateTimeResult failure(string error)
static DateTimeResult failure(string error) nothrow
{
return DateTimeResult(DateTime.init, error, false);
}
Expand Down
4 changes: 2 additions & 2 deletions bindings/d/source/proven/safe_phone.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ struct PhoneResult
string error;
bool ok;

static PhoneResult success(PhoneNumber phone)
static PhoneResult success(PhoneNumber phone) nothrow
{
return PhoneResult(phone, "", true);
}

static PhoneResult failure(string error)
static PhoneResult failure(string error) nothrow
{
return PhoneResult(PhoneNumber.init, error, false);
}
Expand Down
4 changes: 2 additions & 2 deletions bindings/d/source/proven/safe_url.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ struct UrlResult
string error;
bool ok;

static UrlResult success(ParsedUrl url)
static UrlResult success(ParsedUrl url) nothrow
{
return UrlResult(url, "", true);
}

static UrlResult failure(string error)
static UrlResult failure(string error) nothrow
{
return UrlResult(ParsedUrl.init, error, false);
}
Expand Down
Loading