Add editorconfig and precommit config

This commit is contained in:
Tomas Rezucha
2021-09-20 13:40:18 +02:00
parent 7f8fa26cd2
commit fc256798c0
2 changed files with 31 additions and 0 deletions
+25
View File
@@ -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
View File
@@ -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']