Skip to content

Commit b1b04a3

Browse files
committed
chore: format using new clang-format
1 parent b452e57 commit b1b04a3

19 files changed

+1700
-1796
lines changed

.clang-format

+3-95
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,5 @@
1-
AccessModifierOffset: -2
2-
AlignAfterOpenBracket: DontAlign
3-
AlignConsecutiveAssignments: false
4-
AlignConsecutiveDeclarations: false
5-
AlignEscapedNewlines: Left
6-
AlignOperands: true
7-
AlignTrailingComments: false
8-
AllowAllParametersOfDeclarationOnNextLine: false
9-
AllowShortBlocksOnASingleLine: true
10-
AllowShortCaseLabelsOnASingleLine: false
11-
AllowShortFunctionsOnASingleLine: All
12-
AllowShortIfStatementsOnASingleLine: true
13-
AllowShortLoopsOnASingleLine: true
14-
AlwaysBreakAfterDefinitionReturnType: None
15-
AlwaysBreakAfterReturnType: None
16-
AlwaysBreakBeforeMultilineStrings: true
17-
AlwaysBreakTemplateDeclarations: false
18-
BinPackArguments: false
19-
BinPackParameters: false
20-
BraceWrapping:
21-
AfterClass: false
22-
AfterControlStatement: false
23-
AfterEnum: false
24-
AfterFunction: false
25-
AfterNamespace: false
26-
AfterObjCDeclaration: false
27-
AfterStruct: false
28-
AfterUnion: false
29-
BeforeCatch: false
30-
BeforeElse: false
31-
IndentBraces: false
32-
SplitEmptyFunction: false
33-
SplitEmptyNamespace: true
34-
SplitEmptyRecord: true
35-
BreakAfterJavaFieldAnnotations: true
36-
BreakBeforeBinaryOperators: NonAssignment
37-
BreakBeforeBraces: Custom
38-
BreakBeforeInheritanceComma: true
39-
BreakBeforeTernaryOperators: true
40-
BreakConstructorInitializers: BeforeColon
41-
BreakConstructorInitializersBeforeComma: false
42-
BreakStringLiterals: true
43-
ColumnLimit: 0
44-
CommentPragmas: "^ IWYU pragma:"
45-
CompactNamespaces: false
46-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
47-
ConstructorInitializerIndentWidth: 2
48-
ContinuationIndentWidth: 2
49-
Cpp11BracedListStyle: false
50-
DerivePointerAlignment: false
51-
DisableFormat: false
52-
ExperimentalAutoDetectBinPacking: true
53-
FixNamespaceComments: true
54-
ForEachMacros:
55-
- foreach
56-
- Q_FOREACH
57-
- BOOST_FOREACH
58-
IncludeCategories:
59-
- Priority: 2
60-
Regex: ^"(llvm|llvm-c|clang|clang-c)/
61-
- Priority: 3
62-
Regex: ^(<|"(gtest|gmock|isl|json)/)
63-
- Priority: 1
64-
Regex: .*
65-
IncludeIsMainRegex: (Test)?$
66-
IndentCaseLabels: false
67-
IndentWidth: 4
68-
IndentWrappedFunctionNames: true
69-
JavaScriptQuotes: Leave
70-
JavaScriptWrapImports: true
71-
KeepEmptyLinesAtTheStartOfBlocks: true
72-
Language: Cpp
73-
MacroBlockBegin: ""
74-
MacroBlockEnd: ""
75-
MaxEmptyLinesToKeep: 2
76-
NamespaceIndentation: Inner
77-
ObjCBlockIndentWidth: 7
78-
ObjCSpaceAfterProperty: true
79-
ObjCSpaceBeforeProtocolList: false
80-
PointerAlignment: Right
81-
ReflowComments: true
1+
ColumnLimit: 110
2+
IndentWidth: 2
3+
TabWidth: 2
824
SortIncludes: false
835
SortUsingDeclarations: false
84-
SpaceAfterCStyleCast: false
85-
SpaceAfterTemplateKeyword: false
86-
SpaceBeforeAssignmentOperators: true
87-
SpaceBeforeParens: ControlStatements
88-
SpaceInEmptyParentheses: false
89-
SpacesBeforeTrailingComments: 4
90-
SpacesInAngles: false
91-
SpacesInCStyleCastParentheses: false
92-
SpacesInContainerLiterals: true
93-
SpacesInParentheses: false
94-
SpacesInSquareBrackets: false
95-
Standard: Cpp11
96-
TabWidth: 4
97-
UseTab: Never

package.json

+46-46
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,64 @@
11
{
22
"name": "zadeh",
3-
"author": "Amin Yahyaabadi, Rajendran T",
4-
"homepage": "https://github.com/atom-ide-community/zadeh",
53
"version": "3.0.0-beta.4",
64
"description": "Blazing fast library for fuzzy filtering, matching, and other fuzzy things!",
5+
"homepage": "https://github.com/atom-ide-community/zadeh",
6+
"bugs": {
7+
"url": "https://github.com/atom-ide-community/zadeh/issues"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/atom-ide-community/zadeh.git"
12+
},
13+
"license": "MIT",
14+
"author": "Amin Yahyaabadi, Rajendran T",
715
"main": "./index.js",
8-
"node": "./index.js",
916
"source": "./src/binding/index.ts",
17+
"files": [
18+
"src",
19+
"prebuilds",
20+
"index.*",
21+
"*.d.ts",
22+
"binding.gyp"
23+
],
1024
"scripts": {
11-
"format": "prettier --write . && clang-format -i src/*.h src/binding/*.cc src/binding/*.h",
12-
"test.format": "prettier . --check",
13-
"lint": "eslint . --fix",
14-
"test.lint": "eslint .",
15-
"tidy": "clang-tidy src/*.cc src/*.h",
16-
"tidy.fix": "clang-tidy src/*.cc src/*.h --fix --fix-errors",
17-
"clean.native": "shx rm -rf build prebuilds",
25+
"benchmark": "npm run benchmark.small && npm run benchmark.regular && npm run benchmark.large && npm run benchmark.tree",
26+
"benchmark.large": "node benchmark/benchmark-large.js",
27+
"benchmark.regular": "node benchmark/benchmark.js",
28+
"benchmark.small": "node benchmark/benchmark-small.js",
29+
"benchmark.tree": "node benchmark/benchmark-tree.js",
30+
"build": "npm run build.native && npm run build.js",
31+
"build.js": "npm run types.js && cross-env NODE_ENV=production parcel build --target main ./src/binding/index.ts",
32+
"prebuild.native": "prebuildify --napi -t 12.0.0 -t [email protected] -t [email protected] --strip --tag-libc",
1833
"build.native": "node-gyp configure --release && node-gyp build --release",
1934
"build.native.debug": "node-gyp configure --debug && node-gyp build --debug",
20-
"prebuild.native": "prebuildify --napi -t 12.0.0 -t [email protected] -t [email protected] --strip --tag-libc",
21-
"prebuild.native.ia32": "prebuildify --napi --arch=ia32 -t 12.0.0 -t [email protected] -t [email protected] --strip --tag-libc",
35+
"bump": "ncu -u && ncu -u /parcel/ --greatest",
36+
"clean": "npm run clean.native && npm run clean.js",
2237
"clean.js": "shx rm -rf dist dist-test .rollup.cache .parcel-cache **/tsconfig.tsbuildinfo ./index.* ./*.d.ts",
38+
"clean.native": "shx rm -rf build prebuilds",
2339
"dev.js": "npm run types.js && cross-env NODE_ENV=development parcel watch --target main ./src/binding/index.ts",
24-
"build.js": "npm run types.js && cross-env NODE_ENV=production parcel build --target main ./src/binding/index.ts",
25-
"types.js": "tsc -p ./src/binding/tsconfig.json --emitDeclarationOnly && shx mv ./src/binding/*.d.ts .",
26-
"clean": "npm run clean.native && npm run clean.js",
40+
"examples.cpp": "cmake -S . -B ./build && cmake --build ./build --config Debug",
41+
"format": "prettier --write . && clang-format -i src/*.h src/binding/*.cc src/binding/*.h",
2742
"install": "node-gyp-build",
28-
"build": "npm run build.native && npm run build.js",
43+
"lint": "eslint . --fix",
44+
"prebuild.native.ia32": "prebuildify --napi --arch=ia32 -t 12.0.0 -t [email protected] -t [email protected] --strip --tag-libc",
45+
"prepare": "npm run clean.js && npm run build",
2946
"test": "shx rm -rf dist-test && shx cp -r test dist-test && coffee --compile dist-test && shx rm -rf dist-test/*.coffee && jasmine dist-test/*-spec.js",
30-
"benchmark.regular": "node benchmark/benchmark.js",
31-
"benchmark.large": "node benchmark/benchmark-large.js",
32-
"benchmark.small": "node benchmark/benchmark-small.js",
33-
"benchmark.tree": "node benchmark/benchmark-tree.js",
34-
"benchmark": "npm run benchmark.small && npm run benchmark.regular && npm run benchmark.large && npm run benchmark.tree",
35-
"examples.cpp": "cmake -S . -B ./build && cmake --build ./build --config Debug",
36-
"bump": "ncu -u && ncu -u /parcel/ --greatest",
37-
"prepare": "npm run clean.js && npm run build"
47+
"test.format": "prettier . --check",
48+
"test.lint": "eslint .",
49+
"tidy": "clang-tidy src/*.cc src/*.h",
50+
"tidy.fix": "clang-tidy src/*.cc src/*.h --fix --fix-errors",
51+
"types.js": "tsc -p ./src/binding/tsconfig.json --emitDeclarationOnly && shx mv ./src/binding/*.d.ts ."
3852
},
3953
"prettier": "prettier-config-atomic",
40-
"files": [
41-
"src",
42-
"prebuilds",
43-
"index.*",
44-
"*.d.ts",
45-
"binding.gyp"
46-
],
47-
"gypfile": true,
4854
"dependencies": {
4955
"node-addon-api": "~4.2.0",
5056
"node-gyp-build": "^4.3.0"
5157
},
5258
"devDependencies": {
5359
"coffeescript": "^2.6.1",
5460
"cross-env": "^7.0.3",
55-
"eslint-config-atomic": "^1.16.3",
61+
"eslint-config-atomic": "^1.16.4",
5662
"fast-equals": "^2.0.3",
5763
"fuzzaldrin-plus": "^0.6.0",
5864
"jasmine": "^3.10.0",
@@ -63,6 +69,13 @@
6369
"terser-config-atomic": "^0.1.1",
6470
"typescript": "^4.4.4"
6571
},
72+
"engines": {
73+
"atom": ">=1.52.0 <2.0.0",
74+
"electron": ">=6.0.0",
75+
"node": ">=12.0.0"
76+
},
77+
"gypfile": true,
78+
"node": "./index.js",
6679
"targets": {
6780
"main": {
6881
"context": "node",
@@ -72,18 +85,5 @@
7285
"outputFormat": "commonjs",
7386
"isLibrary": true
7487
}
75-
},
76-
"engines": {
77-
"atom": ">=1.52.0 <2.0.0",
78-
"electron": ">=6.0.0",
79-
"node": ">=12.0.0"
80-
},
81-
"repository": {
82-
"type": "git",
83-
"url": "https://github.com/atom-ide-community/zadeh.git"
84-
},
85-
"license": "MIT",
86-
"bugs": {
87-
"url": "https://github.com/atom-ide-community/zadeh/issues"
8888
}
8989
}

0 commit comments

Comments
 (0)