From 3278d49444c33ece610de3fb5547bd885124dfe7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 1 Apr 2024 10:35:16 -0500 Subject: [PATCH 1/9] 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 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 8/9] 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 9/9] 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