Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,7 @@ BasedOnStyle: Mozilla
UseTab: Always
IndentWidth: 4
TabWidth: 4

#From https://github.com/mozilla/gecko-dev/blob/master/.clang-format
# Prevent the loss of indentation with these macros
MacroBlockBegin: "^\
NS_INTERFACE_MAP_BEGIN|\
NS_INTERFACE_TABLE_HEAD|\
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION|\
NS_IMPL_CYCLE_COLLECTION_.*_BEGIN|\
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED|\
NS_INTERFACE_TABLE_BEGIN|\
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED|\
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED$"
MacroBlockEnd: "^\
NS_INTERFACE_MAP_END|\
NS_IMPL_CYCLE_COLLECTION_.*_END|\
NS_INTERFACE_TABLE_END|\
NS_INTERFACE_MAP_END_INHERITING|\
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END_INHERITED|\
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED$"

SortIncludes: false


BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: true
Expand Down
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ indent_style = space
[*.md]
trim_trailing_whitespace = false

[{CMakeLists.txt, *.cmake}]
indent_style = tab
indent_size = 4
[*.yml]
indent_style = space
18 changes: 17 additions & 1 deletion CMake/Helpers/StaticAnalysis.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Get sources
get_target_property(SOURCES Etterna SOURCES)
list(FILTER SOURCES EXCLUDE REGEX ".icns$")

# cppcheck
find_program(CPPCHECK_EXE "cppcheck")
if(NOT CPPCHECK_EXE)
message(STATUS "cppcheck not found. cppcheck target will not be created.")
else()
get_target_property(SOURCES Etterna SOURCES)
add_custom_target(cppcheck
COMMENT "Running cppcheck"
VERBATIM
Expand All @@ -28,3 +31,16 @@ else()
-checks='*'
${SOURCES})
endif()

# clang-format
find_program(CLANG_FORMAT "clang-format")
if(NOT CLANG_FORMAT)
message(STATUS "clang-format not found. clang-format target will not be created.")
else()
add_custom_target(format
COMMAND ${CLANG_FORMAT}
-i
--style=file
-verbose
${SOURCES})
endif()
15 changes: 0 additions & 15 deletions format.sh

This file was deleted.