Skip to content

Commit 189e842

Browse files
committed
Initial clang-format auto cleanup
1 parent aff5e8d commit 189e842

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+11631
-9291
lines changed

.clang-format

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
AccessModifierOffset: 0
2+
AlignEscapedNewlinesLeft: true
3+
AlignTrailingComments: false
4+
AllowAllParametersOfDeclarationOnNextLine: false
5+
AllowShortFunctionsOnASingleLine: false
6+
AllowShortIfStatementsOnASingleLine: true
7+
AllowShortLoopsOnASingleLine: false
8+
AlwaysBreakBeforeMultilineStrings: false
9+
AlwaysBreakTemplateDeclarations: false
10+
BinPackParameters: false
11+
BreakBeforeBinaryOperators: false
12+
BreakBeforeBraces: Allman
13+
BreakBeforeTernaryOperators: false
14+
BreakConstructorInitializersBeforeComma: false
15+
ColumnLimit: 100
16+
CommentPragmas: ''
17+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
18+
ConstructorInitializerIndentWidth: 0
19+
ContinuationIndentWidth: 0
20+
Cpp11BracedListStyle: false
21+
DerivePointerBinding: false
22+
IndentCaseLabels: false
23+
IndentFunctionDeclarationAfterType: false
24+
IndentWidth: 2
25+
Language: Cpp
26+
MaxEmptyLinesToKeep: 2
27+
NamespaceIndentation: All
28+
ObjCSpaceAfterProperty: true
29+
ObjCSpaceBeforeProtocolList: true
30+
PenaltyBreakBeforeFirstCallParameter: 100
31+
PenaltyBreakComment: 100
32+
PenaltyBreakFirstLessLess: 0
33+
PenaltyBreakString: 100
34+
PenaltyExcessCharacter: 1
35+
PenaltyReturnTypeOnItsOwnLine: 20
36+
PointerBindsToType: true
37+
SpaceBeforeAssignmentOperators: true
38+
SpaceBeforeParens: ControlStatements
39+
SpaceInEmptyParentheses: false
40+
SpacesBeforeTrailingComments: 1
41+
SpacesInAngles: false
42+
SpacesInCStyleCastParentheses: false
43+
SpacesInContainerLiterals: false
44+
SpacesInParentheses: false
45+
Standard: Cpp11
46+
TabWidth: 2
47+
UseTab: Never

contrib/plugin.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#include <cstring>
22
#include <iostream>
3-
#include <stdint.h>
43
#include <sass.h>
4+
#include <stdint.h>
55

66
// gcc: g++ -shared plugin.cpp -o plugin.so -fPIC -Llib -lsass
77
// mingw: g++ -shared plugin.cpp -o plugin.dll -Llib -lsass
88

9-
extern "C" const char* ADDCALL libsass_get_version() {
9+
extern "C" const char* ADDCALL libsass_get_version()
10+
{
1011
return libsass_version();
1112
}
1213

@@ -24,8 +25,7 @@ union Sass_Value* custom_function(const union Sass_Value* s_args, Sass_Function_
2425
extern "C" Sass_Function_List ADDCALL libsass_load_functions()
2526
{
2627
// allocate a custom function caller
27-
Sass_Function_Entry c_func =
28-
sass_make_function("foo()", custom_function, (void*)42);
28+
Sass_Function_Entry c_func = sass_make_function("foo()", custom_function, (void*)42);
2929
// create list of all custom functions
3030
Sass_Function_List fn_list = sass_make_function_list(1);
3131
// put the only function in this plugin to the list
@@ -49,8 +49,7 @@ Sass_Import_List custom_importer(const char* cur_path, Sass_Importer_Entry cb, s
4949
extern "C" Sass_Importer_List ADDCALL libsass_load_importers()
5050
{
5151
// allocate a custom function caller
52-
Sass_Importer_Entry c_imp =
53-
sass_make_importer(custom_importer, - 99, (void*)42);
52+
Sass_Importer_Entry c_imp = sass_make_importer(custom_importer, -99, (void*)42);
5453
// create list of all custom functions
5554
Sass_Importer_List imp_list = sass_make_importer_list(1);
5655
// put the only function in this plugin to the list

0 commit comments

Comments
 (0)