1
- # see http://editorconfig.org/ for docs on this file
1
+ ; see http://editorconfig.org/ for docs on this file
2
2
3
3
root = true
4
4
5
5
[* ]
6
- # help with sharing files across os's (i.e. network share or through local vm)
7
- end_of_line = lf
6
+ ignore_if_in_header = This code was generated by a tool|<auto-generated>
7
+ indent_style = space
8
+ indent_size = 4
9
+ ; uncomment to help with sharing files across os's (i.e. network share or through local vm)
10
+ # end_of_line = lf
11
+ ; avoid a bom, which causes endless problems with naive text tooling
8
12
charset = utf-8
9
13
trim_trailing_whitespace = true
10
14
insert_final_newline = true
15
+ ; keeping auto-format enabled helps avoid merge hell for projects without CI-based format validation
16
+ # disable_auto_format = true
11
17
12
- # formattable file extensions (keep in sync with format.ini from unity-meta repo)
13
- #
14
- # Note: We need to split the formattable files configs into shorter duplicate entries (logically grouped)
15
- # due to known issue in VS editorconfig extension where there is a limit of 51 characters (empirically determined).
16
- # see: https://github.com/editorconfig/editorconfig-visualstudio/issues/21
17
- #
18
- # # uncrustify
19
- [* .{c,h,cpp,hpp,m,mm,cc,cs} ]
20
- indent_style = space
21
- indent_size = 4
18
+ [* .cs ]
19
+ ; uncomment to enable full formatting of c# files
20
+ formatters = generic, uncrustify
22
21
23
- # # generic formatter (shaders)
24
- [* .{cg,cginc,glslinc,hlsl,shader,y,ypp,yy} ]
25
- indent_style = space
26
- indent_size = 4
22
+ [* .asmdef ]
23
+ scrape_api = true
27
24
28
- # # generic formatter (misc)
29
- [* .{asm,s,S,pch,pchmm,java,sh,uss} ]
30
- indent_style = space
31
- indent_size = 4
25
+ [** /Tests/** .asmdef ]
26
+ scrape_api = false
32
27
33
- # # perltidy
34
- [* .{pl,pm,t,it} ]
35
- indent_style = space
36
- indent_size = 4
28
+ [* .Tests.asmdef ]
29
+ scrape_api = false
37
30
38
- # # unity special
39
- [* .{bindings,mem.xml} ]
40
- indent_style = space
41
- indent_size = 4
31
+ [* .md ]
32
+ indent_size = 2
33
+ ; trailing whitespace is unfortunately significant in markdown
34
+ trim_trailing_whitespace = false
35
+ ; uncomment to enable basic formatting of markdown files
36
+ # formatters = generic
42
37
43
- # other filetypes we want to overwrite default configuration to preserve the standard
44
38
[{Makefile,makefile} ]
45
- # TAB characters are part of the Makefile format
39
+ ; tab characters are part of the Makefile format
46
40
indent_style = tab
47
41
48
- [* .{md,markdown} ]
49
- # trailing whitespace is significant in markdown (bad choice, bad!)
50
- trim_trailing_whitespace = false
42
+ [* .asmdef ]
43
+ indent_size = 4
51
44
52
- [* .{json,asmdef} ]
53
- indent_style = space
54
- # seems to be more common
45
+ [* .json ]
55
46
indent_size = 2
56
47
57
- # keep these and the VS stuff below in sync with .hgeol's CRLF extensions
58
48
[* .{vcproj,bat,cmd,xaml,tt,t4,ttinclude} ]
59
49
end_of_line = crlf
60
50
61
- # this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
62
- # the settings are meant to closely match what VS does to minimize unnecessary diffs. this duplicates some settings in *
63
- # but let's be explicit here to be safe (in case someone wants to copy-paste this out to another .editorconfig).
64
- [* .{vcxproj,vcxproj.filters,csproj,props,targets} ]
51
+ ; this VS-specific stuff is based on experiments to see how VS will modify a file after it has been manually edited.
52
+ ; the settings are meant to closely match what VS does to minimize unnecessary diffs.
53
+ [* .{vcxproj,vcxproj.filters} ]
54
+ indent_style = space
55
+ indent_size = 2
56
+ end_of_line = crlf
57
+ charset = utf-8-bom
58
+ trim_trailing_whitespace = true
59
+ insert_final_newline = false
60
+ ; must be broken out because of 51-char bug (https://github.com/editorconfig/editorconfig-visualstudio/issues/21)
61
+ [* .{csproj,pyproj,props,targets} ]
65
62
indent_style = space
66
63
indent_size = 2
67
64
end_of_line = crlf
@@ -72,5 +69,6 @@ insert_final_newline = false
72
69
indent_style = tab
73
70
indent_size = 4
74
71
end_of_line = crlf
72
+ charset = utf-8
75
73
trim_trailing_whitespace = true
76
74
insert_final_newline = false
0 commit comments