Skip to content

Commit

Permalink
misc: Add pre-commit and editor config
Browse files Browse the repository at this point in the history
  • Loading branch information
tore-espressif committed Dec 10, 2021
1 parent b28f5d0 commit f3e3d60
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.md,*.rst}]
trim_trailing_whitespace = false

[{*.cmake,CMakeLists.txt}]
indent_style = space
indent_size = 4
max_line_length = 120

[{*.sh,*.yml,*.yaml}]
indent_style = space
indent_size = 2
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/igrr/astyle_py.git
rev: master
hooks:
- id: astyle_py
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper']

0 comments on commit f3e3d60

Please sign in to comment.