Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adopt _rust template #585

Merged
merged 126 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
e7b7555
chore: First step
epage Mar 29, 2023
d6b4446
docs: Set changelog base
epage Mar 29, 2023
afeff23
chore(ci): Quote strings in yaml
epage Mar 29, 2023
2768727
chore: Don't set rustflags by default
epage Mar 29, 2023
0838840
chore: Update release process
epage Mar 29, 2023
afd6a45
chore: Use workspace inheritance
epage Mar 29, 2023
037f379
chore(ci): Remove rustfmt/clippy next jobs
epage Mar 29, 2023
d1dd4ae
chore(ci): Expand approved licenses
epage Mar 29, 2023
6c8df60
chore: Include Cargo.lock
epage Mar 30, 2023
fbaab42
chore(deps): update msrv to v1.65.0
renovate[bot] Apr 1, 2023
29b981c
Merge pull request #1 from epage/renovate/rust-1.x
epage Apr 1, 2023
614b0a2
docs(contrib): Remove reference to travis
epage Mar 29, 2023
f7b990b
fix(ci): Fix Renovate regexes
epage Apr 17, 2023
4163ad7
style(ci): Match auto-generated style
epage Apr 17, 2023
563de12
chore(ci): Update stabilidyDays to new syntax
epage Apr 17, 2023
2c4a7f5
chore(ci): Delay Renovate PRs until ready
epage Apr 17, 2023
62401b8
chore(ci): Lower the MSRV churn for template
epage Apr 17, 2023
d99db2e
style(ci): Match auto-generated style
epage Apr 17, 2023
afaba35
chore(ci): Use new minimumReleaseAge field
epage Apr 17, 2023
60a8ec8
chore(ci): Ban for_each
epage Apr 18, 2023
96297f0
chore(ci): Clarify why map_or is banned
epage Apr 18, 2023
716170e
chore(gh): Ban rebase merges
epage Apr 18, 2023
80d4cdd
chore: Remove clippy lint past MSRV (needs 1.67)
epage May 18, 2023
2b6bb28
chore(ci): Catch clippy config failures
epage May 18, 2023
4d44cd7
chore: Update precommit hooks
epage May 19, 2023
d6075a4
chore: Expand update window so more likely to be hit
epage Aug 2, 2023
67eb1d9
chore(ci): Ensure lockfile isn't stale
epage Aug 7, 2023
ba76b8b
chore(ci): Ensure latest deps are good
epage Aug 11, 2023
5286387
chore: Update pre-commit hooks
epage Aug 11, 2023
efe14d6
chore(renovate): Make style consistent
epage Aug 22, 2023
a6ecf92
chore(renovate): Update config
epage Aug 22, 2023
c8624f0
chore(renovate): Update MSRV on release
epage Aug 23, 2023
44604fc
chore(renovate): Try to fix schedule
epage Aug 23, 2023
ff82d69
chore(ci): Don't fail on wildcards
epage Aug 23, 2023
5749aa0
chore: Approve ISC
epage Sep 7, 2023
4173c8f
chore(ci): Don't set patch for MSRV
epage Sep 20, 2023
86c29de
chore(ci): Updaet Renovate schema
epage Sep 26, 2023
ac51f09
chore(ci): Normalize json5 syntax
epage Sep 26, 2023
3057980
README.md 'Crates Status' icon link now uses the Markdown placeholder…
peter-lyons-kehl Sep 30, 2023
cad9b47
README.md list indentation and no bare URLs, as per Markdown Lint VS …
peter-lyons-kehl Sep 30, 2023
6d3f888
chore(deps): update actions/checkout action to v4
renovate[bot] Oct 1, 2023
f97fa94
Merge pull request #8 from epage/renovate/actions-checkout-4.x
epage Oct 1, 2023
8499939
Merge pull request #6 from peter-kehl/readme_use_crates_io_link_place…
epage Oct 2, 2023
74beef5
Merge pull request #7 from peter-kehl/readme_pass_markdown_lint
epage Oct 2, 2023
5e3b324
chore(ci): Ensure MSRV is quoted
epage Oct 5, 2023
5ebe30b
chore(ci): Update pre-commit hooks
epage Oct 26, 2023
598c624
chore(config): migrate config .github/renovate.json5
renovate[bot] Dec 3, 2023
8c836ea
Merge pull request #10 from epage/renovate/migrate-config
epage Dec 4, 2023
69fa026
chore(deps): update actions/setup-python action to v5
renovate[bot] Jan 1, 2024
82c9aa7
chore(deps): update github/codeql-action action to v3
renovate[bot] Jan 1, 2024
c7805bc
Merge pull request #12 from epage/renovate/actions-setup-python-5.x
epage Jan 2, 2024
739d2cf
Merge pull request #13 from epage/renovate/github-codeql-action-3.x
epage Jan 2, 2024
a4c0626
chore: Make renovate commits to match
epage Jan 2, 2024
61250a3
chore(ci): Optimize CI runs
epage Jan 3, 2024
e819db4
chore(ci): Cancel prior CI runs
epage Jan 18, 2024
0b02906
chore(ci): Be explicit in renovate updates
epage Jan 24, 2024
131de55
chore(ci): Add m1 runners
epage Jan 31, 2024
9a5af5c
chore(ci): Only check intel mac on schedule
epage Feb 8, 2024
da56001
chore(ci): Gather coverage
epage Feb 8, 2024
1313256
chore(ci): Use latest for coverage
epage Feb 8, 2024
51a98a2
chore(ci): Defer to package.rust-version for clippy
epage Feb 15, 2024
4db293d
chore(ci): Only verify MSRV for published packages
epage Feb 15, 2024
779496b
chore(ci): Run the latest clippy
epage Feb 15, 2024
c977df5
chore(ci): Prevent cargo-hack from blowing away our lockfile
epage Feb 21, 2024
7846c51
chore(deps): Update pre-commit/action action to v3.0.1
renovate[bot] Mar 1, 2024
2d5ff55
Merge pull request #16 from epage/renovate/pre-commit-action-3.x
epage Mar 1, 2024
3d5ead8
chore(ci): Configure standard lints
epage Mar 21, 2024
ace6e07
chore(ci): Don't update stable and MSRV together
epage Mar 21, 2024
8ec86ab
chore: Normalize clippy lint names
epage Mar 25, 2024
8e647d9
chore: Encourage use of workspace.dependencies
epage Mar 28, 2024
126eb3d
chore: Encourage a single test binary
epage Mar 28, 2024
c8b190b
chore(ci): Use latest SARIF
epage Mar 28, 2024
9b1b566
chore(ci): Fix all rust-version-specific checks to stable
epage Mar 28, 2024
92d486c
chore(ci): Speed up lockfile check
epage Mar 28, 2024
9258d9a
chore(ci): More exhaustively check features
epage Mar 28, 2024
2714cca
chore(ci): Don't check for unused crates
epage Mar 28, 2024
314eef7
chore: Dont check must_use
epage Mar 28, 2024
6a9d2bf
chore: Don't warn on unsafe
epage Mar 28, 2024
8d4b1b6
chore: Remove clippy::tests_outside_test_module
epage Mar 28, 2024
99e034b
chore: Move print lints to lib.rs
epage Mar 28, 2024
a516bda
chore: Drop workspace.dependencies
epage Apr 1, 2024
ebc70d0
chore: Only check missing_docs in lib
epage Apr 1, 2024
3278d49
chore: Allow print in tests
epage Apr 1, 2024
d634de6
chore(ci): Ensure CI job always runs
epage Apr 1, 2024
dc3e937
Merge pull request #19 from epage/t
epage Apr 1, 2024
2570b58
chore(ci): Skip branch protections
epage Apr 1, 2024
afd2755
chore(ci): Don't block on Lint Commits
epage Apr 1, 2024
14225df
chore(ci): Auto-merge linter version updates
epage Apr 17, 2024
be30b1b
chore(ci): Try again with not auto-updating MSRV
epage Apr 26, 2024
a01f25d
chore(ci): Reduce noisy lints
epage Apr 26, 2024
82cf9a6
chore(ci): Reduce noisy lints
epage Apr 26, 2024
181a2cf
chore(ci): Allow prelude wildcard imports
epage Apr 26, 2024
51de731
chore(ci): Lint clippy::items_after_statements seems too strict
epage Apr 26, 2024
78741e5
chore: Remove lints that lead to bad code
epage May 28, 2024
44916f6
chore: Update deny config
epage May 29, 2024
ce6badc
chore: Fix typo
epage Jun 3, 2024
1353a95
chore: Encourage use of repository
epage Jun 4, 2024
7039c66
chore: Encourage cloneable repositories
epage Jun 4, 2024
2a274e1
chore(ci): Auto-update Mac now that latest uses m1
epage Jun 21, 2024
0547ff2
docs(contrib): Clarify our policies
epage Jul 4, 2024
eb4e999
Fix typos in CONTRIBUTING.md
jalil-salame Jul 4, 2024
045de93
Merge pull request #21 from jalil-salame/patch-1
epage Jul 4, 2024
bdb06a1
chore(ci): Verify version requirements
epage Jul 9, 2024
87d9ae5
chore: Fix clippy::lint_groups_priority for 1.80
epage Jul 25, 2024
553258a
Have clippy warn about uninlined format arguments
joshtriplett Jul 25, 2024
266ead1
Merge pull request #22 from joshtriplett/clippy-uninlined-format-args
epage Jul 26, 2024
7a28f01
docs(contrib): Fix tpo
epage Aug 24, 2024
37cf108
chore(deps): Update EmbarkStudios/cargo-deny-action action to v2
renovate[bot] Sep 1, 2024
68d2027
Merge pull request #23 from epage/renovate/embarkstudios-cargo-deny-a…
epage Sep 3, 2024
6e193aa
chore: Ensure pre-commit gets non-system Python
epage Sep 27, 2024
35fcbb7
Merge pull request #24 from epage/pre-commit
epage Sep 27, 2024
8db276f
docs: Cross-reference source code view
epage Oct 21, 2024
e121dd6
chore(ci): Fix STABLE updates
epage Oct 21, 2024
d4e5fc8
chore: Update from '_rust/main' template
epage Oct 22, 2024
2ac9625
test(legacy): Remove invalid hjson feature
epage Oct 22, 2024
2ccc4f2
style: Resolve dead_code warnings
epage Oct 22, 2024
d66a433
style: Make clippy happy
epage Oct 22, 2024
1e01d49
style: Enable template lints
epage Oct 22, 2024
6504b61
docs: Fix typos
epage Oct 22, 2024
31c7009
chore(ci): Skip invalid format checks
epage Oct 22, 2024
ac9fb01
tests: Compile with no features
epage Oct 22, 2024
6340f50
style: Make rustdoc happy
epage Oct 22, 2024
cfc9034
chore(ci): Update typos
epage Oct 22, 2024
02f59dd
test: Isolate unix-only test result
epage Oct 23, 2024
42db924
chore(ci): Hack around bad minimal versions
epage Oct 23, 2024
3b21c64
chore(ci): Avoid disk space issues from cargo-hack
epage Oct 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
msrv = "1.46"
allow-print-in-tests = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
allow-dbg-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" },
# { 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" },
# ]
10 changes: 0 additions & 10 deletions .github/dependabot.yml

This file was deleted.

109 changes: 109 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
schedule: [
'before 5am on the first day of the month',
],
semanticCommits: 'enabled',
commitMessageLowerCase: 'never',
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: [
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?STABLE',
],
depNameTemplate: 'STABLE',
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
{
commitMessageTopic: 'Rust Stable',
matchManagers: [
'custom.regex',
],
matchDepNames: [
'STABLE',
],
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
schedule: [
'* * * * *',
],
automerge: true,
},
// 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',
'patch',
],
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',
'patch',
],
automerge: true,
groupName: 'compatible (dev)',
},
],
}
59 changes: 59 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
description: "⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications). "
homepage: "https://docs.rs/config/latest/config/"
topics: ""
has_issues: true
has_projects: false
has_wiki: false
has_downloads: true
default_branch: main

# Preference: people do clean commits
allow_merge_commit: 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

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!"

# 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
53 changes: 53 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

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@v4
- 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@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}
rust-version: stable
Loading
Loading