Skip to content

Commit

Permalink
Enable coding style check action that uses .editorconfig definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Sep 24, 2024
1 parent 002f9ab commit 214cb67
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
28 changes: 5 additions & 23 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,23 @@
# top-most EditorConfig file
root = true

# Custom Armbian formatting for bash sources and configuration
[*]
charset = utf-8
end_of_line = lf

[*.{sh,conf}]
indent_style = tab
indent_size = 8
trim_trailing_whitespace = true
insert_final_newline = true

[*.patch]
trim_trailing_whitespace = false

[*.md]
indent_style = space
indent_size = 4
insert_final_newline = false

[*.json]
indent_style = space
indent_size = 4

# Custom Armbian formatting for bash sources and configuration
[*.{sh,inc,conf,eos,wip,tvb,csc}]
indent_size = 4
indent_size = 8
shell_variant = bash
binary_next_line = false
switch_case_indent = true
space_redirects = true
keep_padding = false
function_next_line = false

[*.{yaml,yml}]
[*.json]
indent_style = space
indent_size = 2
insert_final_newline = false

[*.py]
indent_size = 4
max_line_length = 150
18 changes: 18 additions & 0 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Coding style check

on:
pull_request:
types: [opened, reopened, edited, synchronize, review_requested]

concurrency:
group: coding-style-${{github.event.pull_request.number}}
cancel-in-progress: true

jobs:
editorconfig:
name: "Coding style check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker

0 comments on commit 214cb67

Please sign in to comment.