From fab5a9c0529219f7c2316e66a7fd24fad36b6ca4 Mon Sep 17 00:00:00 2001 From: chrisliebaer Date: Sat, 17 Aug 2024 06:21:01 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'./'=20with=20r?= =?UTF-8?q?emote=20'sync/rust'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cargo-deny.yml | 18 ++--------- .github/workflows/clippy.yml | 13 ++++++++ .github/workflows/rustfmt.yml | 13 ++++++++ deny.toml | 55 ++++++++++++-------------------- rustfmt.toml | 2 +- 5 files changed, 49 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/clippy.yml create mode 100644 .github/workflows/rustfmt.yml diff --git a/.github/workflows/cargo-deny.yml b/.github/workflows/cargo-deny.yml index 1d9b5fe..56b26d5 100644 --- a/.github/workflows/cargo-deny.yml +++ b/.github/workflows/cargo-deny.yml @@ -1,4 +1,4 @@ -name: Validate dependencies +name: cargo-deny on: push: @@ -10,18 +10,4 @@ on: jobs: cargo-deny: - runs-on: ubuntu-latest - strategy: - matrix: - checks: - - advisories - - bans licenses sources - - # Prevent sudden announcement of a new advisory from failing ci: - continue-on-error: ${{ matrix.checks == 'advisories' }} - - steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check ${{ matrix.checks }} + uses: chrisliebaer/.github/.github/workflows/cargo-deny.yml@master diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..2bd26ee --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,13 @@ +name: clippy + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + clippy: + uses: chrisliebaer/.github/.github/workflows/clippy.yml@master diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml new file mode 100644 index 0000000..95f9208 --- /dev/null +++ b/.github/workflows/rustfmt.yml @@ -0,0 +1,13 @@ +name: rustfmt + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + rustfmt: + uses: chrisliebaer/.github/.github/workflows/rustfmt.yml@master diff --git a/deny.toml b/deny.toml index cc631a0..72249c5 100644 --- a/deny.toml +++ b/deny.toml @@ -1,23 +1,18 @@ # cargo-deny is really only ever intended to run on the "normal" tier-1 targets [graph] targets = [ - { triple = "x86_64-unknown-linux-gnu" }, - { triple = "aarch64-unknown-linux-gnu" }, - { triple = "x86_64-unknown-linux-musl" }, - { triple = "aarch64-apple-darwin" }, - { triple = "x86_64-apple-darwin" }, - { triple = "x86_64-pc-windows-msvc" }, + { triple = "x86_64-unknown-linux-gnu" }, + { triple = "aarch64-unknown-linux-gnu" }, + { triple = "x86_64-unknown-linux-musl" }, + { triple = "aarch64-apple-darwin" }, + { triple = "x86_64-apple-darwin" }, + { triple = "x86_64-pc-windows-msvc" }, ] [advisories] version = 2 yanked = "deny" -ignore = [ - # we are only consuming a tls endpoint - "RUSTSEC-2023-0071" -] - [bans] multiple-versions = "allow" wildcards = "deny" @@ -31,30 +26,20 @@ unknown-git = "deny" version = 2 confidence-threshold = 0.93 +# the good licenses allow = [ - "MIT", - "Apache-2.0", - "Apache-2.0 WITH LLVM-exception", - "Zlib", - "BSD-2-Clause", - "BSD-3-Clause", - "ISC", - "MPL-2.0", - "CC0-1.0", - "OFL-1.1", -] - -exceptions = [ - { allow = ["Unicode-DFS-2016"], name = "unicode-ident" }, - # ring is using multiple intermangled licenses - { allow = ["ISC", "OpenSSL"], name = "ring" }, - { allow = ["MPL-2.0"], name = "webpki-roots" } + "MIT", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "Zlib", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", + "MPL-2.0", + "CC0-1.0", + "OFL-1.1", ] - -[[licenses.clarify]] -name = "ring" -expression = "MIT AND ISC AND OpenSSL" -license-files = [ - { path = "LICENSE", hash = 0xbd0eed23 } -] +# semi global exceptions (the stuff I always run into) +# add local exceptions to deny.exceptions.toml +exceptions = [{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" }] diff --git a/rustfmt.toml b/rustfmt.toml index 454b633..e31afa8 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -4,7 +4,7 @@ version = "Two" # general stuff hide_parse_errors = true # since we sometimes save files with syntax errors max_width = 130 -color = "always" +color = "Always" edition = "2021" newline_style = "Unix" normalize_comments = true