Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
de6bc46d
authored
Oct 10, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add uncrustify config for whitespace stuff
parent
99a0c7ba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
8 deletions
style.cfg
style.md
style.cfg
0 → 100644
View file @
de6bc46d
#
# Allman style
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
input_tab_size = 4 # original tab size
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
# brace settings
nl_assign_brace = add # "= {" vs "= \n {"
nl_enum_brace = add # "enum {" vs "enum \n {"
nl_union_brace = add # "union {" vs "union \n {"
nl_struct_brace = add # "struct {" vs "struct \n {"
nl_do_brace = add # "do {" vs "do \n {"
nl_if_brace = add # "if () {" vs "if () \n {"
nl_for_brace = add # "for () {" vs "for () \n {"
nl_else_brace = add # "else {" vs "else \n {"
nl_while_brace = add # "while () {" vs "while () \n {"
nl_switch_brace = add # "switch () {" vs "switch () \n {"
nl_fcall_brace = add # "foo() {" vs "foo()\n{"
nl_fdef_brace = add # "int foo() {" vs "int foo()\n{"
nl_brace_while = remove
nl_brace_else = add
# Spacing settings
sp_func_def_paren = remove # "int foo (){" vs "int foo(){"
sp_func_call_paren = remove # "foo (" vs "foo("
sp_func_proto_paren = remove # "int foo ();" vs "int foo();"
sp_return_paren = add # "return (1);" vs "return(1);"
sp_sizeof_paren = remove # "sizeof (int)" vs "sizeof(int)"
sp_before_sparen = force # "if (" vs "if("
# Should be obvious
sp_assign = force
sp_arith = force
sp_bool = force
sp_compare = force
sp_after_comma = force
\ No newline at end of file
style.md
View file @
de6bc46d
Style Guidelines
----------------
Four character indentation, using spaces. Curly braces are on new
line. Spaces between operators and terms, but not next to delimiters.
Example
```
C
for(i = 0; i < 1024; i++) {
do_stuff
}
For all things regarding whitespace, run code through uncrustify using
```
shell
uncrustify
-c
style.cfg
-f
<source_file>
```
and refer to style.cfg for specifications.
Naming Conventions
==================
Use lowercase underscore (snake_case) for both function names and variable names.
For preprocessor constants defines, use all uppercase letters, with
underscores between words.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment