mirror of
https://github.com/clap-rs/clap
synced 2024-12-04 01:59:10 +00:00
chore: First step
This commit is contained in:
commit
e7b7555d15
23 changed files with 1019 additions and 0 deletions
5
.cargo/config
Normal file
5
.cargo/config
Normal file
|
@ -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"]
|
12
.clippy.toml
Normal file
12
.clippy.toml
Normal file
|
@ -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(..)`" },
|
||||
]
|
71
.github/renovate.json5
vendored
Normal file
71
.github/renovate.json5
vendored
Normal file
|
@ -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.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)",
|
||||
"(?<currentValue>\\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)",
|
||||
},
|
||||
],
|
||||
}
|
52
.github/settings.yml
vendored
Normal file
52
.github/settings.yml
vendored
Normal file
|
@ -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
|
49
.github/workflows/audit.yml
vendored
Normal file
49
.github/workflows/audit.yml
vendored
Normal file
|
@ -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
|
128
.github/workflows/ci.yml
vendored
Normal file
128
.github/workflows/ci.yml
vendored
Normal file
|
@ -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
|
24
.github/workflows/committed.yml
vendored
Normal file
24
.github/workflows/committed.yml
vendored
Normal file
|
@ -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
|
23
.github/workflows/pre-commit.yml
vendored
Normal file
23
.github/workflows/pre-commit.yml
vendored
Normal file
|
@ -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
|
88
.github/workflows/rust-next.yml
vendored
Normal file
88
.github/workflows/rust-next.yml
vendored
Normal file
|
@ -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
|
21
.github/workflows/spelling.yml
vendored
Normal file
21
.github/workflows/spelling.yml
vendored
Normal file
|
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
target
|
26
.pre-commit-config.yaml
Normal file
26
.pre-commit-config.yaml
Normal file
|
@ -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]
|
11
CHANGELOG.md
Normal file
11
CHANGELOG.md
Normal file
|
@ -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/).
|
||||
|
||||
<!-- next-header -->
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
<!-- next-url -->
|
||||
[Unreleased]: https://github.com/rust-cli/argfile/compare/v0.1.5...HEAD
|
70
CONTRIBUTING.md
Normal file
70
CONTRIBUTING.md
Normal file
|
@ -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 <level>`](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
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
@ -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"
|
38
Cargo.toml
Normal file
38
Cargo.toml
Normal file
|
@ -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="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
|
||||
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/ORG/PROJECT/compare/{{tag_name}}...HEAD", exactly=1},
|
||||
]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
[dependencies]
|
||||
|
||||
[dev-dependencies]
|
202
LICENSE-APACHE
Normal file
202
LICENSE-APACHE
Normal file
|
@ -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.
|
||||
|
19
LICENSE-MIT
Normal file
19
LICENSE-MIT
Normal file
|
@ -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.
|
26
README.md
Normal file
26
README.md
Normal file
|
@ -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
|
3
committed.toml
Normal file
3
committed.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
style="conventional"
|
||||
ignore_author_re="(dependabot|renovate)"
|
||||
merge_commit = false
|
135
deny.toml
Normal file
135
deny.toml
Normal file
|
@ -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 = []
|
6
release.toml
Normal file
6
release.toml
Normal file
|
@ -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"]
|
2
src/lib.rs
Normal file
2
src/lib.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![allow(non_snake_case)] // TODO: Delete me
|
Loading…
Reference in a new issue