Skip to content

Commit

Permalink
Add shfmt for consistent formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Sep 29, 2023
1 parent f393db4 commit c9f4346
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true
[*]
indent_style = space
indent_size = 2
shell_variant = bash
binary_next_line = true
switch_case_indent = true
space_redirects = true
keep_padding = true
function_next_line = false
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: "Linting & Formatting"

on:
- push
- pull_request
Expand All @@ -6,7 +8,14 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ludeeus/action-shellcheck@master
- name: "Checkout"
uses: actions/checkout@v4

- name: "Lint check"
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x
- name: "Format check"
run: |
curl -sS https://webi.sh/shfmt | sh
shfmt -l -d .
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ brew "yq"
brew "coreutils"
brew "oath-toolkit"
brew "gnupg"
brew "shfmt"
cask "session-manager-plugin"

0 comments on commit c9f4346

Please sign in to comment.