This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add quick-check with rustfmt (#615)
* ci: add quick-check with clippy and rustfmt * chore: rustfmt round * chore: set the same rustfmt config than substrate * chore: fix formatting * cI: remove clippy * ci: switch to nightly for the checks * ci: fix toolchains and naming * ci: Limit the check to formatting * chore: fix formatting * Update .rustfmt.toml * Update .rustfmt.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
- Loading branch information
Showing
98 changed files
with
1,245 additions
and
1,873 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,40 @@ | ||
name: Quick check Formatting | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
quick_check: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Rust nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
components: clippy, rustfmt | ||
|
||
- name: Cache Dependencies & Build Outputs | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --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,2 +1,23 @@ | ||
hard_tabs=true | ||
merge_imports=true | ||
# Basic | ||
hard_tabs = true | ||
max_width = 100 | ||
use_small_heuristics = "Max" | ||
|
||
# Imports | ||
imports_granularity = "Crate" | ||
reorder_imports = true | ||
|
||
# Consistency | ||
newline_style = "Unix" | ||
|
||
# Misc | ||
binop_separator = "Back" | ||
chain_width = 80 | ||
match_arm_blocks = false | ||
match_arm_leading_pipes = "Preserve" | ||
match_block_trailing_comma = true | ||
reorder_impl_items = false | ||
spaces_around_ranges = false | ||
trailing_comma = "Vertical" | ||
trailing_semicolon = false | ||
use_field_init_shorthand = 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
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
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
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
Oops, something went wrong.