Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable coding style check action that uses .editorconfig definitions #104

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading