Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cargo-license-template #1022

Merged
merged 3 commits into from Sep 15, 2022
Merged

Use cargo-license-template #1022

merged 3 commits into from Sep 15, 2022

Conversation

cycraig
Copy link
Contributor

@cycraig cycraig commented Sep 15, 2022

Description of change

Use cargo-license-template as a replacement for the removed license_template_path feature of rustfmt.

Note that running cargo-license-template in the root of the workspace checks all sub-directories, including the Wasm and Stronghold bindings.

Links to any relevant issues

Fixes #921.

Type of change

  • Chore (a non-breaking change which fixes an issue)

How the change has been tested

cargo install -f cargo-license-template
cargo license-template --template .license_template --ignore .license_template_ignore --verbose

Passes in CI too: https://github.com/iotaledger/identity.rs/actions/runs/3060562925/jobs/4939227569

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@cycraig cycraig added No changelog Excludes PR from becoming part of any changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Sep 15, 2022
@cycraig cycraig self-assigned this Sep 15, 2022
Copy link
Contributor

@olivereanderson olivereanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this issue and for taking the time to explain that it works in CI too 👍

I also checked out this branch and tested it locally and I wasn't able to produce any unexpected behaviour.

Aside: I am curious whether it would be possible to make the tool check .ts files as well, but that might be beyond the scope of what the tool is designed for. Definitely not something that needs to be addressed in this PR.

Again thank you very much for working on this!

@cycraig
Copy link
Contributor Author

cycraig commented Sep 15, 2022

possible to make the tool check .ts files as well

Not out-of-the-box, no. It's currently hardcoded for .rs files.
https://github.com/grtlr/cargo-license-template/blob/487d6ac59f318624693e74d8909c0e5e19876214/src/main.rs#L92

@cycraig cycraig merged commit eb1d226 into dev Sep 15, 2022
@cycraig cycraig deleted the chore/cargo-license-template branch September 15, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No changelog Excludes PR from becoming part of any changelog Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Find a new tool for license header checks
2 participants