-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[stable] | ||
sparse-registry = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
|
||
|
||
- name: Dependency caching | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: crates | ||
|
||
- name: Run tests | ||
run: "cargo test --all --verbose" | ||
|
||
- name: Run clippy | ||
run: "cargo clippy --all -- -D warnings" | ||
|
||
- name: Check formatting | ||
run: "cargo fmt --all -- --check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
/target | ||
|
||
# Editors | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: rust-linting | ||
name: Rust linting | ||
description: Run cargo fmt on files included in the commit. | ||
entry: cargo fmt --all -- | ||
pass_filenames: true | ||
types: [file, rust] | ||
language: system | ||
- id: rust-clippy | ||
name: Rust clippy | ||
description: Run cargo clippy on files included in the commit. | ||
entry: cargo clippy --all-targets --all-features -- -Dclippy::all | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//! Entry point of Bracketlint. | ||
fn main() { | ||
|
||
} | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[toolchain] | ||
channel = "nightly-2024-07-02" | ||
components = ["rustfmt", "clippy"] | ||
profile = "minimal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use_small_heuristics = "Max" | ||
format_code_in_doc_comments = true | ||
wrap_comments = true | ||
imports_granularity = "Crate" | ||
use_field_init_shorthand = true | ||
group_imports = "StdExternalCrate" |