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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/text/** linguist-vendored
src/detection/cache.bin.zstd filter=lfs diff=lfs merge=lfs -text
25 changes: 17 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: "rustfmt,clippy"
Expand All @@ -30,16 +30,16 @@ jobs:

deny-check:
name: cargo-deny check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2

msrv-check:
name: Minimum Stable Rust Version Check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: dtolnay/[email protected]
- run: cargo fetch
- name: cargo check
Expand All @@ -49,12 +49,21 @@ jobs:
name: Test
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
lfs: true
- run: git lfs checkout
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo build
run: cargo build --tests --all-features
- run: cargo test --all-features

test_success:
runs-on: ubuntu-24.04
needs: [lint, test, deny-check, msrv-check]
steps:
- run: echo "All test jobs passed"
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Added
- [PR#84](https://github.com/EmbarkStudios/spdx/pull/84) resolved [#67](https://github.com/EmbarkStudios/spdx/issues/67) by inling the `askalono` crate to allow detection of license texts or headers from arbitrary text data. There are multiple features flags associated with this new feature.

## [0.12.0] - 2025-08-19
### Added
- [PR#81](https://github.com/EmbarkStudios/spdx/pull/81) resolved [#68](https://github.com/EmbarkStudios/spdx/issues/68) by adding support for the ` WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring)` syntax. Thanks [@weihanglo](https://github.com/weihanglo)!
Expand Down
182 changes: 180 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,23 @@ include = [
[features]
# Includes the full canonical text of each license
text = []
# Allows analysis of text to determine if it might be an SPDX license text
detection = ["regex", "unicode-normalization"]
# Allows de/serialization of a spdx::detection::Store for quicker loading
detection-cache = ["detection", "zstd"]
# Inlines a cache into this crate, which contains all of the licenses from the
# SPDX crate that the crate version was packaged with
detection-inline-cache = ["detection-cache"]
# Performs license detection in parallel within the same text
detection-parallel = ["detection", "rayon"]

[dependencies]
rayon = { version = "1.11", optional = true }
regex = { version = "1.12", optional = true }
# In most cases expressions are quite small so we can avoid heap allocations
smallvec = "1.15"
unicode-normalization = { version = "0.1", optional = true }
zstd = { version = "0.13", optional = true }

[dev-dependencies]
# Used to print colored diffs in case of test failures
Expand Down
Loading