Skip to content

Commit 80a5c0c

Browse files
authored
Merge pull request #1 from doocs/main
1
2 parents cc96632 + e605c0c commit 80a5c0c

File tree

18,251 files changed

+1036281
-185166
lines changed

Some content is hidden

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

18,251 files changed

+1036281
-185166
lines changed

.clang-format

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
Language: Java
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: DontAlign
5+
AlignConsecutiveMacros: false
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Right
9+
AlignOperands: false
10+
AlignTrailingComments: false
11+
AllowAllArgumentsOnNextLine: true
12+
AllowAllConstructorInitializersOnNextLine: true
13+
AllowAllParametersOfDeclarationOnNextLine: true
14+
AllowShortBlocksOnASingleLine: Never
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: false
17+
AllowShortLambdasOnASingleLine: All
18+
AllowShortIfStatementsOnASingleLine: true
19+
AllowShortLoopsOnASingleLine: true
20+
AlwaysBreakAfterDefinitionReturnType: None
21+
AlwaysBreakAfterReturnType: None
22+
AlwaysBreakBeforeMultilineStrings: false
23+
AlwaysBreakTemplateDeclarations: MultiLine
24+
BinPackArguments: true
25+
BinPackParameters: true
26+
BraceWrapping:
27+
AfterCaseLabel: false
28+
AfterClass: false
29+
AfterControlStatement: false
30+
AfterEnum: false
31+
AfterFunction: false
32+
AfterNamespace: false
33+
AfterObjCDeclaration: false
34+
AfterStruct: false
35+
AfterUnion: false
36+
AfterExternBlock: false
37+
BeforeCatch: false
38+
BeforeElse: false
39+
IndentBraces: false
40+
SplitEmptyFunction: true
41+
SplitEmptyRecord: true
42+
SplitEmptyNamespace: true
43+
BreakBeforeBinaryOperators: All
44+
BreakBeforeBraces: Custom
45+
BreakBeforeInheritanceComma: false
46+
BreakInheritanceList: BeforeColon
47+
BreakBeforeTernaryOperators: true
48+
BreakConstructorInitializersBeforeComma: false
49+
BreakConstructorInitializers: BeforeComma
50+
BreakAfterJavaFieldAnnotations: false
51+
BreakStringLiterals: true
52+
ColumnLimit: 100
53+
CommentPragmas: '^ IWYU pragma:'
54+
CompactNamespaces: false
55+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
56+
ConstructorInitializerIndentWidth: 4
57+
ContinuationIndentWidth: 4
58+
Cpp11BracedListStyle: true
59+
DeriveLineEnding: true
60+
DerivePointerAlignment: false
61+
DisableFormat: false
62+
ExperimentalAutoDetectBinPacking: false
63+
FixNamespaceComments: false
64+
ForEachMacros:
65+
- foreach
66+
- Q_FOREACH
67+
- BOOST_FOREACH
68+
IncludeBlocks: Preserve
69+
IncludeCategories:
70+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
71+
Priority: 2
72+
SortPriority: 0
73+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
74+
Priority: 3
75+
SortPriority: 0
76+
- Regex: '.*'
77+
Priority: 1
78+
SortPriority: 0
79+
IncludeIsMainRegex: '(Test)?$'
80+
IncludeIsMainSourceRegex: ''
81+
IndentCaseLabels: false
82+
IndentGotoLabels: true
83+
IndentPPDirectives: None
84+
IndentWidth: 4
85+
IndentWrappedFunctionNames: false
86+
JavaScriptQuotes: Leave
87+
JavaScriptWrapImports: true
88+
KeepEmptyLinesAtTheStartOfBlocks: true
89+
MacroBlockBegin: ''
90+
MacroBlockEnd: ''
91+
MaxEmptyLinesToKeep: 1
92+
NamespaceIndentation: Inner
93+
ObjCBinPackProtocolList: Auto
94+
ObjCBlockIndentWidth: 4
95+
ObjCSpaceAfterProperty: true
96+
ObjCSpaceBeforeProtocolList: true
97+
PenaltyBreakAssignment: 2
98+
PenaltyBreakBeforeFirstCallParameter: 19
99+
PenaltyBreakComment: 300
100+
PenaltyBreakFirstLessLess: 120
101+
PenaltyBreakString: 1000
102+
PenaltyBreakTemplateDeclaration: 10
103+
PenaltyExcessCharacter: 1000000
104+
PenaltyReturnTypeOnItsOwnLine: 60
105+
PointerAlignment: Left
106+
ReflowComments: true
107+
SortIncludes: true
108+
SortUsingDeclarations: true
109+
SpaceAfterCStyleCast: true
110+
SpaceAfterLogicalNot: false
111+
SpaceAfterTemplateKeyword: true
112+
SpaceBeforeAssignmentOperators: true
113+
SpaceBeforeCpp11BracedList: false
114+
SpaceBeforeCtorInitializerColon: true
115+
SpaceBeforeInheritanceColon: true
116+
SpaceBeforeParens: ControlStatements
117+
SpaceBeforeRangeBasedForLoopColon: true
118+
SpaceInEmptyBlock: false
119+
SpaceInEmptyParentheses: false
120+
SpacesBeforeTrailingComments: 1
121+
SpacesInAngles: false
122+
SpacesInConditionalStatement: false
123+
SpacesInContainerLiterals: false
124+
SpacesInCStyleCastParentheses: false
125+
SpacesInParentheses: false
126+
SpacesInSquareBrackets: false
127+
SpaceBeforeSquareBrackets: false
128+
Standard: Latest
129+
StatementMacros:
130+
- Q_UNUSED
131+
- QT_REQUIRE_VERSION
132+
TabWidth: 8
133+
UseCRLF: false
134+
UseTab: Never
135+
...
136+
137+
138+
139+
140+
---
141+
Language: Cpp
142+
# BasedOnStyle: WebKit
143+
AccessModifierOffset: -4
144+
AlignAfterOpenBracket: DontAlign
145+
AlignConsecutiveMacros: false
146+
AlignConsecutiveAssignments: false
147+
AlignConsecutiveDeclarations: false
148+
AlignEscapedNewlines: Right
149+
AlignOperands: false
150+
AlignTrailingComments: false
151+
AllowAllArgumentsOnNextLine: true
152+
AllowAllConstructorInitializersOnNextLine: true
153+
AllowAllParametersOfDeclarationOnNextLine: true
154+
AllowShortBlocksOnASingleLine: Always
155+
AllowShortCaseLabelsOnASingleLine: true
156+
AllowShortFunctionsOnASingleLine: All
157+
AllowShortLambdasOnASingleLine: All
158+
AllowShortIfStatementsOnASingleLine: true
159+
AllowShortLoopsOnASingleLine: true
160+
AlwaysBreakAfterDefinitionReturnType: None
161+
AlwaysBreakAfterReturnType: None
162+
AlwaysBreakBeforeMultilineStrings: false
163+
AlwaysBreakTemplateDeclarations: MultiLine
164+
BinPackArguments: true
165+
BinPackParameters: true
166+
BraceWrapping:
167+
AfterCaseLabel: false
168+
AfterClass: false
169+
AfterControlStatement: false
170+
AfterEnum: false
171+
AfterFunction: false
172+
AfterNamespace: false
173+
AfterObjCDeclaration: false
174+
AfterStruct: false
175+
AfterUnion: false
176+
AfterExternBlock: false
177+
BeforeCatch: false
178+
BeforeElse: false
179+
IndentBraces: false
180+
SplitEmptyFunction: true
181+
SplitEmptyRecord: true
182+
SplitEmptyNamespace: true
183+
BreakBeforeBinaryOperators: All
184+
BreakBeforeBraces: Custom
185+
BreakBeforeInheritanceComma: false
186+
BreakInheritanceList: BeforeColon
187+
BreakBeforeTernaryOperators: true
188+
BreakConstructorInitializersBeforeComma: false
189+
BreakConstructorInitializers: BeforeComma
190+
BreakAfterJavaFieldAnnotations: false
191+
BreakStringLiterals: true
192+
ColumnLimit: 0
193+
CommentPragmas: '^ IWYU pragma:'
194+
CompactNamespaces: false
195+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
196+
ConstructorInitializerIndentWidth: 4
197+
ContinuationIndentWidth: 4
198+
Cpp11BracedListStyle: true
199+
DeriveLineEnding: true
200+
DerivePointerAlignment: false
201+
DisableFormat: false
202+
ExperimentalAutoDetectBinPacking: false
203+
FixNamespaceComments: false
204+
ForEachMacros:
205+
- foreach
206+
- Q_FOREACH
207+
- BOOST_FOREACH
208+
IncludeBlocks: Preserve
209+
IncludeCategories:
210+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
211+
Priority: 2
212+
SortPriority: 0
213+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
214+
Priority: 3
215+
SortPriority: 0
216+
- Regex: '.*'
217+
Priority: 1
218+
SortPriority: 0
219+
IncludeIsMainRegex: '(Test)?$'
220+
IncludeIsMainSourceRegex: ''
221+
IndentCaseLabels: false
222+
IndentGotoLabels: true
223+
IndentPPDirectives: None
224+
IndentWidth: 4
225+
IndentWrappedFunctionNames: false
226+
JavaScriptQuotes: Leave
227+
JavaScriptWrapImports: true
228+
KeepEmptyLinesAtTheStartOfBlocks: true
229+
MacroBlockBegin: ''
230+
MacroBlockEnd: ''
231+
MaxEmptyLinesToKeep: 1
232+
NamespaceIndentation: Inner
233+
ObjCBinPackProtocolList: Auto
234+
ObjCBlockIndentWidth: 4
235+
ObjCSpaceAfterProperty: true
236+
ObjCSpaceBeforeProtocolList: true
237+
PenaltyBreakAssignment: 2
238+
PenaltyBreakBeforeFirstCallParameter: 19
239+
PenaltyBreakComment: 300
240+
PenaltyBreakFirstLessLess: 120
241+
PenaltyBreakString: 1000
242+
PenaltyBreakTemplateDeclaration: 10
243+
PenaltyExcessCharacter: 1000000
244+
PenaltyReturnTypeOnItsOwnLine: 60
245+
PointerAlignment: Left
246+
ReflowComments: true
247+
SortIncludes: true
248+
SortUsingDeclarations: true
249+
SpaceAfterCStyleCast: true
250+
SpaceAfterLogicalNot: false
251+
SpaceAfterTemplateKeyword: true
252+
SpaceBeforeAssignmentOperators: true
253+
SpaceBeforeCpp11BracedList: false
254+
SpaceBeforeCtorInitializerColon: true
255+
SpaceBeforeInheritanceColon: true
256+
SpaceBeforeParens: ControlStatements
257+
SpaceBeforeRangeBasedForLoopColon: true
258+
SpaceInEmptyBlock: false
259+
SpaceInEmptyParentheses: false
260+
SpacesBeforeTrailingComments: 1
261+
SpacesInAngles: false
262+
SpacesInConditionalStatement: false
263+
SpacesInContainerLiterals: false
264+
SpacesInCStyleCastParentheses: false
265+
SpacesInParentheses: false
266+
SpacesInSquareBrackets: false
267+
SpaceBeforeSquareBrackets: false
268+
Standard: Latest
269+
StatementMacros:
270+
- Q_UNUSED
271+
- QT_REQUIRE_VERSION
272+
TabWidth: 8
273+
UseCRLF: false
274+
UseTab: Never
275+
...
276+

.github/workflows/black-lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: black-linter
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: jpetrucciani/black-check@master
14+
with:
15+
black_flags: '-S'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: clang-format-linter
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: DoozyX/[email protected]
14+
with:
15+
source: '.'
16+
extensions: 'c,cpp,java'
17+
clangFormatVersion: 12

.github/workflows/compress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Compress
1+
name: compress-images
22

33
on:
44
schedule:

.github/workflows/contributors.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/starcharts.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Starcharts
1+
name: update-starcharts
22

33
on:
44
schedule:
@@ -9,10 +9,11 @@ jobs:
99
update-readme:
1010
name: Generate starcharts
1111
runs-on: ubuntu-latest
12+
if: github.repository == 'doocs/leetcode'
1213
steps:
1314
- uses: MaoLongLong/actions-starcharts@main
1415
with:
1516
github_token: ${{ secrets.ACTION_TOKEN }}
1617
svg_path: images/starcharts.svg
1718
commit_message: "chore: auto update starcharts"
18-
stars_change: "50"
19+
stars_change: ${{ secrets.STARS_CHANGE }}

0 commit comments

Comments
 (0)