Skip to content

Commit

Permalink
cpplint: linted all source code
Browse files Browse the repository at this point in the history
cpplint: extending formatting to add linting
cpplint: fix format script to use cpp files
cpplint: adding fallback on LLVM for formatting
* add regex for categories on headers
cpplint: add cpplint.py and lint all cpp files.
* fallback to Google coding style.
* add cpp lint as part of formatting.

cpplint: add cpplint.py and format all files
misc: add histogram utils separate compiler unit
build:cmake: enable concepts for gcc
  • Loading branch information
emaxerrno committed Feb 2, 2017
1 parent 1227a89 commit 73db33c
Show file tree
Hide file tree
Showing 98 changed files with 7,296 additions and 825 deletions.
18 changes: 14 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
AccessModifierOffset: 0
BasedOnStyle: Google
AccessModifierOffset: -1
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
Expand Down Expand Up @@ -29,13 +32,20 @@ ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceBeforeParens: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
Standard: Cpp11
Standard: Auto
TabWidth: 2
UseTab: Never
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(core|gtest|isl|json)/)'
Priority: 3
- Regex: '.\*'
Priority: 1
1 change: 1 addition & 0 deletions CMake/base_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# "-fuse-ld=gold"
set(BASE_FLAGS
"-fPIC"
"-fconcepts"
"-Wall"
"-Werror"
"-Wextra"
Expand Down
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ include(CMake/xxhash.cmake)
message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
enable_testing()
set(CXX_FLAG_LIST
${SEASTAR_CFLAGS}
${BASE_FLAGS}
${SEASTAR_CFLAGS}
)
join("${CXX_FLAG_LIST}" " " CMAKE_CXX_FLAGS)
add_library(smftracing STATIC
${PROJECT_SOURCE_DIR}/src/histogram.cc
${PROJECT_SOURCE_DIR}/src/histogram_seastar_utils.cc
)
target_link_libraries(smftracing
hdr_histogram_static
${SEASTAR_LDFLAGS}
)
target_link_libraries(smftracing hdr_histogram_static)
add_library(smfrpc STATIC ${RPC_LIB_SOURCES})
target_link_libraries(smfrpc
${SEASTAR_LDFLAGS}
Expand Down
16 changes: 16 additions & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Do not continue looking up the directory hierarchy
# for more config files.
set noparent
linelength=80
root=src
# already protected by the build - won't compile
filter=-build/header_guard
filter=-build/c++11
filter=-build/include_order
filter=-runtime/printf
filter=-build/include
filter=-readability/inheritance
# enable c++14 stuff
filter=+build/c++14
filter=+build/include_alpha
filter=+readability/casting
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ These are the core pattern directives
* [Making lockless synchronization fast: performance implications of memory reclamation1](http://doi.ieeecomputersociety.org/10.1109/IPDPS.2006.163)
* [All files are not created equal: On the complexity of crafting crash-consistent applications](http://research.cs.wisc.edu/wind/Publications/alice-osdi14.pdf)
* [File consistency - danluu's blog post](http://danluu.com/file-consistency/)
* [Kafka Exactly Once](https://docs.google.com/document/d/11Jqy_GjUGtdXJK94XGsEIK7CP1SnQGdp2eF0wSw9ra8/edit)

Yours Truly,
* [@emaxerrno](https://twitter.com/emaxerrno)
Expand Down
Loading

0 comments on commit 73db33c

Please sign in to comment.