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
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Baptiste Parmantier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2181,4 +2181,4 @@ The `rustmotion` crate is where both binaries live — a crate with only a `[lib

## License

MIT
MIT — see [LICENSE](LICENSE).
1 change: 1 addition & 0 deletions crates/rustmotion-components/LICENSE
1 change: 1 addition & 0 deletions crates/rustmotion-core/LICENSE
37 changes: 37 additions & 0 deletions crates/rustmotion-core/tests/audit_ws_k.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,40 @@ fn every_public_schema_field_is_read_somewhere_or_allowlisted() {
KNOWN_INERT_FIELDS above with a reason and the finding that tracks closing it."
);
}

#[test]
fn the_license_badge_points_at_a_file_that_exists_and_names_a_holder() {
let root = workspace_root();
let license = std::fs::read_to_string(root.join("LICENSE"))
.expect("README's MIT badge links to LICENSE at the root, so the file has to be there");

assert!(
license.starts_with("MIT License"),
"the manifests declare license = \"MIT\", so the file has to be the MIT text"
);
let holder = license
.lines()
.find_map(|l| l.strip_prefix("Copyright (c) "))
.expect("a licence with no copyright holder tells a human nothing");
assert!(
holder.split_whitespace().count() >= 2,
"the holder line must name someone, got {holder:?}"
);

for crate_name in [
"rustmotion",
"rustmotion-core",
"rustmotion-components",
"rustmotion-html",
] {
let packaged = root.join("crates").join(crate_name).join("LICENSE");
assert_eq!(
std::fs::read_to_string(&packaged).ok().as_deref(),
Some(license.as_str()),
"{crate_name} is published to crates.io, and a .crate with no LICENSE file is the \
gap the SPDX string in the manifest does not close — {} must resolve to the same \
text as the root one",
packaged.display()
);
}
}
1 change: 1 addition & 0 deletions crates/rustmotion-html/LICENSE
1 change: 1 addition & 0 deletions crates/rustmotion/LICENSE
Loading