Skip to content

Commit

Permalink
style(format): add .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Sep 26, 2023
1 parent 1be2828 commit 58bbc0b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# configuration for https://editorconfig.org

root = true

[*.rs]
indent_style = space
indent_size = 4

[args.rs]
indent_size = unset

[*.yml]
indent_style = space
indent_size = 2
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ jobs:
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2

- name: Check formatting
- name: Check code formatting
run: cargo fmt --all -- --check

- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main

- name: Check file formatting
run: editorconfig-checker

- name: Check lints
run: cargo clippy -- -D warnings

Expand Down
6 changes: 3 additions & 3 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pub const BANNER: &str = r#"
version,
author = clap::crate_authors!("\n"),
about,
rename_all_env = "screaming-snake",
before_help = BANNER,
help_template = "\
rename_all_env = "screaming-snake",
before_help = BANNER,
help_template = "\
{before-help}-=[ {name} {version} ]=-\n
{about-with-newline}Written by {author-with-newline}
{usage-heading}
Expand Down

0 comments on commit 58bbc0b

Please sign in to comment.