Permalink
Browse files

Implement config for clang-format and editors

This creates a config file for the clang-format tool. It also establishes
a .editorconfig file to help establish the proper settings for editing
code in this project.

First step to resolving #125
  • Loading branch information...
krader1961 authored and siteshwar committed Nov 22, 2017
1 parent 265f4ad commit 77c5037cd88d3a39fbca4844b1f44654791c1a3c
Showing with 35 additions and 1 deletion.
  1. +22 −0 .clang-format
  2. +13 −0 .editorconfig
  3. +0 −1 .travis.yml
View
@@ -0,0 +1,22 @@
# Use the Google style with these modifications and a couple of others:
#
# 1) Lines can be up to 100 chars long rather than 80.
# 2) Use a four space indent rather than two spaces.
#
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 100
IndentWidth: 4
# The following directives override defaults established above.
# We don't want OCLint pragmas to be reformatted.
CommentPragmas: '^!OCLINT'
# Allow slightly overlong lines.
PenaltyExcessCharacter: 10
# Don't try to infer the most common alignment of `&` and `*` by analyzing the
# source file. Use right alignment; i.e., bind to the symbol not the type.
DerivePointerAlignment: false
PointerAlignment: Right
View
@@ -0,0 +1,13 @@
root = true
[*]
indent_size = 4
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
[{Makefile,*.in}]
indent_style = tab
View
@@ -15,7 +15,6 @@ before_install:
- docker pull ${OS_TYPE}
script:
- find \( -name \*.c -o -name \*.h \) -exec sh -c '! grep --color "^[[:space:]]*//" $@' find {} \+ && echo No line comments found...
- echo > build.sh "set -e;
export CFLAGS='-fno-strict-aliasing -Wno-unknown-pragmas -Wno-missing-braces -Wno-unused-result -Wno-return-type -Wno-int-to-pointer-cast -Wno-parentheses -Wno-unused -Wno-unused-but-set-variable -Wno-cpp -Wno-char-subscripts';
cd /source;

0 comments on commit 77c5037

Please sign in to comment.