From e7b7555d1516d0b274e7269961fce9ec9b30bc98 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:33:22 -0500 Subject: [PATCH 001/100] chore: First step --- .cargo/config | 5 + .clippy.toml | 12 ++ .github/renovate.json5 | 71 +++++++++++ .github/settings.yml | 52 ++++++++ .github/workflows/audit.yml | 49 ++++++++ .github/workflows/ci.yml | 128 ++++++++++++++++++++ .github/workflows/committed.yml | 24 ++++ .github/workflows/pre-commit.yml | 23 ++++ .github/workflows/rust-next.yml | 88 ++++++++++++++ .github/workflows/spelling.yml | 21 ++++ .gitignore | 1 + .pre-commit-config.yaml | 26 ++++ CHANGELOG.md | 11 ++ CONTRIBUTING.md | 70 +++++++++++ Cargo.lock | 7 ++ Cargo.toml | 38 ++++++ LICENSE-APACHE | 202 +++++++++++++++++++++++++++++++ LICENSE-MIT | 19 +++ README.md | 26 ++++ committed.toml | 3 + deny.toml | 135 +++++++++++++++++++++ release.toml | 6 + src/lib.rs | 2 + 23 files changed, 1019 insertions(+) create mode 100644 .cargo/config create mode 100644 .clippy.toml create mode 100644 .github/renovate.json5 create mode 100644 .github/settings.yml create mode 100644 .github/workflows/audit.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/committed.yml create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .github/workflows/rust-next.yml create mode 100644 .github/workflows/spelling.yml create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 LICENSE-APACHE create mode 100644 LICENSE-MIT create mode 100644 README.md create mode 100644 committed.toml create mode 100644 deny.toml create mode 100644 release.toml create mode 100644 src/lib.rs diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 00000000..ba321231 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,5 @@ +[target.x86_64-pc-windows-msvc] +rustflags = ["-Ctarget-feature=+crt-static"] + +[target.i686-pc-windows-msvc] +rustflags = ["-Ctarget-feature=+crt-static"] diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 00000000..16749abd --- /dev/null +++ b/.clippy.toml @@ -0,0 +1,12 @@ +msrv = "1.64.0" # MSRV +warn-on-all-wildcard-imports = true +allow-expect-in-tests = true +allow-unwrap-in-tests = true +allow-dbg-in-tests = true +allow-print-in-tests = true +disallowed-methods = [ + { path = "std::option::Option::map_or", reason = "use `map(..).unwrap_or(..)`" }, + { path = "std::option::Option::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, + { path = "std::result::Result::map_or", reason = "use `map(..).unwrap_or(..)`" }, + { path = "std::result::Result::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, +] diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..51faa753 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,71 @@ +{ + "schedule": [ + "before 3am on the first day of the month" + ], + "semanticCommits": "enabled", + "configMigration": true, + "dependencyDashboard": true, + "regexManagers": [ + { + "fileMatch": [ + "^rust-toolchain\\.toml$", + "Cargo.toml$", + "clippy.toml$", + "\.clippy.toml$", + "^\.github/workflows/ci.yml$", + "^\.github/workflows/rust-next.yml$", + ], + "matchStrings": [ + "MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)", + "(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV", + ], + "depNameTemplate": "rust", + "packageNameTemplate": "rust-lang/rust", + "datasourceTemplate": "github-releases", + } + ], + "packageRules": [ + { + "commitMessageTopic": "MSRV", + "matchManagers": ["regex"], + "matchPackageNames": ["rust"], + "stabilityDays": 126, // 3 releases * 6 weeks per release * 7 days per week + }, + // Goals: + // - Keep version reqs low, ignoring compatible normal/build dependencies + // - Take advantage of latest dev-dependencies + // - Rollup safe upgrades to reduce CI runner load + // - Help keep number of versions down by always using latest breaking change + // - Have lockfile and manifest in-sync + { + "matchManagers": ["cargo"], + "matchDepTypes": ["build-dependencies", "dependencies"], + "matchCurrentVersion": ">=0.1.0", + "matchUpdateTypes": ["patch"], + "enabled": false, + }, + { + "matchManagers": ["cargo"], + "matchDepTypes": ["build-dependencies", "dependencies"], + "matchCurrentVersion": ">=1.0.0", + "matchUpdateTypes": ["minor"], + "enabled": false, + }, + { + "matchManagers": ["cargo"], + "matchDepTypes": ["dev-dependencies"], + "matchCurrentVersion": ">=0.1.0", + "matchUpdateTypes": ["patch"], + "automerge": true, + "groupName": "compatible (dev)", + }, + { + "matchManagers": ["cargo"], + "matchDepTypes": ["dev-dependencies"], + "matchCurrentVersion": ">=1.0.0", + "matchUpdateTypes": ["minor"], + "automerge": true, + "groupName": "compatible (dev)", + }, + ], +} diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 00000000..0469378d --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,52 @@ +# These settings are synced to GitHub by https://probot.github.io/apps/settings/ + +repository: + description: "DESCRIPTION" + homepage: "https://docs.rs/PROJECT" + topics: "" + has_issues: true + has_projects: false + has_wiki: false + has_downloads: true + default_branch: main + + allow_squash_merge: true + allow_merge_commit: true + allow_rebase_merge: true + + allow_auto_merge: true + delete_branch_on_merge: true + + squash_merge_commit_title: "PR_TITLE" + squash_merge_commit_message: "PR_BODY" + merge_commit_message: "PR_BODY" + +labels: + # Type + - name: bug + color: '#b60205' + description: Not as expected + - name: enhancement + color: '#1d76db' + description: Improve the expected + # Flavor + - name: question + color: "#cc317c" + description: Uncertainty is involved + - name: breaking-change + color: "#e99695" + - name: good first issue + color: '#c2e0c6' + description: Help wanted! + +branches: + - name: main + protection: + required_pull_request_reviews: null + required_conversation_resolution: true + required_status_checks: + # Required. Require branches to be up to date before merging. + strict: false + contexts: ["CI", "Lint Commits", "Spell Check with Typos"] + enforce_admins: false + restrictions: null diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 00000000..5b7e83ac --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,49 @@ +name: Security audit + +permissions: + contents: read + +on: + pull_request: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + push: + branches: + - main + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + security_audit: + permissions: + issues: write # to create issues (actions-rs/audit-check) + checks: write # to create check (actions-rs/audit-check) + runs-on: ubuntu-latest + # Prevent sudden announcement of a new advisory from failing ci: + continue-on-error: true + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + cargo_deny: + permissions: + issues: write # to create issues (actions-rs/audit-check) + checks: write # to create check (actions-rs/audit-check) + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - bans licenses sources + steps: + - uses: actions/checkout@v3 + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check ${{ matrix.checks }} + rust-version: stable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..783247cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,128 @@ +name: CI + +permissions: + contents: read + +on: + pull_request: + push: + branches: + - main + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + ci: + permissions: + contents: none + name: CI + needs: [test, msrv, docs, rustfmt, clippy] + runs-on: ubuntu-latest + steps: + - name: Done + run: exit 0 + test: + name: Test + strategy: + matrix: + os: ["ubuntu-latest", "windows-latest", "macos-latest"] + rust: ["stable"] + continue-on-error: ${{ matrix.rust != 'stable' }} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust }} + - uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo test --no-run --workspace --all-features + - name: Default features + run: cargo test --workspace + - name: All features + run: cargo test --workspace --all-features + - name: No-default features + run: cargo test --workspace --no-default-features + msrv: + name: "Check MSRV: 1.64.0" + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.64.0 # MSRV + - uses: Swatinem/rust-cache@v2 + - name: Default features + run: cargo check --workspace --all-targets + - name: All features + run: cargo check --workspace --all-targets --all-features + - name: No-default features + run: cargo check --workspace --all-targets --no-default-features + docs: + name: Docs + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - uses: Swatinem/rust-cache@v2 + - name: Check documentation + env: + RUSTDOCFLAGS: -D warnings + run: cargo doc --workspace --all-features --no-deps --document-private-items + rustfmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + # Not MSRV because its harder to jump between versions and people are + # more likely to have stable + toolchain: stable + components: rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Check formatting + run: cargo fmt --all -- --check + clippy: + name: clippy + runs-on: ubuntu-latest + permissions: + security-events: write # to upload sarif results + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.64.0 # MSRV + components: clippy + - uses: Swatinem/rust-cache@v2 + - name: Install SARIF tools + run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv + - name: Install SARIF tools + run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv + - name: Check + run: > + cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated + | clippy-sarif + | tee clippy-results.sarif + | sarif-fmt + continue-on-error: true + - name: Upload + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: clippy-results.sarif + wait-for-processing: true diff --git a/.github/workflows/committed.yml b/.github/workflows/committed.yml new file mode 100644 index 00000000..509be080 --- /dev/null +++ b/.github/workflows/committed.yml @@ -0,0 +1,24 @@ +# Not run as part of pre-commit checks because they don't handle sending the correct commit +# range to `committed` +name: Lint Commits +on: [pull_request] + +permissions: + contents: read + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + committed: + name: Lint Commits + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Lint Commits + uses: crate-ci/committed@master diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..d4b0f84a --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,23 @@ +name: pre-commit + +permissions: {} # none + +on: + pull_request: + push: + branches: [main] + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + pre-commit: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml new file mode 100644 index 00000000..8faba304 --- /dev/null +++ b/.github/workflows/rust-next.yml @@ -0,0 +1,88 @@ +name: rust-next + +permissions: + contents: read + +on: + schedule: + - cron: '1 1 1 * *' + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + test: + name: Test + strategy: + matrix: + os: ["ubuntu-latest", "windows-latest", "macos-latest"] + rust: ["stable", "beta"] + include: + - os: ubuntu-latest + rust: "nightly" + continue-on-error: ${{ matrix.rust != 'stable' }} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust }} + - uses: Swatinem/rust-cache@v2 + - name: Default features + run: cargo test --workspace + - name: All features + run: cargo test --workspace --all-features + - name: No-default features + run: cargo test --workspace --no-default-features + rustfmt: + name: rustfmt + strategy: + matrix: + rust: + - stable + - beta + continue-on-error: ${{ matrix.rust != 'stable' }} + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust }} + components: rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Check formatting + run: cargo fmt --all -- --check + clippy: + name: clippy + runs-on: ubuntu-latest + permissions: + security-events: write # to upload sarif results + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy + - uses: Swatinem/rust-cache@v2 + - name: Install SARIF tools + run: cargo install clippy-sarif sarif-fmt + - name: Check + run: > + cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated + | clippy-sarif + | tee clippy-results.sarif + | sarif-fmt + continue-on-error: true + - name: Upload + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: clippy-results.sarif + wait-for-processing: true diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml new file mode 100644 index 00000000..f31c7ed8 --- /dev/null +++ b/.github/workflows/spelling.yml @@ -0,0 +1,21 @@ +name: Spelling + +permissions: + contents: read + +on: [pull_request] + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + spelling: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v3 + - name: Spell Check Repo + uses: crate-ci/typos@master diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..eb5a316c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..f751dec5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: check-yaml + stages: [commit] + - id: check-json + stages: [commit] + - id: check-toml + stages: [commit] + - id: check-merge-conflict + stages: [commit] + - id: check-case-conflict + stages: [commit] + - id: detect-private-key + stages: [commit] + - repo: https://github.com/crate-ci/typos + rev: v1.11.1 + hooks: + - id: typos + stages: [commit] + - repo: https://github.com/crate-ci/committed + rev: v1.0.4 + hooks: + - id: committed + stages: [commit-msg] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..23a247b5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + + +## [Unreleased] - ReleaseDate + + +[Unreleased]: https://github.com/rust-cli/argfile/compare/v0.1.5...HEAD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ce840a94 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing to PROJECT + +Thanks for wanting to contribute! There are many ways to contribute and we +appreciate any level you're willing to do. + +## Feature Requests + +Need some new functionality to help? You can let us know by opening an +[issue][new issue]. It's helpful to look through [all issues][all issues] in +case its already being talked about. + +## Bug Reports + +Please let us know about what problems you run into, whether in behavior or +ergonomics of API. You can do this by opening an [issue][new issue]. It's +helpful to look through [all issues][all issues] in case its already being +talked about. + +## Pull Requests + +Looking for an idea? Check our [issues][issues]. If it's look more open ended, +it is probably best to post on the issue how you are thinking of resolving the +issue so you can get feedback early in the process. We want you to be +successful and it can be discouraging to find out a lot of re-work is needed. + +Already have an idea? It might be good to first [create an issue][new issue] +to propose it so we can make sure we are aligned and lower the risk of having +to re-work some of it and the discouragement that goes along with that. + +### Process + +Before posting a PR, we request that the commit history get cleaned up. +However, we recommend avoiding this during the review to make it easier to +check how feedback was handled. Once the PR is ready, we'll ask you to clean up +the commit history from the review. Once you let us know this is done, we can +move forward with merging! If you are uncomfortable with these parts of git, +let us know and we can help. + +For commit messages, we use [Conventional](https://www.conventionalcommits.org) +style. If you already wrote your commits and don't feel comfortable changing +them, don't worry and go ahead and create your PR. We'll work with you on the +best route forward. You can check your branch locally with +[`committed`](https://github.com/crate-ci/committed). + +As a heads up, we'll be running your PR through the following gauntlet: +- warnings turned to compile errors +- `cargo test` +- `rustfmt` +- `clippy` +- `rustdoc` +- [`committed`](https://github.com/crate-ci/committed) +- [`typos`](https://github.com/crate-ci/typos) + +## Releasing + +Pre-requisites +- Running `cargo login` +- A member of `ORG:Maintainers` +- Push permission to the repo +- [`cargo-release`](https://github.com/crate-ci/cargo-release/) + +When we're ready to release, a project owner should do the following +1. Update the changelog (see `cargo release changes` for ideas) +2. Determine what the next version is, according to semver +3. Run [`cargo release -x `](https://github.com/crate-ci/cargo-release) + +[issues]: https://github.com/ORG/PROJECT/issues +[new issue]: https://github.com/ORG/PROJECT/issues/new +[all issues]: https://github.com/ORG/PROJECT/issues?utf8=%E2%9C%93&q=is%3Aissue +[travis]: https://github.com/ORG/PROJECT/blob/master/.travis.yml diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..49c1f2dc --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "PROJECT" +version = "0.0.1" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..55dc8553 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "PROJECT" +version = "0.0.1" +description = "DESCRIPTION" +license = "MIT OR Apache-2.0" +categories = [] +keywords = [] +edition = "2021" +rust-version = "1.64.0" # MSRV +include = [ + "build.rs", + "src/**/*", + "Cargo.toml", + "LICENSE*", + "README.md", + "benches/**/*", + "examples/**/*" +] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[package.metadata.release] +pre-release-replacements = [ + {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, + {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, + {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, + {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/ORG/PROJECT/compare/{{tag_name}}...HEAD", exactly=1}, +] + +[features] +default = [] + +[dependencies] + +[dev-dependencies] diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 00000000..8f71f43f --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..a2d01088 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,19 @@ +Copyright (c) Individual contributors + +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. diff --git a/README.md b/README.md new file mode 100644 index 00000000..41d5a974 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# PROJECT + +> DESCRIPTION + +[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation] +![License](https://img.shields.io/crates/l/PROJECT.svg) +[![Crates Status](https://img.shields.io/crates/v/PROJECT.svg)](https://crates.io/crates/PROJECT) + +## License + +Licensed under either of + + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. + +### Contribution + +Unless you explicitly state otherwise, any contribution intentionally +submitted for inclusion in the work by you, as defined in the Apache-2.0 +license, shall be dual licensed as above, without any additional terms or +conditions. + +[Crates.io]: https://crates.io/crates/PROJECT +[Documentation]: https://docs.rs/PROJECT diff --git a/committed.toml b/committed.toml new file mode 100644 index 00000000..4211ae38 --- /dev/null +++ b/committed.toml @@ -0,0 +1,3 @@ +style="conventional" +ignore_author_re="(dependabot|renovate)" +merge_commit = false diff --git a/deny.toml b/deny.toml new file mode 100644 index 00000000..ad23fbb3 --- /dev/null +++ b/deny.toml @@ -0,0 +1,135 @@ +# Note that all fields that take a lint level have these possible values: +# * deny - An error will be produced and the check will fail +# * warn - A warning will be produced, but the check will not fail +# * allow - No warning or error will be produced, though in some cases a note +# will be + +# This section is considered when running `cargo deny check advisories` +# More documentation for the advisories section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html +[advisories] +# The lint level for security vulnerabilities +vulnerability = "deny" +# The lint level for unmaintained crates +unmaintained = "warn" +# The lint level for crates that have been yanked from their source registry +yanked = "warn" +# The lint level for crates with security notices. Note that as of +# 2019-12-17 there are no security notice advisories in +# https://github.com/rustsec/advisory-db +notice = "warn" +# A list of advisory IDs to ignore. Note that ignored advisories will still +# output a note when they are encountered. +# +# e.g. "RUSTSEC-0000-0000", +ignore = [ +] + +# This section is considered when running `cargo deny check licenses` +# More documentation for the licenses section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html +[licenses] +unlicensed = "deny" +# List of explicitly allowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +allow = [ + "MIT", + "Apache-2.0", + #"Apache-2.0 WITH LLVM-exception", +] +# List of explicitly disallowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +deny = [ +] +# Lint level for licenses considered copyleft +copyleft = "deny" +# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses +# * both - The license will be approved if it is both OSI-approved *AND* FSF +# * either - The license will be approved if it is either OSI-approved *OR* FSF +# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF +# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved +# * neither - This predicate is ignored and the default lint level is used +allow-osi-fsf-free = "neither" +# Lint level used when no other predicates are matched +# 1. License isn't in the allow or deny lists +# 2. License isn't copyleft +# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" +default = "deny" +# The confidence threshold for detecting a license from license text. +# The higher the value, the more closely the license text must be to the +# canonical license text of a valid SPDX license file. +# [possible values: any between 0.0 and 1.0]. +confidence-threshold = 0.8 +# Allow 1 or more licenses on a per-crate basis, so that particular licenses +# aren't accepted for every possible crate as with the normal allow list +exceptions = [ + # Each entry is the crate and version constraint, and its specific allow + # list + #{ allow = ["Zlib"], name = "adler32", version = "*" }, +] + +[licenses.private] +# If true, ignores workspace crates that aren't published, or are only +# published to private registries. +# To see how to mark a crate as unpublished (to the official registry), +# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. +ignore = true + +# This section is considered when running `cargo deny check bans`. +# More documentation about the 'bans' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html +[bans] +# Lint level for when multiple versions of the same crate are detected +multiple-versions = "warn" +# Lint level for when a crate version requirement is `*` +wildcards = "deny" +# The graph highlighting used when creating dotgraphs for crates +# with multiple versions +# * lowest-version - The path to the lowest versioned duplicate is highlighted +# * simplest-path - The path to the version with the fewest edges is highlighted +# * all - Both lowest-version and simplest-path are used +highlight = "all" +# The default lint level for `default` features for crates that are members of +# the workspace that is being checked. This can be overridden by allowing/denying +# `default` on a crate-by-crate basis if desired. +workspace-default-features = "allow" +# The default lint level for `default` features for external crates that are not +# members of the workspace. This can be overridden by allowing/denying `default` +# on a crate-by-crate basis if desired. +external-default-features = "allow" +# List of crates that are allowed. Use with care! +allow = [ + #{ name = "ansi_term", version = "=0.11.0" }, +] +# List of crates to deny +deny = [ + # Each entry the name of a crate and a version range. If version is + # not specified, all versions will be matched. + #{ name = "ansi_term", version = "=0.11.0" }, + # + # Wrapper crates can optionally be specified to allow the crate when it + # is a direct dependency of the otherwise banned crate + #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, +] + +# This section is considered when running `cargo deny check sources`. +# More documentation about the 'sources' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html +[sources] +# Lint level for what to happen when a crate from a crate registry that is not +# in the allow list is encountered +unknown-registry = "deny" +# Lint level for what to happen when a crate from a git repository that is not +# in the allow list is encountered +unknown-git = "deny" +# List of URLs for allowed crate registries. Defaults to the crates.io index +# if not specified. If it is specified but empty, no registries are allowed. +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +# List of URLs for allowed Git repositories +allow-git = [] + +[sources.allow-org] +# 1 or more github.com organizations to allow git sources for +github = [] diff --git a/release.toml b/release.toml new file mode 100644 index 00000000..16df989c --- /dev/null +++ b/release.toml @@ -0,0 +1,6 @@ +pre-release-commit-message = "chore: Release" +tag-message = "{{tag_name}}" +tag-name = "{{prefix}}v{{version}}" +consolidate-commits = true +consolidate-pushes = true +allow-branch = ["main"] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..45bf577c --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,2 @@ +#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![allow(non_snake_case)] // TODO: Delete me From d6b4446cd761d82313a0e69cf0da82ebfc4084cb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:33:42 -0500 Subject: [PATCH 002/100] docs: Set changelog base --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23a247b5..e378dd7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,4 +8,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate -[Unreleased]: https://github.com/rust-cli/argfile/compare/v0.1.5...HEAD +[Unreleased]: https://github.com/rust-cli/argfile/compare/e7b7555...HEAD From fbaab420b9e4e01e60522f87e89e2e0a28250c73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 00:32:08 +0000 Subject: [PATCH 003/100] chore(deps): update msrv to v1.65.0 --- .clippy.toml | 2 +- .github/workflows/ci.yml | 6 +++--- Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index 16749abd..5c6f9841 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,4 @@ -msrv = "1.64.0" # MSRV +msrv = "1.65.0" # MSRV warn-on-all-wildcard-imports = true allow-expect-in-tests = true allow-unwrap-in-tests = true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 783247cb..017d45ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: - name: No-default features run: cargo test --workspace --no-default-features msrv: - name: "Check MSRV: 1.64.0" + name: "Check MSRV: 1.65.0" runs-on: ubuntu-latest steps: - name: Checkout repository @@ -57,7 +57,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.64.0 # MSRV + toolchain: 1.65.0 # MSRV - uses: Swatinem/rust-cache@v2 - name: Default features run: cargo check --workspace --all-targets @@ -107,7 +107,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.64.0 # MSRV + toolchain: 1.65.0 # MSRV components: clippy - uses: Swatinem/rust-cache@v2 - name: Install SARIF tools diff --git a/Cargo.toml b/Cargo.toml index 55dc8553..1c84a5ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" categories = [] keywords = [] edition = "2021" -rust-version = "1.64.0" # MSRV +rust-version = "1.65.0" # MSRV include = [ "build.rs", "src/**/*", From 614b0a2376b9ae6d95a1b768b93d06057f4b82d6 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:40:57 -0500 Subject: [PATCH 004/100] docs(contrib): Remove reference to travis --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce840a94..e9d70793 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,4 +67,3 @@ When we're ready to release, a project owner should do the following [issues]: https://github.com/ORG/PROJECT/issues [new issue]: https://github.com/ORG/PROJECT/issues/new [all issues]: https://github.com/ORG/PROJECT/issues?utf8=%E2%9C%93&q=is%3Aissue -[travis]: https://github.com/ORG/PROJECT/blob/master/.travis.yml From afeff23549a05cd0e5997f129e5d7a564ec41866 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:41:29 -0500 Subject: [PATCH 005/100] chore(ci): Quote strings in yaml --- .github/settings.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 0469378d..8ead1bac 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -25,19 +25,19 @@ labels: # Type - name: bug color: '#b60205' - description: Not as expected + description: "Not as expected" - name: enhancement color: '#1d76db' - description: Improve the expected + description: "Improve the expected" # Flavor - name: question color: "#cc317c" - description: Uncertainty is involved + description: "Uncertainty is involved" - name: breaking-change color: "#e99695" - name: good first issue color: '#c2e0c6' - description: Help wanted! + description: "Help wanted!" branches: - name: main From 2768727452315929d88dda7d0686440d8e668736 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:46:23 -0500 Subject: [PATCH 006/100] chore: Don't set rustflags by default Doing so can cause unnecessary recompilation --- .cargo/config | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index ba321231..00000000 --- a/.cargo/config +++ /dev/null @@ -1,5 +0,0 @@ -[target.x86_64-pc-windows-msvc] -rustflags = ["-Ctarget-feature=+crt-static"] - -[target.i686-pc-windows-msvc] -rustflags = ["-Ctarget-feature=+crt-static"] From 083884043cc08394c6f91df81e6407721b2dc19e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:51:13 -0500 Subject: [PATCH 007/100] chore: Update release process --- release.toml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/release.toml b/release.toml index 16df989c..160b061b 100644 --- a/release.toml +++ b/release.toml @@ -1,6 +1,2 @@ -pre-release-commit-message = "chore: Release" -tag-message = "{{tag_name}}" -tag-name = "{{prefix}}v{{version}}" -consolidate-commits = true -consolidate-pushes = true +dependent-version = "fix" allow-branch = ["main"] From afd6a45ef73201bf5d5f3d4f0317f432b17c60d0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 14:53:08 -0500 Subject: [PATCH 008/100] chore: Use workspace inheritance --- Cargo.toml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c84a5ee..6e698fb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,8 @@ -[package] -name = "PROJECT" -version = "0.0.1" -description = "DESCRIPTION" +[workspace] +resolver = "2" + +[workspace.package] license = "MIT OR Apache-2.0" -categories = [] -keywords = [] edition = "2021" rust-version = "1.65.0" # MSRV include = [ @@ -17,6 +15,17 @@ include = [ "examples/**/*" ] +[package] +name = "PROJECT" +version = "0.0.1" +description = "DESCRIPTION" +categories = [] +keywords = [] +license.workspace = true +edition.workspace = true +rust-version.workspace = true +include.workspace = true + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] From 037f37906dad6d39f9fad371bc9a8ab76e8bd5c4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 15:07:09 -0500 Subject: [PATCH 009/100] chore(ci): Remove rustfmt/clippy next jobs --- .github/workflows/rust-next.yml | 48 --------------------------------- 1 file changed, 48 deletions(-) diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index 8faba304..e90121bc 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -38,51 +38,3 @@ jobs: run: cargo test --workspace --all-features - name: No-default features run: cargo test --workspace --no-default-features - rustfmt: - name: rustfmt - strategy: - matrix: - rust: - - stable - - beta - continue-on-error: ${{ matrix.rust != 'stable' }} - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ matrix.rust }} - components: rustfmt - - uses: Swatinem/rust-cache@v2 - - name: Check formatting - run: cargo fmt --all -- --check - clippy: - name: clippy - runs-on: ubuntu-latest - permissions: - security-events: write # to upload sarif results - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: clippy - - uses: Swatinem/rust-cache@v2 - - name: Install SARIF tools - run: cargo install clippy-sarif sarif-fmt - - name: Check - run: > - cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated - | clippy-sarif - | tee clippy-results.sarif - | sarif-fmt - continue-on-error: true - - name: Upload - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: clippy-results.sarif - wait-for-processing: true From d1dd4ae94067be2f3158fa46b0e78504705dfb26 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 15:28:54 -0500 Subject: [PATCH 010/100] chore(ci): Expand approved licenses --- deny.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index ad23fbb3..942e08db 100644 --- a/deny.toml +++ b/deny.toml @@ -35,8 +35,12 @@ unlicensed = "deny" # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. allow = [ "MIT", + "MIT-0", "Apache-2.0", - #"Apache-2.0 WITH LLVM-exception", + "BSD-3-Clause", + "MPL-2.0", + "Unicode-DFS-2016", + "CC0-1.0", ] # List of explicitly disallowed licenses # See https://spdx.org/licenses/ for list of possible licenses From 6c8df60dc4015279cef303cab8f4760efb5ebea8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 Mar 2023 22:38:45 -0500 Subject: [PATCH 011/100] chore: Include Cargo.lock --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 6e698fb3..b8ecde11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ include = [ "build.rs", "src/**/*", "Cargo.toml", + "Cargo.lock", "LICENSE*", "README.md", "benches/**/*", From f7b990b803a4aa448e81a323df3a54e66d2d8df4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 08:50:19 -0500 Subject: [PATCH 012/100] fix(ci): Fix Renovate regexes --- .github/renovate.json5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 51faa753..5e8e7e24 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -11,9 +11,9 @@ "^rust-toolchain\\.toml$", "Cargo.toml$", "clippy.toml$", - "\.clippy.toml$", - "^\.github/workflows/ci.yml$", - "^\.github/workflows/rust-next.yml$", + "\\.clippy.toml$", + "^\\.github/workflows/ci.yml$", + "^\\.github/workflows/rust-next.yml$", ], "matchStrings": [ "MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)", From 4163ad78c72df3a993bea6084fc05c6a2a44b9c2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 08:51:48 -0500 Subject: [PATCH 013/100] style(ci): Match auto-generated style This will make reviewing auto-update PRs easier --- .github/renovate.json5 | 126 +++++++++++++++++++++++++---------------- 1 file changed, 78 insertions(+), 48 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 5e8e7e24..0393074e 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,35 +1,39 @@ { - "schedule": [ - "before 3am on the first day of the month" + schedule: [ + 'before 3am on the first day of the month' ], - "semanticCommits": "enabled", - "configMigration": true, - "dependencyDashboard": true, - "regexManagers": [ + semanticCommits: 'enabled', + configMigration: true, + dependencyDashboard: true, + regexManagers: [ { - "fileMatch": [ - "^rust-toolchain\\.toml$", - "Cargo.toml$", - "clippy.toml$", - "\\.clippy.toml$", - "^\\.github/workflows/ci.yml$", - "^\\.github/workflows/rust-next.yml$", - ], - "matchStrings": [ - "MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)", - "(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV", - ], - "depNameTemplate": "rust", - "packageNameTemplate": "rust-lang/rust", - "datasourceTemplate": "github-releases", + fileMatch: [ + '^rust-toolchain\\.toml$', + 'Cargo.toml$', + 'clippy.toml$', + '\\.clippy.toml$', + '^\\.github/workflows/ci.yml$', + '^\\.github/workflows/rust-next.yml$', + ], + matchStrings: [ + 'MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)', + '(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV', + ], + depNameTemplate: 'rust', + packageNameTemplate: 'rust-lang/rust', + datasourceTemplate: 'github-releases', } ], - "packageRules": [ + packageRules: [ { - "commitMessageTopic": "MSRV", - "matchManagers": ["regex"], - "matchPackageNames": ["rust"], - "stabilityDays": 126, // 3 releases * 6 weeks per release * 7 days per week + commitMessageTopic: 'MSRV', + matchManagers: [ + 'regex', + ], + matchPackageNames: [ + 'rust', + ], + stabilityDays: 126, // 3 releases * 6 weeks per release * 7 days per week }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies @@ -38,34 +42,60 @@ // - Help keep number of versions down by always using latest breaking change // - Have lockfile and manifest in-sync { - "matchManagers": ["cargo"], - "matchDepTypes": ["build-dependencies", "dependencies"], - "matchCurrentVersion": ">=0.1.0", - "matchUpdateTypes": ["patch"], - "enabled": false, + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'build-dependencies', + 'dependencies', + ], + matchCurrentVersion: '>=0.1.0', + matchUpdateTypes: [ + 'patch', + ], + enabled: false, }, { - "matchManagers": ["cargo"], - "matchDepTypes": ["build-dependencies", "dependencies"], - "matchCurrentVersion": ">=1.0.0", - "matchUpdateTypes": ["minor"], - "enabled": false, + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'build-dependencies', + 'dependencies', + ], + matchCurrentVersion: '>=1.0.0', + matchUpdateTypes: [ + 'minor', + ], + enabled: false, }, { - "matchManagers": ["cargo"], - "matchDepTypes": ["dev-dependencies"], - "matchCurrentVersion": ">=0.1.0", - "matchUpdateTypes": ["patch"], - "automerge": true, - "groupName": "compatible (dev)", + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'dev-dependencies', + ], + matchCurrentVersion: '>=0.1.0', + matchUpdateTypes: [ + 'patch', + ], + automerge: true, + groupName: 'compatible (dev)', }, { - "matchManagers": ["cargo"], - "matchDepTypes": ["dev-dependencies"], - "matchCurrentVersion": ">=1.0.0", - "matchUpdateTypes": ["minor"], - "automerge": true, - "groupName": "compatible (dev)", + matchManagers: [ + 'cargo', + ], + matchDepTypes: [ + 'dev-dependencies', + ], + matchCurrentVersion: '>=1.0.0', + matchUpdateTypes: [ + 'minor', + ], + automerge: true, + groupName: 'compatible (dev)', }, ], } From 563de12d25e777e7244a73308090adcfb8b90014 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 09:01:54 -0500 Subject: [PATCH 014/100] chore(ci): Update stabilidyDays to new syntax --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 0393074e..d5485d2c 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -33,7 +33,7 @@ matchPackageNames: [ 'rust', ], - stabilityDays: 126, // 3 releases * 6 weeks per release * 7 days per week + stabilityDays: "126 days", // 3 releases * 6 weeks per release * 7 days per week }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From 2c4a7f574f6fed6655e8b2f25916c22d7bf08ad1 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 09:02:40 -0500 Subject: [PATCH 015/100] chore(ci): Delay Renovate PRs until ready --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index d5485d2c..0e8f1d62 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -34,6 +34,7 @@ 'rust', ], stabilityDays: "126 days", // 3 releases * 6 weeks per release * 7 days per week + internalChecksFilter: "strict", }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From 62401b8eafb71d8a928137f6f8dfc25340e39bbf Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 09:05:31 -0500 Subject: [PATCH 016/100] chore(ci): Lower the MSRV churn for template --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 0e8f1d62..900feaf9 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -33,7 +33,7 @@ matchPackageNames: [ 'rust', ], - stabilityDays: "126 days", // 3 releases * 6 weeks per release * 7 days per week + stabilityDays: "336 days", // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: "strict", }, // Goals: From d99db2e632b25a8b020491c3e1d40bf2efd3472a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 09:54:05 -0500 Subject: [PATCH 017/100] style(ci): Match auto-generated style --- .github/renovate.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 900feaf9..54bc5935 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,6 @@ { schedule: [ - 'before 3am on the first day of the month' + 'before 3am on the first day of the month', ], semanticCommits: 'enabled', configMigration: true, @@ -22,7 +22,7 @@ depNameTemplate: 'rust', packageNameTemplate: 'rust-lang/rust', datasourceTemplate: 'github-releases', - } + }, ], packageRules: [ { From afaba35d39c75d13138e2928cddeb0b93601cee3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 09:54:21 -0500 Subject: [PATCH 018/100] chore(ci): Use new minimumReleaseAge field --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 54bc5935..79e5152c 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -33,7 +33,7 @@ matchPackageNames: [ 'rust', ], - stabilityDays: "336 days", // 8 releases * 6 weeks per release * 7 days per week + minimumReleaseAge: "336 days", // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: "strict", }, // Goals: From 60a8ec89e3f97baad0dbe097e03dc0cd30899e02 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 20:03:56 -0500 Subject: [PATCH 019/100] chore(ci): Ban for_each --- .clippy.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clippy.toml b/.clippy.toml index 5c6f9841..56d269a8 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -9,4 +9,6 @@ disallowed-methods = [ { path = "std::option::Option::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, { path = "std::result::Result::map_or", reason = "use `map(..).unwrap_or(..)`" }, { path = "std::result::Result::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, + { path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" }, + { path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" }, ] From 96297f038d8d931bb9d5ba4dfcdced18d7c81061 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 20:04:56 -0500 Subject: [PATCH 020/100] chore(ci): Clarify why map_or is banned --- .clippy.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index 56d269a8..22fe10b7 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -5,10 +5,10 @@ allow-unwrap-in-tests = true allow-dbg-in-tests = true allow-print-in-tests = true disallowed-methods = [ - { path = "std::option::Option::map_or", reason = "use `map(..).unwrap_or(..)`" }, - { path = "std::option::Option::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, - { path = "std::result::Result::map_or", reason = "use `map(..).unwrap_or(..)`" }, - { path = "std::result::Result::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, + { path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" }, + { path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" }, + { path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" }, + { path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" }, { path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" }, { path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" }, ] From 716170eaa853ddf3032baa9b107eb3e44d6a4124 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 20:13:36 -0500 Subject: [PATCH 021/100] chore(gh): Ban rebase merges --- .github/settings.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 8ead1bac..7d5e4fce 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -10,9 +10,12 @@ repository: has_downloads: true default_branch: main - allow_squash_merge: true + # Preference: people do clean commits allow_merge_commit: true - allow_rebase_merge: true + # Backup in case we need to clean up commits + allow_squash_merge: true + # Not really needed + allow_rebase_merge: false allow_auto_merge: true delete_branch_on_merge: true From 80d4cdd688e88b897f384b770f9c13268ecb3793 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 18 May 2023 14:57:02 -0500 Subject: [PATCH 022/100] chore: Remove clippy lint past MSRV (needs 1.67) --- .clippy.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.clippy.toml b/.clippy.toml index 22fe10b7..090e2bec 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -3,7 +3,6 @@ warn-on-all-wildcard-imports = true allow-expect-in-tests = true allow-unwrap-in-tests = true allow-dbg-in-tests = true -allow-print-in-tests = true disallowed-methods = [ { path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" }, { path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" }, From 2b6bb28cd18916a6244a2632a6abcba9362b9fd0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 18 May 2023 14:58:59 -0500 Subject: [PATCH 023/100] chore(ci): Catch clippy config failures --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 017d45ec..a7bb3256 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,3 +126,5 @@ jobs: with: sarif_file: clippy-results.sarif wait-for-processing: true + - name: Report status + run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated From 4d44cd7ca51f05fb06185677642d73c0ff0da079 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 19 May 2023 13:12:26 -0500 Subject: [PATCH 024/100] chore: Update precommit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f751dec5..fd77abba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-yaml stages: [commit] @@ -15,12 +15,12 @@ repos: - id: detect-private-key stages: [commit] - repo: https://github.com/crate-ci/typos - rev: v1.11.1 + rev: v1.14.10 hooks: - id: typos stages: [commit] - repo: https://github.com/crate-ci/committed - rev: v1.0.4 + rev: v1.0.17 hooks: - id: committed stages: [commit-msg] From d6075a44bff9073c811510e86d73216baa844a69 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 2 Aug 2023 11:11:52 -0500 Subject: [PATCH 025/100] chore: Expand update window so more likely to be hit --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 79e5152c..e5733ed2 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,6 @@ { schedule: [ - 'before 3am on the first day of the month', + 'before 5am on the first day of the month', ], semanticCommits: 'enabled', configMigration: true, From 67eb1d9e3d396cc7f786d767e287d7e946ed3118 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 7 Aug 2023 16:16:17 -0500 Subject: [PATCH 026/100] chore(ci): Ensure lockfile isn't stale --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7bb3256..26c9b0f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,18 @@ jobs: run: cargo check --workspace --all-targets --all-features - name: No-default features run: cargo check --workspace --all-targets --no-default-features + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - uses: Swatinem/rust-cache@v2 + - name: "Is lockfile updated?" + run: cargo fetch --locked docs: name: Docs runs-on: ubuntu-latest From ba76b8bd911b98ab78fec3cf6c8e7ee679721a6f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 11 Aug 2023 13:29:06 -0500 Subject: [PATCH 027/100] chore(ci): Ensure latest deps are good --- .github/workflows/rust-next.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index e90121bc..a540ba58 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -38,3 +38,22 @@ jobs: run: cargo test --workspace --all-features - name: No-default features run: cargo test --workspace --no-default-features + latest: + name: "Check latest dependencies" + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - uses: Swatinem/rust-cache@v2 + - name: Update dependencues + run: cargo update + - name: Default features + run: cargo test --workspace --all-targets + - name: All features + run: cargo test --workspace --all-targets --all-features + - name: No-default features + run: cargo test --workspace --all-targets --no-default-features From 528638729492300730aebee283d2a837325b4a62 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 11 Aug 2023 16:04:07 -0500 Subject: [PATCH 028/100] chore: Update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd77abba..3d9e40fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,12 +15,12 @@ repos: - id: detect-private-key stages: [commit] - repo: https://github.com/crate-ci/typos - rev: v1.14.10 + rev: v1.16.3 hooks: - id: typos stages: [commit] - repo: https://github.com/crate-ci/committed - rev: v1.0.17 + rev: v1.0.20 hooks: - id: committed stages: [commit-msg] From efe14d60899ec75c901c88b46174ccd3fc5e14d8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 22 Aug 2023 11:06:55 -0500 Subject: [PATCH 029/100] chore(renovate): Make style consistent --- .github/renovate.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index e5733ed2..8e31ad0f 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -33,8 +33,8 @@ matchPackageNames: [ 'rust', ], - minimumReleaseAge: "336 days", // 8 releases * 6 weeks per release * 7 days per week - internalChecksFilter: "strict", + minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week + internalChecksFilter: 'strict', }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From a6ecf92327e4c75e6545cdd238cc40171337c403 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 22 Aug 2023 11:07:34 -0500 Subject: [PATCH 030/100] chore(renovate): Update config --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 8e31ad0f..7b75c589 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -7,6 +7,7 @@ dependencyDashboard: true, regexManagers: [ { + customType: 'regex', fileMatch: [ '^rust-toolchain\\.toml$', 'Cargo.toml$', From c8624f0538c30bb5498db489f456af6012988bdb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 23 Aug 2023 09:24:15 -0500 Subject: [PATCH 031/100] chore(renovate): Update MSRV on release --- .github/renovate.json5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7b75c589..a367a473 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -36,6 +36,9 @@ ], minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: 'strict', + schedule: [ + 'every day', + ], }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From 44604fc1d369e255c7edd0954979310131e24fa4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 23 Aug 2023 09:35:47 -0500 Subject: [PATCH 032/100] chore(renovate): Try to fix schedule --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a367a473..28e23ee1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -37,7 +37,7 @@ minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: 'strict', schedule: [ - 'every day', + '* * * * *', ], }, // Goals: From ff82d6960a9903e3c62414cdacc9b2fa0a7ce2cb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 23 Aug 2023 10:43:57 -0500 Subject: [PATCH 033/100] chore(ci): Don't fail on wildcards See EmbarkStudios/cargo-deny#241 --- deny.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deny.toml b/deny.toml index 942e08db..58cc98d5 100644 --- a/deny.toml +++ b/deny.toml @@ -88,7 +88,7 @@ ignore = true # Lint level for when multiple versions of the same crate are detected multiple-versions = "warn" # Lint level for when a crate version requirement is `*` -wildcards = "deny" +wildcards = "warn" # The graph highlighting used when creating dotgraphs for crates # with multiple versions # * lowest-version - The path to the lowest versioned duplicate is highlighted From 5749aa0932d42cd0ee484b6cb9fcf6f6dd026749 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 7 Sep 2023 09:33:44 -0500 Subject: [PATCH 034/100] chore: Approve ISC --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index 58cc98d5..21fa937f 100644 --- a/deny.toml +++ b/deny.toml @@ -41,6 +41,7 @@ allow = [ "MPL-2.0", "Unicode-DFS-2016", "CC0-1.0", + "ISC", ] # List of explicitly disallowed licenses # See https://spdx.org/licenses/ for list of possible licenses From 4173c8f4767296f76a6eb96d70b7ca6c13bb38bd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 20 Sep 2023 09:05:41 -0500 Subject: [PATCH 035/100] chore(ci): Don't set patch for MSRV --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 28e23ee1..56cf1e33 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -36,6 +36,7 @@ ], minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: 'strict', + "extractVersion": "^(?\\d+\\.\\d+)", // Drop the patch version schedule: [ '* * * * *', ], From 86c29dea384c7392a2b682fa0150f52c0f4c7f00 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 26 Sep 2023 08:16:33 -0500 Subject: [PATCH 036/100] chore(ci): Updaet Renovate schema --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 56cf1e33..4eaf67fb 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -5,7 +5,7 @@ semanticCommits: 'enabled', configMigration: true, dependencyDashboard: true, - regexManagers: [ + customManagers: [ { customType: 'regex', fileMatch: [ From ac51f0925003597dec21529538597dbd7872d1ac Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 26 Sep 2023 08:16:47 -0500 Subject: [PATCH 037/100] chore(ci): Normalize json5 syntax --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 4eaf67fb..72d05795 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -36,7 +36,7 @@ ], minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: 'strict', - "extractVersion": "^(?\\d+\\.\\d+)", // Drop the patch version + extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version schedule: [ '* * * * *', ], From 305798083f34bb57951fb6351aa6b897790907eb Mon Sep 17 00:00:00 2001 From: Peter Kehl Date: Fri, 29 Sep 2023 22:59:44 -0700 Subject: [PATCH 038/100] README.md 'Crates Status' icon link now uses the Markdown placeholder/substitution name 'Crates.io' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41d5a974..6958ee06 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation] ![License](https://img.shields.io/crates/l/PROJECT.svg) -[![Crates Status](https://img.shields.io/crates/v/PROJECT.svg)](https://crates.io/crates/PROJECT) +[![Crates Status](https://img.shields.io/crates/v/PROJECT.svg)][Crates.io] ## License From cad9b4717162cc4dbd4253227fc9c5705a302758 Mon Sep 17 00:00:00 2001 From: Peter Kehl Date: Fri, 29 Sep 2023 23:04:45 -0700 Subject: [PATCH 039/100] README.md list indentation and no bare URLs, as per Markdown Lint VS Code extension. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41d5a974..6f307686 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Licensed under either of - * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or ) at your option. From 6d3f888975aedf79e10336c8090d6aab20751b10 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:37:07 +0000 Subject: [PATCH 040/100] chore(deps): update actions/checkout action to v4 --- .github/workflows/audit.yml | 4 ++-- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/committed.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/rust-next.yml | 4 ++-- .github/workflows/spelling.yml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 5b7e83ac..ccee1fef 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -27,7 +27,7 @@ jobs: continue-on-error: true steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions-rs/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -42,7 +42,7 @@ jobs: checks: - bans licenses sources steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v1 with: command: check ${{ matrix.checks }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26c9b0f4..1a703726 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -53,7 +53,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -115,7 +115,7 @@ jobs: security-events: write # to upload sarif results steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/committed.yml b/.github/workflows/committed.yml index 509be080..04625584 100644 --- a/.github/workflows/committed.yml +++ b/.github/workflows/committed.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Lint Commits diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d4b0f84a..80447507 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,6 +18,6 @@ jobs: contents: read runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index a540ba58..d8c2d257 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -26,7 +26,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index f31c7ed8..12f75859 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -16,6 +16,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Spell Check Repo uses: crate-ci/typos@master From 5e3b324b5e6488667be2f00a424781030e37a277 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 5 Oct 2023 14:41:40 -0500 Subject: [PATCH 041/100] chore(ci): Ensure MSRV is quoted Switching from specifying patch to not, with a minor version with a trailing zero, is causing YAML to convert `1.70` to `1.7`. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a703726..19efcf9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.65.0 # MSRV + toolchain: "1.65.0" # MSRV - uses: Swatinem/rust-cache@v2 - name: Default features run: cargo check --workspace --all-targets @@ -119,7 +119,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.65.0 # MSRV + toolchain: "1.65.0" # MSRV components: clippy - uses: Swatinem/rust-cache@v2 - name: Install SARIF tools From 5ebe30b9722ac700d414043ff099bad7f3978582 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 26 Oct 2023 09:14:51 -0500 Subject: [PATCH 042/100] chore(ci): Update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d9e40fd..68db968e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-yaml stages: [commit] @@ -15,7 +15,7 @@ repos: - id: detect-private-key stages: [commit] - repo: https://github.com/crate-ci/typos - rev: v1.16.3 + rev: v1.16.20 hooks: - id: typos stages: [commit] From 598c6244983fb392457f3fbec9badf25fab6d051 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 3 Dec 2023 09:19:35 +0000 Subject: [PATCH 043/100] chore(config): migrate config .github/renovate.json5 --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 72d05795..3119c425 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -29,7 +29,7 @@ { commitMessageTopic: 'MSRV', matchManagers: [ - 'regex', + 'custom.regex', ], matchPackageNames: [ 'rust', From 69fa0268a44a9859c4db98a6692369c0e8719146 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 00:59:55 +0000 Subject: [PATCH 044/100] chore(deps): update actions/setup-python action to v5 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 80447507..95514075 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -19,5 +19,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 - uses: pre-commit/action@v3.0.0 From 82c9aa7bddef20e9705d3d404403e59b2cd7e8e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 00:59:58 +0000 Subject: [PATCH 045/100] chore(deps): update github/codeql-action action to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19efcf9f..1b09d217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,7 +134,7 @@ jobs: | sarif-fmt continue-on-error: true - name: Upload - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: clippy-results.sarif wait-for-processing: true From a4c062667d3b0c94928d285052795637de0a7227 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 2 Jan 2024 09:56:35 -0600 Subject: [PATCH 046/100] chore: Make renovate commits to match --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 3119c425..e5a5de0f 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -3,6 +3,7 @@ 'before 5am on the first day of the month', ], semanticCommits: 'enabled', + commitMessageLowerCase: 'never', configMigration: true, dependencyDashboard: true, customManagers: [ From 61250a36135d0032ceda4316b43d3a62d8b07643 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 3 Jan 2024 08:27:59 -0600 Subject: [PATCH 047/100] chore(ci): Optimize CI runs --- .github/workflows/ci.yml | 2 +- .github/workflows/rust-next.yml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b09d217..943becfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: toolchain: ${{ matrix.rust }} - uses: Swatinem/rust-cache@v2 - name: Build - run: cargo test --no-run --workspace --all-features + run: cargo test --workspace --no-run - name: Default features run: cargo test --workspace - name: All features diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index d8c2d257..43b4ec8f 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -32,6 +32,8 @@ jobs: with: toolchain: ${{ matrix.rust }} - uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo test --workspace --no-run - name: Default features run: cargo test --workspace - name: All features @@ -51,9 +53,11 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Update dependencues run: cargo update + - name: Build + run: cargo test --workspace --no-run - name: Default features - run: cargo test --workspace --all-targets + run: cargo test --workspace - name: All features - run: cargo test --workspace --all-targets --all-features + run: cargo test --workspace --all-features - name: No-default features - run: cargo test --workspace --all-targets --no-default-features + run: cargo test --workspace --no-default-features From e819db4af62e231bcedd976faa488b4e6f46f312 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 18 Jan 2024 09:22:25 -0600 Subject: [PATCH 048/100] chore(ci): Cancel prior CI runs --- .github/workflows/audit.yml | 4 ++++ .github/workflows/ci.yml | 4 ++++ .github/workflows/committed.yml | 4 ++++ .github/workflows/pre-commit.yml | 4 ++++ .github/workflows/rust-next.yml | 4 ++++ .github/workflows/spelling.yml | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index ccee1fef..07c70eeb 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -17,6 +17,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: security_audit: permissions: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 943becfb..2bbd5a57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: ci: permissions: diff --git a/.github/workflows/committed.yml b/.github/workflows/committed.yml index 04625584..e7a50fbb 100644 --- a/.github/workflows/committed.yml +++ b/.github/workflows/committed.yml @@ -11,6 +11,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: committed: name: Lint Commits diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 95514075..7d773285 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,6 +12,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: pre-commit: permissions: diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index 43b4ec8f..f0febc9f 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -12,6 +12,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: test: name: Test diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 12f75859..8e58d9ec 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -10,6 +10,10 @@ env: CARGO_TERM_COLOR: always CLICOLOR: 1 +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: spelling: name: Spell Check with Typos From 0b029063fe83d818e3a79819b88bee8b8314f752 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 24 Jan 2024 08:40:56 -0600 Subject: [PATCH 049/100] chore(ci): Be explicit in renovate updates --- .github/renovate.json5 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index e5a5de0f..32d3628d 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -73,6 +73,7 @@ matchCurrentVersion: '>=1.0.0', matchUpdateTypes: [ 'minor', + 'patch', ], enabled: false, }, @@ -100,6 +101,7 @@ matchCurrentVersion: '>=1.0.0', matchUpdateTypes: [ 'minor', + 'patch', ], automerge: true, groupName: 'compatible (dev)', From 131de55d50284af7a54287d34699347b74d75709 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 31 Jan 2024 12:07:12 -0600 Subject: [PATCH 050/100] chore(ci): Add m1 runners See https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ --- .github/workflows/ci.yml | 2 +- .github/workflows/rust-next.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bbd5a57..a8826b05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: name: Test strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] + os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-14"] rust: ["stable"] continue-on-error: ${{ matrix.rust != 'stable' }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index f0febc9f..49e5d8c3 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -21,7 +21,7 @@ jobs: name: Test strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] + os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-14"] rust: ["stable", "beta"] include: - os: ubuntu-latest From 9a5af5c8d21d549a7eb785343ae055d931952075 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 8 Feb 2024 07:45:48 -0600 Subject: [PATCH 051/100] chore(ci): Only check intel mac on schedule --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8826b05..af065d56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: name: Test strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-14"] + os: ["ubuntu-latest", "windows-latest", "macos-14"] rust: ["stable"] continue-on-error: ${{ matrix.rust != 'stable' }} runs-on: ${{ matrix.os }} From da56001fd6cabdb744f25b021c9efd230472f671 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 8 Feb 2024 07:48:29 -0600 Subject: [PATCH 052/100] chore(ci): Gather coverage --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af065d56..7849a735 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,3 +144,22 @@ jobs: wait-for-processing: true - name: Report status run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated + coverage: + name: Coverage + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: "1.75" # STABLE + - uses: Swatinem/rust-cache@v2 + - name: Install cargo-tarpaulin + run: cargo install cargo-tarpaulin + - name: Gather coverage + run: cargo tarpaulin --output-dir coverage --out lcov + - name: Publish to Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 1313256db3e9a31a3e0647abaacc9a8e4edb51b1 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 8 Feb 2024 09:07:52 -0600 Subject: [PATCH 053/100] chore(ci): Use latest for coverage --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7849a735..2e6597e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: "1.75" # STABLE + toolchain: stable - uses: Swatinem/rust-cache@v2 - name: Install cargo-tarpaulin run: cargo install cargo-tarpaulin From 51a98a25b6c30dd2fbdd74795432006525d1d84a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 15 Feb 2024 09:57:26 -0600 Subject: [PATCH 054/100] chore(ci): Defer to package.rust-version for clippy --- .clippy.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.clippy.toml b/.clippy.toml index 090e2bec..293c14f3 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,3 @@ -msrv = "1.65.0" # MSRV warn-on-all-wildcard-imports = true allow-expect-in-tests = true allow-unwrap-in-tests = true From 4db293d99b81e9c7da8fb030b1471e4e96dc91ef Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 15 Feb 2024 09:58:01 -0600 Subject: [PATCH 055/100] chore(ci): Only verify MSRV for published packages --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6597e9..03a4fc0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: No-default features run: cargo test --workspace --no-default-features msrv: - name: "Check MSRV: 1.65.0" + name: "Check MSRV" runs-on: ubuntu-latest steps: - name: Checkout repository @@ -61,14 +61,15 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: "1.65.0" # MSRV + toolchain: stable - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo check --workspace --all-targets + run: cargo hack check --rust-version --ignore-private --workspace --all-targets - name: All features - run: cargo check --workspace --all-targets --all-features + run: cargo hack check --rust-version --ignore-private --workspace --all-targets --all-features - name: No-default features - run: cargo check --workspace --all-targets --no-default-features + run: cargo hack check --rust-version --ignore-private --workspace --all-targets --no-default-features lockfile: runs-on: ubuntu-latest steps: From 779496bb002837bf4e115ae3a33e7c819abdf293 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 15 Feb 2024 10:03:14 -0600 Subject: [PATCH 056/100] chore(ci): Run the latest clippy --- .github/renovate.json5 | 37 +++++++++++++++++++++++++++++++++++-- .github/workflows/ci.yml | 2 +- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 32d3628d..06c1d639 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -21,7 +21,25 @@ 'MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)', '(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV', ], - depNameTemplate: 'rust', + depNameTemplate: 'MSRV', + packageNameTemplate: 'rust-lang/rust', + datasourceTemplate: 'github-releases', + }, + { + customType: 'regex', + fileMatch: [ + '^rust-toolchain\\.toml$', + 'Cargo.toml$', + 'clippy.toml$', + '\\.clippy.toml$', + '^\\.github/workflows/ci.yml$', + '^\\.github/workflows/rust-next.yml$', + ], + matchStrings: [ + 'STABLE.*?(?\\d+\\.\\d+(\\.\\d+)?)', + '(?\\d+\\.\\d+(\\.\\d+)?).*?STABLE', + ], + depNameTemplate: 'STABLE', packageNameTemplate: 'rust-lang/rust', datasourceTemplate: 'github-releases', }, @@ -33,7 +51,7 @@ 'custom.regex', ], matchPackageNames: [ - 'rust', + 'MSRV', ], minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week internalChecksFilter: 'strict', @@ -41,6 +59,21 @@ schedule: [ '* * * * *', ], + groupName: 'rust-version', + }, + { + commitMessageTopic: 'STABLE', + matchManagers: [ + 'custom.regex', + ], + matchPackageNames: [ + 'STABLE', + ], + extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version + schedule: [ + '* * * * *', + ], + groupName: 'rust-version', }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03a4fc0b..1c18ca65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: "1.65.0" # MSRV + toolchain: "1.76" # STABLE components: clippy - uses: Swatinem/rust-cache@v2 - name: Install SARIF tools From c977df514987a625772ca04df9fc100ba8b7576f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 20 Feb 2024 20:22:05 -0600 Subject: [PATCH 057/100] chore(ci): Prevent cargo-hack from blowing away our lockfile See taiki-e/cargo-hack#234 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c18ca65..12d398cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,11 +65,11 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo hack check --rust-version --ignore-private --workspace --all-targets + run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets - name: All features - run: cargo hack check --rust-version --ignore-private --workspace --all-targets --all-features + run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets --all-features - name: No-default features - run: cargo hack check --rust-version --ignore-private --workspace --all-targets --no-default-features + run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets --no-default-features lockfile: runs-on: ubuntu-latest steps: From 7846c5130e5459ce452bd4fdb17373d83f45dff3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 00:30:14 +0000 Subject: [PATCH 058/100] chore(deps): Update pre-commit/action action to v3.0.1 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7d773285..1b000abf 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -24,4 +24,4 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 From 3d5ead81cf3962997045915cd9b137086d35d1a9 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 21 Mar 2024 10:46:56 -0500 Subject: [PATCH 059/100] chore(ci): Configure standard lints --- Cargo.toml | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 2 ++ 2 files changed, 86 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index b8ecde11..e51c5ddd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,87 @@ include = [ "examples/**/*" ] +[workspace.lints.rust] +missing_docs = "warn" +rust_2018_idioms = "warn" +unreachable_pub = "warn" +unsafe-op-in-unsafe-fn = "warn" +unsafe_code = "warn" +unused-crate-dependencies = "warn" +unused-lifetimes = "warn" +unused-macro-rules = "warn" +unused-qualifications = "warn" + +[workspace.lints.clippy] +bool_assert_comparison = "allow" +branches_sharing_code = "allow" +checked_conversions = "warn" +collapsible_else_if = "allow" +create_dir = "warn" +dbg_macro = "warn" +debug_assert_with_mut_call = "warn" +doc_markdown = "warn" +empty_enum = "warn" +enum_glob_use = "warn" +exhaustive_enums = "warn" +exhaustive_structs = "warn" +exit = "warn" +expl_impl_clone_on_copy = "warn" +explicit_deref_methods = "warn" +explicit_into_iter_loop = "warn" +fallible_impl_from = "warn" +filter_map_next = "warn" +flat_map_option = "warn" +float_cmp_const = "warn" +fn_params_excessive_bools = "warn" +from_iter_instead_of_collect = "warn" +if_same_then_else = "allow" +implicit_clone = "warn" +imprecise_flops = "warn" +inconsistent_struct_constructor = "warn" +inefficient_to_string = "warn" +infinite_loop = "warn" +invalid_upcast_comparisons = "warn" +items_after_statements = "warn" +large_digit_groups = "warn" +large_stack_arrays = "warn" +large_types_passed_by_value = "warn" +let_and_return = "allow" # sometimes good to name what you are returning +linkedlist = "warn" +lossy_float_literal = "warn" +macro_use_imports = "warn" +match_wildcard_for_single_variants = "warn" +mem_forget = "warn" +mutex_integer = "warn" +needless_continue = "warn" +needless_for_each = "warn" +negative_feature_names = "warn" +path_buf_push_overwrite = "warn" +print_stderr = "warn" +print_stdout = "warn" +ptr_as_ptr = "warn" +rc_mutex = "warn" +redundant_feature_names = "warn" +ref_option_ref = "warn" +rest_pat_in_fully_bound_structs = "warn" +return_self_not_must_use = "warn" +same_functions_in_if_condition = "warn" +self_named_module_files = "warn" +semicolon_if_nothing_returned = "warn" +single_match_else = "warn" +str_to_string = "warn" +string_add = "warn" +string_add_assign = "warn" +string_lit_as_bytes = "warn" +string_to_string = "warn" +tests_outside_test_module = "warn" +todo = "warn" +trait_duplication_in_bounds = "warn" +unwrap_used = "warn" +verbose_file_reads = "warn" +wildcard_imports = "warn" +zero_sized_map_values = "warn" + [package] name = "PROJECT" version = "0.0.1" @@ -46,3 +127,6 @@ default = [] [dependencies] [dev-dependencies] + +[lints] +workspace = true diff --git a/src/lib.rs b/src/lib.rs index 45bf577c..8ce46b57 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,2 +1,4 @@ +//! > DESCRIPTION + #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![allow(non_snake_case)] // TODO: Delete me From ace6e07683db64f05a237d8c833e2320a951b5d4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 21 Mar 2024 12:20:47 -0500 Subject: [PATCH 060/100] chore(ci): Don't update stable and MSRV together We might want to hold one or the other back --- .github/renovate.json5 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 06c1d639..373fc0e5 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -59,10 +59,9 @@ schedule: [ '* * * * *', ], - groupName: 'rust-version', }, { - commitMessageTopic: 'STABLE', + commitMessageTopic: 'Rust Stable', matchManagers: [ 'custom.regex', ], @@ -73,7 +72,6 @@ schedule: [ '* * * * *', ], - groupName: 'rust-version', }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From 8ec86ab9a22aa7333af26113d8b725333966635f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 25 Mar 2024 12:33:58 -0500 Subject: [PATCH 061/100] chore: Normalize clippy lint names --- Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e51c5ddd..d03936f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,12 +20,12 @@ include = [ missing_docs = "warn" rust_2018_idioms = "warn" unreachable_pub = "warn" -unsafe-op-in-unsafe-fn = "warn" +unsafe_op_in_unsafe_fn = "warn" unsafe_code = "warn" -unused-crate-dependencies = "warn" -unused-lifetimes = "warn" -unused-macro-rules = "warn" -unused-qualifications = "warn" +unused_crate_dependencies = "warn" +unused_lifetimes = "warn" +unused_macro_rules = "warn" +unused_qualifications = "warn" [workspace.lints.clippy] bool_assert_comparison = "allow" From 8e647d9cd40a6891d524737d97d93a43a9e7b965 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:35:59 -0500 Subject: [PATCH 062/100] chore: Encourage use of workspace.dependencies --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d03936f4..e07a4738 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,8 @@ include = [ "examples/**/*" ] +[workspace.dependencies] + [workspace.lints.rust] missing_docs = "warn" rust_2018_idioms = "warn" From 126eb3d4dc4f59bcbee11d9d55545f01f75fb734 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:48:35 -0500 Subject: [PATCH 063/100] chore: Encourage a single test binary --- Cargo.lock | 49 ++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 ++ tests/testsuite/delete_me.rs | 0 tests/testsuite/main.rs | 1 + 4 files changed, 52 insertions(+) create mode 100644 tests/testsuite/delete_me.rs create mode 100644 tests/testsuite/main.rs diff --git a/Cargo.lock b/Cargo.lock index 49c1f2dc..e50f2865 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,3 +5,52 @@ version = 3 [[package]] name = "PROJECT" version = "0.0.1" +dependencies = [ + "automod", +] + +[[package]] +name = "automod" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edf3ee19dbc0a46d740f6f0926bde8c50f02bdbc7b536842da28f6ac56513a8b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "2.0.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/Cargo.toml b/Cargo.toml index e07a4738..d5e3b014 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ include = [ ] [workspace.dependencies] +automod = "1.0.14" [workspace.lints.rust] missing_docs = "warn" @@ -129,6 +130,7 @@ default = [] [dependencies] [dev-dependencies] +automod.workspace = true [lints] workspace = true diff --git a/tests/testsuite/delete_me.rs b/tests/testsuite/delete_me.rs new file mode 100644 index 00000000..e69de29b diff --git a/tests/testsuite/main.rs b/tests/testsuite/main.rs new file mode 100644 index 00000000..44413747 --- /dev/null +++ b/tests/testsuite/main.rs @@ -0,0 +1 @@ +automod::dir!("tests/testsuite"); From c8b190be3a7397d63ffb175f8387ef98e7896b5a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:50:22 -0500 Subject: [PATCH 064/100] chore(ci): Use latest SARIF Now that we run clippy on stable, we can do this --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12d398cd..52ce7f22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,9 +128,9 @@ jobs: components: clippy - uses: Swatinem/rust-cache@v2 - name: Install SARIF tools - run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv + run: cargo install clippy-sarif --locked - name: Install SARIF tools - run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv + run: cargo install sarif-fmt --locked - name: Check run: > cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated From 9b1b56620156971664aaf0f7a693bf3bc72ca0cb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:51:51 -0500 Subject: [PATCH 065/100] chore(ci): Fix all rust-version-specific checks to stable --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52ce7f22..42c6be7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: stable + toolchain: "1.76" # STABLE - uses: Swatinem/rust-cache@v2 - name: Check documentation env: @@ -106,9 +106,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - # Not MSRV because its harder to jump between versions and people are - # more likely to have stable - toolchain: stable + toolchain: "1.76" # STABLE components: rustfmt - uses: Swatinem/rust-cache@v2 - name: Check formatting From 92d486c4b03efa984a9d03aa7279a1febe84d816 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:53:02 -0500 Subject: [PATCH 066/100] chore(ci): Speed up lockfile check --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42c6be7e..7a455a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: toolchain: stable - uses: Swatinem/rust-cache@v2 - name: "Is lockfile updated?" - run: cargo fetch --locked + run: cargo update --workspace --locked docs: name: Docs runs-on: ubuntu-latest From 9258d9af7b87bc0394ef09be7e65bf6152d99f4b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:57:23 -0500 Subject: [PATCH 067/100] chore(ci): More exhaustively check features --- .github/workflows/ci.yml | 15 ++++----------- .github/workflows/rust-next.yml | 18 ++++++------------ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a455a4d..134c3179 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,14 +44,11 @@ jobs: with: toolchain: ${{ matrix.rust }} - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Build run: cargo test --workspace --no-run - - name: Default features - run: cargo test --workspace - - name: All features - run: cargo test --workspace --all-features - - name: No-default features - run: cargo test --workspace --no-default-features + - name: Test + run: cargo hack test --feature-powerset --workspace msrv: name: "Check MSRV" runs-on: ubuntu-latest @@ -65,11 +62,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets - - name: All features - run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets --all-features - - name: No-default features - run: cargo hack check --locked --rust-version --ignore-private --workspace --all-targets --no-default-features + run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets lockfile: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index 49e5d8c3..e673b652 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -36,14 +36,11 @@ jobs: with: toolchain: ${{ matrix.rust }} - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Build run: cargo test --workspace --no-run - - name: Default features - run: cargo test --workspace - - name: All features - run: cargo test --workspace --all-features - - name: No-default features - run: cargo test --workspace --no-default-features + - name: Test + run: cargo hack test --feature-powerset --workspace latest: name: "Check latest dependencies" runs-on: ubuntu-latest @@ -55,13 +52,10 @@ jobs: with: toolchain: stable - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Update dependencues run: cargo update - name: Build run: cargo test --workspace --no-run - - name: Default features - run: cargo test --workspace - - name: All features - run: cargo test --workspace --all-features - - name: No-default features - run: cargo test --workspace --no-default-features + - name: Test + run: cargo hack test --feature-powerset --workspace From 2714cca7c31a9c73716e88a93693c119c527d7f1 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 09:58:31 -0500 Subject: [PATCH 068/100] chore(ci): Don't check for unused crates --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d5e3b014..4097fef0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ rust_2018_idioms = "warn" unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" unsafe_code = "warn" -unused_crate_dependencies = "warn" unused_lifetimes = "warn" unused_macro_rules = "warn" unused_qualifications = "warn" From 314eef7f5fb7e415e8cd92887e5e878e9bfa929b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 10:38:57 -0500 Subject: [PATCH 069/100] chore: Dont check must_use See https://github.com/rust-lang/rust-clippy/issues/8339 --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4097fef0..666e6e39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,6 @@ rc_mutex = "warn" redundant_feature_names = "warn" ref_option_ref = "warn" rest_pat_in_fully_bound_structs = "warn" -return_self_not_must_use = "warn" same_functions_in_if_condition = "warn" self_named_module_files = "warn" semicolon_if_nothing_returned = "warn" From 6a9d2bf50fa78d8f277b77be836b48fad8c7c764 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 12:45:57 -0500 Subject: [PATCH 070/100] chore: Don't warn on unsafe This works well when a package is a safe abstraction but to universally apply in a template to all members of a workspace doesn't make sense. --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 666e6e39..50bfea56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ missing_docs = "warn" rust_2018_idioms = "warn" unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" -unsafe_code = "warn" unused_lifetimes = "warn" unused_macro_rules = "warn" unused_qualifications = "warn" From 8d4b1b6c8daf3c32828bf92725811cf433917081 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 13:24:28 -0500 Subject: [PATCH 071/100] chore: Remove clippy::tests_outside_test_module See https://github.com/rust-lang/rust-clippy/issues/11024 --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 50bfea56..ed593eba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,7 +89,6 @@ string_add = "warn" string_add_assign = "warn" string_lit_as_bytes = "warn" string_to_string = "warn" -tests_outside_test_module = "warn" todo = "warn" trait_duplication_in_bounds = "warn" unwrap_used = "warn" From 99e034bbbbae7d60bb68d68c6d0db8338a97b030 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 28 Mar 2024 15:10:58 -0500 Subject: [PATCH 072/100] chore: Move print lints to lib.rs While there is a config for ignoring these in tests, it doesn't help with examples. --- Cargo.toml | 2 -- src/lib.rs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ed593eba..faf1e63a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,8 +73,6 @@ needless_continue = "warn" needless_for_each = "warn" negative_feature_names = "warn" path_buf_push_overwrite = "warn" -print_stderr = "warn" -print_stdout = "warn" ptr_as_ptr = "warn" rc_mutex = "warn" redundant_feature_names = "warn" diff --git a/src/lib.rs b/src/lib.rs index 8ce46b57..2eabbd09 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,6 @@ //! > DESCRIPTION #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![warn(clippy::print_stderr)] +#![warn(clippy::print_stdout)] #![allow(non_snake_case)] // TODO: Delete me From a516bda4adb0f367da527488697ea308fbe58b38 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 08:58:36 -0500 Subject: [PATCH 073/100] chore: Drop workspace.dependencies Without automated checks, this will make it harder to track breaking changes. --- Cargo.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index faf1e63a..983e0905 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,6 @@ include = [ "examples/**/*" ] -[workspace.dependencies] -automod = "1.0.14" - [workspace.lints.rust] missing_docs = "warn" rust_2018_idioms = "warn" @@ -124,7 +121,7 @@ default = [] [dependencies] [dev-dependencies] -automod.workspace = true +automod = "1.0.14" [lints] workspace = true From ebc70d00f9259146592b7987bfcb8a0cb6c16661 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 09:11:24 -0500 Subject: [PATCH 074/100] chore: Only check missing_docs in lib This also fires in examples and other places. While docs in examples would be nice, it isn't universally applicable and `allow`s would undermine the examples. --- Cargo.toml | 1 - src/lib.rs | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 983e0905..715131bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ include = [ ] [workspace.lints.rust] -missing_docs = "warn" rust_2018_idioms = "warn" unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" diff --git a/src/lib.rs b/src/lib.rs index 2eabbd09..39877b76 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ //! > DESCRIPTION #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![warn(missing_docs)] #![warn(clippy::print_stderr)] #![warn(clippy::print_stdout)] #![allow(non_snake_case)] // TODO: Delete me From 3278d49444c33ece610de3fb5547bd885124dfe7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 10:35:16 -0500 Subject: [PATCH 075/100] chore: Allow print in tests --- .clippy.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.clippy.toml b/.clippy.toml index 293c14f3..027eef41 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,5 @@ warn-on-all-wildcard-imports = true +allow-print-in-tests = true allow-expect-in-tests = true allow-unwrap-in-tests = true allow-dbg-in-tests = true From d634de649f30d5a4deade46333606bc63897d05e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 11:36:58 -0500 Subject: [PATCH 076/100] chore(ci): Ensure CI job always runs --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 134c3179..95b13b4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,13 @@ jobs: permissions: contents: none name: CI - needs: [test, msrv, docs, rustfmt, clippy] + needs: [test, msrv, lockfile, docs, rustfmt, clippy] runs-on: ubuntu-latest + if: "always()" steps: - - name: Done - run: exit 0 + - name: Failed + run: exit 1 + if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')" test: name: Test strategy: From 2570b58a0feaf355dede9080a9f4c98f8ba5580b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 12:31:49 -0500 Subject: [PATCH 077/100] chore(ci): Skip branch protections --- .github/settings.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 7d5e4fce..08983ae0 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -42,14 +42,18 @@ labels: color: '#c2e0c6' description: "Help wanted!" -branches: - - name: main - protection: - required_pull_request_reviews: null - required_conversation_resolution: true - required_status_checks: - # Required. Require branches to be up to date before merging. - strict: false - contexts: ["CI", "Lint Commits", "Spell Check with Typos"] - enforce_admins: false - restrictions: null +# This serves more as documentation. +# Branch protection API was replaced by rulesets but settings isn't updated. +# See https://github.com/repository-settings/app/issues/825 +# +# branches: +# - name: main +# protection: +# required_pull_request_reviews: null +# required_conversation_resolution: true +# required_status_checks: +# # Required. Require branches to be up to date before merging. +# strict: false +# contexts: ["CI", "Lint Commits", "Spell Check with Typos"] +# enforce_admins: false +# restrictions: null From afd275590c5568e8f7ca60abc1f33b20e3679c03 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 12:36:16 -0500 Subject: [PATCH 078/100] chore(ci): Don't block on Lint Commits --- .github/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/settings.yml b/.github/settings.yml index 08983ae0..457eed62 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -54,6 +54,6 @@ labels: # required_status_checks: # # Required. Require branches to be up to date before merging. # strict: false -# contexts: ["CI", "Lint Commits", "Spell Check with Typos"] +# contexts: ["CI", "Spell Check with Typos"] # enforce_admins: false # restrictions: null From 14225df351a4510a6fad72e716b29173347aac84 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 16 Apr 2024 21:46:56 -0500 Subject: [PATCH 079/100] chore(ci): Auto-merge linter version updates --- .github/renovate.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 373fc0e5..62ca46b6 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -72,6 +72,7 @@ schedule: [ '* * * * *', ], + automerge: true, }, // Goals: // - Keep version reqs low, ignoring compatible normal/build dependencies From be30b1bba034344c1a7c526b2b1898a8767471c5 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Apr 2024 09:20:18 -0500 Subject: [PATCH 080/100] chore(ci): Try again with not auto-updating MSRV The overhead for MSRV bumping is a lot lower and its annoying merging all of the PRs (and I don't want these auto-merged) --- .github/renovate.json5 | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 62ca46b6..c1844208 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -7,24 +7,6 @@ configMigration: true, dependencyDashboard: true, customManagers: [ - { - customType: 'regex', - fileMatch: [ - '^rust-toolchain\\.toml$', - 'Cargo.toml$', - 'clippy.toml$', - '\\.clippy.toml$', - '^\\.github/workflows/ci.yml$', - '^\\.github/workflows/rust-next.yml$', - ], - matchStrings: [ - 'MSRV.*?(?\\d+\\.\\d+(\\.\\d+)?)', - '(?\\d+\\.\\d+(\\.\\d+)?).*?MSRV', - ], - depNameTemplate: 'MSRV', - packageNameTemplate: 'rust-lang/rust', - datasourceTemplate: 'github-releases', - }, { customType: 'regex', fileMatch: [ @@ -45,21 +27,6 @@ }, ], packageRules: [ - { - commitMessageTopic: 'MSRV', - matchManagers: [ - 'custom.regex', - ], - matchPackageNames: [ - 'MSRV', - ], - minimumReleaseAge: '336 days', // 8 releases * 6 weeks per release * 7 days per week - internalChecksFilter: 'strict', - extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version - schedule: [ - '* * * * *', - ], - }, { commitMessageTopic: 'Rust Stable', matchManagers: [ From a01f25da96e8bd3e216fbc19ac9883ab3bf969ce Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Apr 2024 09:23:28 -0500 Subject: [PATCH 081/100] chore(ci): Reduce noisy lints Want to add this back in later but this is slowing down migration of my repos. --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 39877b76..2eabbd09 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,6 @@ //! > DESCRIPTION #![cfg_attr(docsrs, feature(doc_auto_cfg))] -#![warn(missing_docs)] #![warn(clippy::print_stderr)] #![warn(clippy::print_stdout)] #![allow(non_snake_case)] // TODO: Delete me From 82cf9a62b027c10c6fafdcaaee24c4e92d7da61d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Apr 2024 09:35:55 -0500 Subject: [PATCH 082/100] chore(ci): Reduce noisy lints --- Cargo.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 715131bb..898251ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,6 @@ debug_assert_with_mut_call = "warn" doc_markdown = "warn" empty_enum = "warn" enum_glob_use = "warn" -exhaustive_enums = "warn" -exhaustive_structs = "warn" -exit = "warn" expl_impl_clone_on_copy = "warn" explicit_deref_methods = "warn" explicit_into_iter_loop = "warn" @@ -85,7 +82,6 @@ string_lit_as_bytes = "warn" string_to_string = "warn" todo = "warn" trait_duplication_in_bounds = "warn" -unwrap_used = "warn" verbose_file_reads = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" From 181a2cf5e673d0f6f42133a5b30ccafd86b0106d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Apr 2024 11:36:19 -0500 Subject: [PATCH 083/100] chore(ci): Allow prelude wildcard imports --- .clippy.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.clippy.toml b/.clippy.toml index 027eef41..1d4c5dc6 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,3 @@ -warn-on-all-wildcard-imports = true allow-print-in-tests = true allow-expect-in-tests = true allow-unwrap-in-tests = true From 51de731521efb05c5503e05c33036d8fa439bc5a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Apr 2024 15:59:46 -0500 Subject: [PATCH 084/100] chore(ci): Lint clippy::items_after_statements seems too strict --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 898251ed..5a905800 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,6 @@ inconsistent_struct_constructor = "warn" inefficient_to_string = "warn" infinite_loop = "warn" invalid_upcast_comparisons = "warn" -items_after_statements = "warn" large_digit_groups = "warn" large_stack_arrays = "warn" large_types_passed_by_value = "warn" From 78741e51bbbe6c83aaa98305623a8ffc6226493f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 27 May 2024 21:45:38 -0500 Subject: [PATCH 085/100] chore: Remove lints that lead to bad code --- Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5a905800..80906914 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,6 @@ let_and_return = "allow" # sometimes good to name what you are returning linkedlist = "warn" lossy_float_literal = "warn" macro_use_imports = "warn" -match_wildcard_for_single_variants = "warn" mem_forget = "warn" mutex_integer = "warn" needless_continue = "warn" @@ -73,7 +72,6 @@ rest_pat_in_fully_bound_structs = "warn" same_functions_in_if_condition = "warn" self_named_module_files = "warn" semicolon_if_nothing_returned = "warn" -single_match_else = "warn" str_to_string = "warn" string_add = "warn" string_add_assign = "warn" From 44916f6d2b8da4d778186083c31ff52a73187edf Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 29 May 2024 16:15:19 -0500 Subject: [PATCH 086/100] chore: Update deny config --- deny.toml | 176 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 136 insertions(+), 40 deletions(-) diff --git a/deny.toml b/deny.toml index 21fa937f..b6ecbe9c 100644 --- a/deny.toml +++ b/deny.toml @@ -4,32 +4,82 @@ # * allow - No warning or error will be produced, though in some cases a note # will be +# Root options + +# The graph table configures how the dependency graph is constructed and thus +# which crates the checks are performed against +[graph] +# If 1 or more target triples (and optionally, target_features) are specified, +# only the specified targets will be checked when running `cargo deny check`. +# This means, if a particular package is only ever used as a target specific +# dependency, such as, for example, the `nix` crate only being used via the +# `target_family = "unix"` configuration, that only having windows targets in +# this list would mean the nix crate, as well as any of its exclusive +# dependencies not shared by any other crates, would be ignored, as the target +# list here is effectively saying which targets you are building for. +targets = [ + # The triple can be any string, but only the target triples built in to + # rustc (as of 1.40) can be checked against actual config expressions + #"x86_64-unknown-linux-musl", + # You can also specify which target_features you promise are enabled for a + # particular target. target_features are currently not validated against + # the actual valid features supported by the target architecture. + #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, +] +# When creating the dependency graph used as the source of truth when checks are +# executed, this field can be used to prune crates from the graph, removing them +# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate +# is pruned from the graph, all of its dependencies will also be pruned unless +# they are connected to another crate in the graph that hasn't been pruned, +# so it should be used with care. The identifiers are [Package ID Specifications] +# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html) +#exclude = [] +# If true, metadata will be collected with `--all-features`. Note that this can't +# be toggled off if true, if you want to conditionally enable `--all-features` it +# is recommended to pass `--all-features` on the cmd line instead +all-features = false +# If true, metadata will be collected with `--no-default-features`. The same +# caveat with `all-features` applies +no-default-features = false +# If set, these feature will be enabled when collecting metadata. If `--features` +# is specified on the cmd line they will take precedence over this option. +#features = [] + +# The output table provides options for how/if diagnostics are outputted +[output] +# When outputting inclusion graphs in diagnostics that include features, this +# option can be used to specify the depth at which feature edges will be added. +# This option is included since the graphs can be quite large and the addition +# of features from the crate(s) to all of the graph roots can be far too verbose. +# This option can be overridden via `--feature-depth` on the cmd line +feature-depth = 1 + # This section is considered when running `cargo deny check advisories` # More documentation for the advisories section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html [advisories] -# The lint level for security vulnerabilities -vulnerability = "deny" -# The lint level for unmaintained crates -unmaintained = "warn" -# The lint level for crates that have been yanked from their source registry -yanked = "warn" -# The lint level for crates with security notices. Note that as of -# 2019-12-17 there are no security notice advisories in -# https://github.com/rustsec/advisory-db -notice = "warn" +# The path where the advisory databases are cloned/fetched into +#db-path = "$CARGO_HOME/advisory-dbs" +# The url(s) of the advisory databases to use +#db-urls = ["https://github.com/rustsec/advisory-db"] # A list of advisory IDs to ignore. Note that ignored advisories will still # output a note when they are encountered. -# -# e.g. "RUSTSEC-0000-0000", ignore = [ + #"RUSTSEC-0000-0000", + #{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" }, + #"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish + #{ crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" }, ] +# If this is true, then cargo deny will use the git executable to fetch advisory database. +# If this is false, then it uses a built-in git library. +# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. +# See Git Authentication for more information about setting up git authentication. +#git-fetch-with-cli = true # This section is considered when running `cargo deny check licenses` # More documentation for the licenses section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html [licenses] -unlicensed = "deny" # List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. @@ -42,26 +92,8 @@ allow = [ "Unicode-DFS-2016", "CC0-1.0", "ISC", + "OpenSSL", ] -# List of explicitly disallowed licenses -# See https://spdx.org/licenses/ for list of possible licenses -# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. -deny = [ -] -# Lint level for licenses considered copyleft -copyleft = "deny" -# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses -# * both - The license will be approved if it is both OSI-approved *AND* FSF -# * either - The license will be approved if it is either OSI-approved *OR* FSF -# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF -# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved -# * neither - This predicate is ignored and the default lint level is used -allow-osi-fsf-free = "neither" -# Lint level used when no other predicates are matched -# 1. License isn't in the allow or deny lists -# 2. License isn't copyleft -# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither" -default = "deny" # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the # canonical license text of a valid SPDX license file. @@ -72,7 +104,25 @@ confidence-threshold = 0.8 exceptions = [ # Each entry is the crate and version constraint, and its specific allow # list - #{ allow = ["Zlib"], name = "adler32", version = "*" }, + #{ allow = ["Zlib"], crate = "adler32" }, +] + +# Some crates don't have (easily) machine readable licensing information, +# adding a clarification entry for it allows you to manually specify the +# licensing information +[[licenses.clarify]] +# The package spec the clarification applies to +crate = "ring" +# The SPDX expression for the license requirements of the crate +expression = "MIT AND ISC AND OpenSSL" +# One or more files in the crate's source used as the "source of truth" for +# the license expression. If the contents match, the clarification will be used +# when running the license check, otherwise the clarification will be ignored +# and the crate will be checked normally, which may produce warnings or errors +# depending on the rest of your configuration +license-files = [ +# Each entry is a crate relative path, and the (opaque) hash of its contents +{ path = "LICENSE", hash = 0xbd0eed23 } ] [licenses.private] @@ -81,6 +131,12 @@ exceptions = [ # To see how to mark a crate as unpublished (to the official registry), # visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. ignore = true +# One or more private registries that you might publish crates to, if a crate +# is only published to private registries, and ignore is true, the crate will +# not have its license(s) checked +registries = [ + #"https://sekretz.com/registry +] # This section is considered when running `cargo deny check bans`. # More documentation about the 'bans' section can be found here: @@ -89,7 +145,7 @@ ignore = true # Lint level for when multiple versions of the same crate are detected multiple-versions = "warn" # Lint level for when a crate version requirement is `*` -wildcards = "warn" +wildcards = "allow" # The graph highlighting used when creating dotgraphs for crates # with multiple versions # * lowest-version - The path to the lowest versioned duplicate is highlighted @@ -106,17 +162,53 @@ workspace-default-features = "allow" external-default-features = "allow" # List of crates that are allowed. Use with care! allow = [ - #{ name = "ansi_term", version = "=0.11.0" }, + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is allowed" }, ] # List of crates to deny deny = [ - # Each entry the name of a crate and a version range. If version is - # not specified, all versions will be matched. - #{ name = "ansi_term", version = "=0.11.0" }, - # + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is banned" }, # Wrapper crates can optionally be specified to allow the crate when it # is a direct dependency of the otherwise banned crate - #{ name = "ansi_term", version = "=0.11.0", wrappers = [] }, + #{ crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, +] + +# List of features to allow/deny +# Each entry the name of a crate and a version range. If version is +# not specified, all versions will be matched. +#[[bans.features]] +#crate = "reqwest" +# Features to not allow +#deny = ["json"] +# Features to allow +#allow = [ +# "rustls", +# "__rustls", +# "__tls", +# "hyper-rustls", +# "rustls", +# "rustls-pemfile", +# "rustls-tls-webpki-roots", +# "tokio-rustls", +# "webpki-roots", +#] +# If true, the allowed features must exactly match the enabled feature set. If +# this is set there is no point setting `deny` +#exact = true + +# Certain crates/versions that will be skipped when doing duplicate detection. +skip = [ + #"ansi_term@0.11.0", + #{ crate = "ansi_term@0.11.0", reason = "you can specify a reason why it can't be updated/removed" }, +] +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite. +skip-tree = [ + #"ansi_term@0.11.0", # will be skipped along with _all_ of its direct and transitive dependencies + #{ crate = "ansi_term@0.11.0", depth = 20 }, ] # This section is considered when running `cargo deny check sources`. @@ -138,3 +230,7 @@ allow-git = [] [sources.allow-org] # 1 or more github.com organizations to allow git sources for github = [] +# 1 or more gitlab.com organizations to allow git sources for +gitlab = [] +# 1 or more bitbucket.org organizations to allow git sources for +bitbucket = [] From ce6badcd188650dac4b3c97b69bde86a738917a0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 3 Jun 2024 10:29:26 -0500 Subject: [PATCH 087/100] chore: Fix typo --- .github/workflows/rust-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index e673b652..ab499633 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -53,7 +53,7 @@ jobs: toolchain: stable - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - - name: Update dependencues + - name: Update dependencies run: cargo update - name: Build run: cargo test --workspace --no-run From 1353a953a527b7ebc0b0a3f267fc47f56359e886 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 4 Jun 2024 15:33:16 -0500 Subject: [PATCH 088/100] chore: Encourage use of repository --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 80906914..c9695d79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,7 @@ zero_sized_map_values = "warn" name = "PROJECT" version = "0.0.1" description = "DESCRIPTION" +repository = "REPOSITORY" categories = [] keywords = [] license.workspace = true From 7039c66c7f0a42b84136a2f166ce6446edbb9ce0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 4 Jun 2024 15:33:50 -0500 Subject: [PATCH 089/100] chore: Encourage cloneable repositories --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c9695d79..96cb2348 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ resolver = "2" [workspace.package] +repository = "REPOSITORY" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.65.0" # MSRV @@ -87,9 +88,9 @@ zero_sized_map_values = "warn" name = "PROJECT" version = "0.0.1" description = "DESCRIPTION" -repository = "REPOSITORY" categories = [] keywords = [] +repository.workspace = true license.workspace = true edition.workspace = true rust-version.workspace = true From 2a274e149f7f6f7f80f08486bd34c4fc7b8d63c8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 21 Jun 2024 14:21:41 -0400 Subject: [PATCH 090/100] chore(ci): Auto-update Mac now that latest uses m1 --- .github/workflows/ci.yml | 2 +- .github/workflows/rust-next.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95b13b4f..6e064993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: name: Test strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-14"] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] rust: ["stable"] continue-on-error: ${{ matrix.rust != 'stable' }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/rust-next.yml b/.github/workflows/rust-next.yml index ab499633..e98386c4 100644 --- a/.github/workflows/rust-next.yml +++ b/.github/workflows/rust-next.yml @@ -21,7 +21,7 @@ jobs: name: Test strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-14"] + os: ["ubuntu-latest", "windows-latest", "macos-latest"] rust: ["stable", "beta"] include: - os: ubuntu-latest From 0547ff2d0f135d541faef3735143b40c174b4c3a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 4 Jul 2024 12:54:40 -0400 Subject: [PATCH 091/100] docs(contrib): Clarify our policies --- CONTRIBUTING.md | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9d70793..1a6dd1cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,27 +29,42 @@ to re-work some of it and the discouragement that goes along with that. ### Process -Before posting a PR, we request that the commit history get cleaned up. -However, we recommend avoiding this during the review to make it easier to -check how feedback was handled. Once the PR is ready, we'll ask you to clean up -the commit history from the review. Once you let us know this is done, we can -move forward with merging! If you are uncomfortable with these parts of git, -let us know and we can help. - -For commit messages, we use [Conventional](https://www.conventionalcommits.org) -style. If you already wrote your commits and don't feel comfortable changing -them, don't worry and go ahead and create your PR. We'll work with you on the -best route forward. You can check your branch locally with -[`committed`](https://github.com/crate-ci/committed). - As a heads up, we'll be running your PR through the following gauntlet: - warnings turned to compile errors - `cargo test` - `rustfmt` - `clippy` - `rustdoc` -- [`committed`](https://github.com/crate-ci/committed) -- [`typos`](https://github.com/crate-ci/typos) +- [`committed`](https://github.com/crate-ci/committed) as we use [Conventional](https://www.conventionalcommits.org) commit styl +- [`typos`](https://github.com/crate-ci/typos) to check spelling + +Not everything can be checked automatically though. + +We request that the commit history get cleaned up. +We ask that commits are atomic, meaning they are complete and have a single responsibility. +PRs shoukd tell a cohesive story, with test and refactor commits that keep the +fix or feature commits simple and clear. + +Specifically, we would encouage +- File renames be isolated into their own commit +- Add tests in a commit before their feature or fix, showing the current behavior. + The diff for the feature/fix commit will then show how the behavior changed, + making it clearer to reviewrs and the community and showing people that the + test is verifying the expected state. + - e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520) + +Note that we are talking about ideals. +We understand having a clean history requires more advanced git skills; +feel free to ask us for help! +We might even suggest where it would work to be lax. +We also understand that editing some early commits may cause a lot of churn +with merge conflicts which can make it not worth editing all of the history. + +For code organization, we recommend +- Grouping `impl` blocks next to their type (or trait) +- Grouping private items after the `pub` item that uses them. + - The intent is to help people quickly find the "relevant" details, allowing them to "dig deeper" as needed. Or put another way, the `pub` items serve as a table-of-contents. + - The exact order is fuzzy; do what makes sense ## Releasing From eb4e999f1b679936ce1d11aa68b923066aff2ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= <60845989+jalil-salame@users.noreply.github.com> Date: Thu, 4 Jul 2024 19:06:12 +0200 Subject: [PATCH 092/100] Fix typos in CONTRIBUTING.md I found this through [mastodon][1] and found the typos jarring. [1]: https://hachyderm.io/@epage/112729287446906823 --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a6dd1cd..87d9134e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,14 +35,14 @@ As a heads up, we'll be running your PR through the following gauntlet: - `rustfmt` - `clippy` - `rustdoc` -- [`committed`](https://github.com/crate-ci/committed) as we use [Conventional](https://www.conventionalcommits.org) commit styl +- [`committed`](https://github.com/crate-ci/committed) as we use [Conventional](https://www.conventionalcommits.org) commit style - [`typos`](https://github.com/crate-ci/typos) to check spelling Not everything can be checked automatically though. -We request that the commit history get cleaned up. +We request that the commit history gets cleaned up. We ask that commits are atomic, meaning they are complete and have a single responsibility. -PRs shoukd tell a cohesive story, with test and refactor commits that keep the +PRs should tell a cohesive story, with test and refactor commits that keep the fix or feature commits simple and clear. Specifically, we would encouage From bdb06a11df6cf4d8b06848520f18609ab07c7b5e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 9 Jul 2024 11:06:45 -0500 Subject: [PATCH 093/100] chore(ci): Verify version requirements --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e064993..d49017e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: permissions: contents: none name: CI - needs: [test, msrv, lockfile, docs, rustfmt, clippy] + needs: [test, msrv, lockfile, docs, rustfmt, clippy, minimal-versions] runs-on: ubuntu-latest if: "always()" steps: @@ -65,6 +65,24 @@ jobs: - uses: taiki-e/install-action@cargo-hack - name: Default features run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets + minimal-versions: + name: Minimal versions + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install stable Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Install nightly Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + - name: Downgrade dependencies to minimal versions + run: cargo +nightly generate-lockfile -Z minimal-versions + - name: Compile with minimal versions + run: cargo +stable check --workspace --all-features --locked lockfile: runs-on: ubuntu-latest steps: From 87d9ae55c792a4f37b3f989250c1a3512df2926e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 25 Jul 2024 15:48:09 -0500 Subject: [PATCH 094/100] chore: Fix clippy::lint_groups_priority for 1.80 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 96cb2348..90d89f6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ include = [ ] [workspace.lints.rust] -rust_2018_idioms = "warn" +rust_2018_idioms = { level = "warn", priority = -1 } unreachable_pub = "warn" unsafe_op_in_unsafe_fn = "warn" unused_lifetimes = "warn" From 553258af51034bc84dc9f951201e7b8f2285b57e Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Thu, 25 Jul 2024 15:35:58 -0700 Subject: [PATCH 095/100] Have clippy warn about uninlined format arguments This makes clippy warn about `format!("{}", var)`, with a machine-applicable fix converting to `format!("{var}")`. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 90d89f6e..97c7ed79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,7 @@ string_lit_as_bytes = "warn" string_to_string = "warn" todo = "warn" trait_duplication_in_bounds = "warn" +uninlined_format_args = "warn" verbose_file_reads = "warn" wildcard_imports = "warn" zero_sized_map_values = "warn" From 7a28f01acfe8eb95f4e54127e1b66aa31cf2aeed Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 23 Aug 2024 19:02:02 -0500 Subject: [PATCH 096/100] docs(contrib): Fix tpo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87d9134e..b0318b82 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ We ask that commits are atomic, meaning they are complete and have a single resp PRs should tell a cohesive story, with test and refactor commits that keep the fix or feature commits simple and clear. -Specifically, we would encouage +Specifically, we would encourage - File renames be isolated into their own commit - Add tests in a commit before their feature or fix, showing the current behavior. The diff for the feature/fix commit will then show how the behavior changed, From 37cf1085bc6aa53e18a37f0aa97be51afa6e7f14 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 01:02:47 +0000 Subject: [PATCH 097/100] chore(deps): Update EmbarkStudios/cargo-deny-action action to v2 --- .github/workflows/audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 07c70eeb..a94be159 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -47,7 +47,7 @@ jobs: - bans licenses sources steps: - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: EmbarkStudios/cargo-deny-action@v2 with: command: check ${{ matrix.checks }} rust-version: stable From 6e193aa09aed80118df4e1317b8eed057bad6f0b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 26 Sep 2024 20:59:12 -0500 Subject: [PATCH 098/100] chore: Ensure pre-commit gets non-system Python This is needed with the ubuntu-24.04 images so that `setup-python` will install a version of Python that the pre-commit action can install into. See pre-commit/action#210 for more of an analysis of this. --- .github/workflows/pre-commit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1b000abf..7b55a3d9 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -24,4 +24,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: '3.x' - uses: pre-commit/action@v3.0.1 From 67ea82154dac3ebaae1394a9cd4bc4e14f759307 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 27 Sep 2024 10:27:59 -0500 Subject: [PATCH 099/100] style: Use inline format args --- src/renderer/display_list.rs | 13 +++++-------- tests/fixtures/main.rs | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/renderer/display_list.rs b/src/renderer/display_list.rs index fedf2689..1823e61a 100644 --- a/src/renderer/display_list.rs +++ b/src/renderer/display_list.rs @@ -198,7 +198,7 @@ impl<'a> DisplaySet<'a> { self.format_label(line_offset, &annotation.label, stylesheet, buffer) } else { let id = match &annotation.id { - Some(id) => format!("[{}]", id), + Some(id) => format!("[{id}]"), None => String::new(), }; buffer.append( @@ -290,12 +290,12 @@ impl<'a> DisplaySet<'a> { } => { let lineno_color = stylesheet.line_no(); if anonymized_line_numbers && lineno.is_some() { - let num = format!("{:>width$} |", ANONYMIZED_LINE_NUM, width = lineno_width); + let num = format!("{ANONYMIZED_LINE_NUM:>lineno_width$} |"); buffer.puts(line_offset, 0, &num, *lineno_color); } else { match lineno { Some(n) => { - let num = format!("{:>width$} |", n, width = lineno_width); + let num = format!("{n:>lineno_width$} |"); buffer.puts(line_offset, 0, &num, *lineno_color); } None => { @@ -645,7 +645,7 @@ impl<'a> DisplaySet<'a> { } else if formatted_len != 0 { formatted_len += 2; let id = match &annotation.annotation.id { - Some(id) => format!("[{}]", id), + Some(id) => format!("[{id}]"), None => String::new(), }; buffer.puts( @@ -1292,10 +1292,7 @@ fn format_body( None } }) { - panic!( - "SourceAnnotation range `{:?}` is beyond the end of buffer `{}`", - bigger, source_len - ) + panic!("SourceAnnotation range `{bigger:?}` is beyond the end of buffer `{source_len}`") } let mut body = vec![]; diff --git a/tests/fixtures/main.rs b/tests/fixtures/main.rs index 07c69d81..bf37e73d 100644 --- a/tests/fixtures/main.rs +++ b/tests/fixtures/main.rs @@ -22,7 +22,7 @@ fn setup(input_path: std::path::PathBuf) -> tryfn::Case { .to_str() .unwrap(); let file_name = input_path.file_name().unwrap().to_str().unwrap(); - let name = format!("{}/{}", parent, file_name); + let name = format!("{parent}/{file_name}"); let expected = Data::read_from(&input_path.with_extension("svg"), None); tryfn::Case { name, From 218d7ff4ad0540fd4152d88940e9ff8819783295 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 10 Oct 2024 16:19:10 -0500 Subject: [PATCH 100/100] chore(ci): Fix CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2964a8fe..1e1e88a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - uses: taiki-e/install-action@cargo-hack - name: Default features - run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets + run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --lib --bins minimal-versions: name: Minimal versions runs-on: ubuntu-latest @@ -170,7 +170,7 @@ jobs: - name: Install cargo-tarpaulin run: cargo install cargo-tarpaulin - name: Gather coverage - run: cargo tarpaulin --output-dir coverage --out lcov + run: cargo tarpaulin --output-dir coverage --out lcov --timeout 120 - name: Publish to Coveralls uses: coverallsapp/github-action@master with: