Skip to content

Commit

Permalink
Use cargo-license-template (#1022)
Browse files Browse the repository at this point in the history
* Use cargo-license-template

* Fix cargo-license-template CI check

* Fix license headers in Rust files
  • Loading branch information
cycraig committed Sep 15, 2022
1 parent e45fc39 commit eb1d226
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/format.yml
Expand Up @@ -31,6 +31,12 @@ jobs:
override: true
components: rustfmt

- name: Install cargo-license-template
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-license-template

- name: Install dprint
run: npm install -g dprint
#run: cargo install dprint # installing from source is slow, ~5 minutes
Expand Down Expand Up @@ -64,3 +70,6 @@ jobs:
- name: Cargo.toml fmt check
run:
dprint check

- name: cargo-license-template check
run: cargo license-template --template .license_template --ignore .license_template_ignore --verbose
1 change: 1 addition & 0 deletions .license_template_ignore
@@ -0,0 +1 @@
libjose/tests/fixtures/*.rs
2 changes: 1 addition & 1 deletion bindings/wasm/src/iota/iota_verification_method.rs
@@ -1,4 +1,4 @@
// Copyright 2020-2022 Stiftung
// Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use identity_iota::crypto::PublicKey;
Expand Down
3 changes: 3 additions & 0 deletions examples/utils/utils.rs
@@ -1,3 +1,6 @@
// Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::path::PathBuf;

use anyhow::Context;
Expand Down
1 change: 0 additions & 1 deletion rustfmt.toml
@@ -1,6 +1,5 @@
comment_width = 120
format_code_in_doc_comments = true
license_template_path = ".license_template"
max_width = 120
normalize_comments = false
normalize_doc_attributes = false
Expand Down

0 comments on commit eb1d226

Please sign in to comment.