forked from apache/lucenenet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
751 lines (622 loc) · 20 KB
/
Copy path.editorconfig
File metadata and controls
751 lines (622 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
# ========================================
# Global defaults
# ========================================
[*]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
resharper_enforce_empty_line_at_end_of_file = true
indent_style = space
indent_size = 4
# ========================================
# Windows Batch and Command files
# ========================================
[*.bat]
end_of_line = crlf
trim_trailing_whitespace = false
[*.cmd]
end_of_line = crlf
trim_trailing_whitespace = false
# ========================================
# Markdown files
# ========================================
[*.md]
indent_size = 2
trim_trailing_whitespace = false
# ========================================
# YAML files (preserve trailing spaces for indented script blocks)
# ========================================
[*.yml]
indent_size = 2
trim_trailing_whitespace = false
[*.yaml]
indent_size = 2
trim_trailing_whitespace = false
# ========================================
# XML, MSBuild files
# ========================================
[*.props]
indent_size = 2
[*.targets]
indent_size = 2
[*.csproj]
indent_size = 2
[*.msbuildproj]
indent_size = 2
[*.fsproj]
indent_size = 2
[*.config]
indent_size = 2
# Apache-specific file
[*.rdf]
indent_size = 2
[*.resx]
indent_size = 2
[*.trx]
indent_size = 2
[*.user]
indent_size = 2
[*.vbproj]
indent_size = 2
[*.xml]
indent_size = 2
[*.sln]
indent_style = tab
# ========================================
# DTD files
# ========================================
[*.dtd]
indent_size = 2
# ========================================
# XSLT files
# ========================================
[*.xsl]
indent_size = 2
[*.xslt]
indent_size = 2
# ========================================
# JSON files
# ========================================
[*.json]
indent_size = 2
trim_trailing_whitespace = false
# ========================================
# DocFx files
# ========================================
[*.liquid]
indent_size = 2
# JSON format, different extension
[*.map]
indent_size = 2
trim_trailing_whitespace = false
[*.partial]
indent_size = 2
[*.tmpl]
indent_size = 2
# ========================================
# Python files
# ========================================
[*.py]
# PEP 8 and black defaults are indent_size = 4, but this is a compromise because the files we inherited have indentation of 2
indent_size = 2
# ========================================
# .htaccess files
# ========================================
[.htaccess]
indent_style = unset
indent_size = unset
# ========================================
# HTML files
# ========================================
[*.html]
indent_size = 2
[*.htm]
indent_size = 2
# ========================================
# CSS files
# ========================================
[*.css]
indent_size = 2
[*.min.css]
trim_trailing_whitespace = false
insert_final_newline = false
indent_style = unset
indent_size = unset
# ========================================
# JavaScript files
# ========================================
[*.js]
indent_size = 2
# ========================================
# Java properties files
# ========================================
[*.properties]
trim_trailing_whitespace = false
# ========================================
# Git files
# ========================================
[.gitignore]
end_of_line = lf
[.gitattributes]
end_of_line = lf
# ========================================
# C# files
# ========================================
[*.cs]
indent_size = 4
# C# Formatting
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_open_brace = accessors, anonymous_methods, control_blocks, lambdas, methods, object_collection_array_initializers, properties, types
# Organize using options
dotnet_sort_system_directives_first = false
# Spacing
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
# Wrapping
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
# Braces
csharp_prefer_braces = when_multiline:silent
# Expression-bodied members
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:silent
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
# Expression-level preferences
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_prefer_switch_expression = false:suggestion
# Qualification preferences
dotnet_style_qualification_for_field = false:none
dotnet_style_qualification_for_method = false:none
dotnet_style_qualification_for_property = false:none
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
# Object and property preferences
dotnet_style_object_initializer = true:silent
dotnet_style_prefer_auto_properties = true:silent
# Type declaration preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
# Modifiers
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,virtual,readonly,override,static,abstract,new,sealed,volatile:silent
# Assignments
#prefer compound asignment x += 1 rather than x = x + 1.
dotnet_style_prefer_compound_assignment = true:silent
# Code quality (warnings)
# -----------------------
# Warn about any performance category issues across the entire API
dotnet_code_quality.Performance.api_surface = all:warning
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = none
# CA1034: Do not nest types
dotnet_diagnostic.CA1034.severity = none
# CA2249: Consider using String.Contains instead of String.IndexOf
dotnet_diagnostic.CA2249.severity = none
# IDE0090: Simplify new expression
dotnet_diagnostic.IDE0090.severity = none
# IDE0056: Use index operator
dotnet_diagnostic.IDE0056.severity = none
# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = none
# IDE0070: Use 'System.HashCode.Combine'
dotnet_diagnostic.IDE0070.severity = none
### SonarCloud Issues ###
# S907: Remove this use of 'goto'
dotnet_diagnostic.S907.severity = none
# ========================================
# Exclusions
# ========================================
# Files that tests read should not change from Lucene
[**/src/Lucene.Net.Tests.*/**.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
[**/src/Lucene.Net.Tests.*/**.xml]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
[**/src/Lucene.Net.Tests.*/**.xsl]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
[**/src/Lucene.Net.Tests.*/**.html]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude all files under /lib (3rd party binaries)
[**/lib/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude all files under /.build/psake (3rd party code)
[**/.build/psake/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude CHANGES.txt (we don't care about formatting here)
[**/CHANGES.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude ChangeNotes.txt (we don't care about formatting here)
[**/ChangeNotes.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.snk (we don't care about formatting here)
[**/*.snk]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude package.md (these are auto-generated)
[**/package.md]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude overview.md (these are auto-generated)
[**/overview.md]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.rslp (copied directly from Lucene)
[**/*.rslp]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude stopwords.txt (copied directly from Lucene)
[**/stopwords.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude Snowball stopwords (copied directly from Lucene)
[**/Snowball/*_stop.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude stoptags.txt (copied directly from Lucene for Kuromoji)
[**/stoptags.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.dat (copied directly from Lucene)
[**/*.dat]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.brk (copied directly from Lucene)
[**/*.brk]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.rbbi (copied directly from Lucene)
[**/*.rbbi]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.nrm (binary copied directly from Lucene)
[**/*.nrm]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.utf8 (binary copied directly from Lucene)
[**/*.utf8]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.utf-8 (binary copied directly from Lucene)
[**/*.utf-8]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.aff (copied for directly from Lucene for testing Hunspell)
[**/*.aff]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.dic (downloaded for testing Hunspell)
[**/*.dic]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.xpi (downloaded for testing Hunspell)
[**/*.xpi]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.tbl (binary copied directly from Lucene for Stempel)
[**/*.tbl]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.bz2 (binary copied directly from Lucene for Benchmark)
[**/*.bz2]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.rnc (binary copied directly from Lucene for Benchmark)
[**/*.rnc]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.mem (binary copied directly from Lucene for SmartCn)
[**/*.mem]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.input (copied directly from Lucene for Morfologik)
[**/*.input]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.info (properties file copied directly from Lucene for Morfologik)
[**/*.info]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.dict (binary copied directly from Lucene for Morfologik)
[**/*.dict]
charset = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .svg files (XML copied dirctly from Lucene to Misc)
[**/*.svg]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .svg files (text copied dirctly from Lucene to Misc)
[**/*.gnuplot]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude Phonetic language bm files (copied directly from commons-codec)
[**/Language/**/*.txt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude TagSoup stml files (copied directly from TagSoup)
[**/TagSoup/stml/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude TagSoup tssl files (copied directly from TagSoup)
[**/TagSoup/tssl/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude TagSoup .tt files (copied directly from TagSoup)
[**/TagSoup/*.tt]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude TagSoup .Generated.cs files (copied directly from TagSoup)
[**/TagSoup/*.Generated.cs]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.tssl files (xml copied directly from TagSoup)
[**/*.tssl]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude *.stml files (copied directly from TagSoup)
[**/*.stml]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .Designer.cs files (these are auto-generated)
[**/*.Designer.cs]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .idea files (these are auto-generated)
[**/.idea/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude the generated static website files
[**/websites/**/_site/**]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .zip files
[**/*.zip]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .gz files
[**/*.gz]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .woff files (glyph icons)
[**/*.woff]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .woff2 files (glyph icons)
[**/*.woff2]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .ttf files (TrueType fonts)
[**/*.ttf]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .eot files (Embedded OpenType fonts)
[**/*.eot]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .nupkg files (NuGet package)
[**/*.nupkg]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .snupkg files (NuGet symbols package)
[**/*.snupkg]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .asc files
[**/*.asc]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .md5 files
[**/*.md5]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .sha1 files
[**/*.sha1]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .sha512 files
[**/*.sha512]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .ico files (image)
[**/*.ico]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .psd files (Photoshop)
[**/*.psd]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .ai files (Adobe Illustrator)
[**/*.ai]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .png files (image)
[**/*.png]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .pdb files (program debug database)
[**/*.pdb]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .log files
[**/*.log]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .jar files (Java executable)
[**/*.jar]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .exe files (Windows executable)
[**/*.exe]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .dll files (dynamic link library)
[**/*.dll]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset
# Exclude .bin files (generic binary data)
[**/*.bin]
trim_trailing_whitespace = unset
insert_final_newline = unset
resharper_enforce_empty_line_at_end_of_file = false
indent_style = unset