Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
72 changes: 36 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main
- release/**
schedule:
- cron: '0 3 * * 4'
- cron: "0 3 * * 4"

jobs:
## Run all default oriented feature sets across all platforms.
Expand All @@ -22,49 +22,49 @@ jobs:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: cargo test --all --all-targets --all-features
run: cargo test --all --all-targets --all-features
- name: cargo test --all --all-targets --all-features
run: cargo test --all --all-targets --all-features

## Execute the clippy checks
cleanliness:
name: cleanliness
runs-on: ubuntu-latest
needs: platform-matrix
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1

# not using the cargo cache here, since this differs significantly
- name: cargo-all cache
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-all
${{ runner.os }}-cargo
# not using the cargo cache here, since this differs significantly
- name: cargo-all cache
uses: actions/cache@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-all-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-all
${{ runner.os }}-cargo

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
# Clippy
- name: cargo clippy
run: cargo clippy --lib --examples --tests --bins --all-features -- -D warnings
# Rustfmt
- name: cargo fmt
run: cargo fmt -- --check
# Audit
- name: cargo audit
run: cargo install cargo-audit && cargo audit --deny warnings
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true

# Clippy
- name: cargo clippy
run: cargo clippy --lib --examples --tests --bins --all-features -- -D warnings
# Rustfmt
- name: cargo fmt
run: cargo fmt -- --check
# Audit
- name: cargo audit
run: cargo install cargo-audit && cargo audit --deny warnings
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,18 @@ heck = "0.5"
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"

[lints.rust]
missing_copy_implementations = "warn"
missing_docs = "warn"
non_snake_case = "warn"
non_upper_case_globals = "warn"
rust_2018_idioms = "warn"
unreachable_pub = "warn"

[lints.clippy]
default_trait_access = "warn"
dbg_macro = "warn"
print_stdout = "warn"
unimplemented = "warn"
use_self = "warn"
14 changes: 0 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@
//! assert_eq!(many.into_three().unwrap(), (true, 1_u32, 2_i64));
//! ```

#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]

use heck::ToSnakeCase;
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
Expand Down
14 changes: 1 addition & 13 deletions tests/basic.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Basic unit tests for enum_as_inner crate.

use enum_as_inner::EnumAsInner;

Expand Down
14 changes: 1 addition & 13 deletions tests/generics.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Generic unit tests for enum_as_inner crate.

use enum_as_inner::EnumAsInner;

Expand Down
14 changes: 1 addition & 13 deletions tests/named.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Named unit tests for enum_as_inner crate.

use enum_as_inner::EnumAsInner;

Expand Down
14 changes: 1 addition & 13 deletions tests/snake_case.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Snake Case unit tests for enum_as_inner crate

use enum_as_inner::EnumAsInner;

Expand Down
14 changes: 1 addition & 13 deletions tests/unit.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Unit tests for enum_as_inner crate.

use enum_as_inner::EnumAsInner;

Expand Down
14 changes: 1 addition & 13 deletions tests/unnamed.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
#![warn(
clippy::default_trait_access,
clippy::dbg_macro,
clippy::print_stdout,
clippy::unimplemented,
clippy::use_self,
missing_copy_implementations,
missing_docs,
non_snake_case,
non_upper_case_globals,
rust_2018_idioms,
unreachable_pub
)]
//! Unnamed unit tests for the enum_as_inner crate.

use enum_as_inner::EnumAsInner;

Expand Down
Loading