Skip to content

Commit

Permalink
Merge pull request #187 from epage/template
Browse files Browse the repository at this point in the history
style: Restore prelude wildcard
  • Loading branch information
epage authored Apr 26, 2024
2 parents ed1a598 + b53bf3a commit d2d2b73
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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
Expand Down
34 changes: 1 addition & 33 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
],
depNameTemplate: 'MSRV',
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
{
customType: 'regex',
fileMatch: [
Expand All @@ -45,21 +27,6 @@
},
],
packageRules: [
{
commitMessageTopic: 'MSRV',
matchManagers: [
'custom.regex',
],
matchPackageNames: [
'MSRV',
],
minimumReleaseAge: '252 days', // 6 releases * 6 weeks per release * 7 days per week
internalChecksFilter: 'strict',
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
schedule: [
'* * * * *',
],
},
{
commitMessageTopic: 'Rust Stable',
matchManagers: [
Expand All @@ -72,6 +39,7 @@
schedule: [
'* * * * *',
],
automerge: true,
},
// Goals:
// - Keep version reqs low, ignoring compatible normal/build dependencies
Expand Down
26 changes: 15 additions & 11 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ labels:
color: '#02E10C'
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", "Spell Check with Typos"]
# enforce_admins: false
# restrictions: null
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,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"
Expand Down Expand Up @@ -86,7 +83,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"
1 change: 0 additions & 1 deletion crates/anstream/examples/dump-stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ enum Layer {

impl Args {
fn parse() -> Result<Self, lexopt::Error> {
#[allow(clippy::wildcard_imports)] // false positive
use lexopt::prelude::*;

let mut res = Args::default();
Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-wincon/examples/dump-wincon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ enum Layer {

impl Args {
fn parse() -> Result<Self, lexopt::Error> {
use lexopt::prelude::{Long, ValueExt};
use lexopt::prelude::*;

let mut res = Args::default();

Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle-wincon/examples/set-wincon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Args {

impl Args {
fn parse() -> Result<Self, lexopt::Error> {
use lexopt::prelude::{Long, ValueExt};
use lexopt::prelude::*;

let mut res = Args::default();

Expand Down
2 changes: 1 addition & 1 deletion crates/anstyle/examples/dump-style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum Layer {

impl Args {
fn parse() -> Result<Self, lexopt::Error> {
use lexopt::prelude::{Long, ValueExt};
use lexopt::prelude::*;

let mut res = Args::default();

Expand Down

0 comments on commit d2d2b73

Please sign in to comment.