Skip to content

Commit 307303b

Browse files
clustyjudubu
andauthored
JIRA: USDU-170 Add Formatting and API file generation. (#250)
* Add the coding standard package. * Fix the test project: leftover from previous PR * Massive Reformat and API file generation. * USD.NET reformat and API generation Co-authored-by: Julien Dubuisson <[email protected]>
1 parent 4548b16 commit 307303b

File tree

710 files changed

+135782
-102018
lines changed

Some content is hidden

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

710 files changed

+135782
-102018
lines changed

.editorconfig

+40-42
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,64 @@
1-
# see http://editorconfig.org/ for docs on this file
1+
; see http://editorconfig.org/ for docs on this file
22

33
root = true
44

55
[*]
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
812
charset = utf-8
913
trim_trailing_whitespace = true
1014
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
1117

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
2221

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
2724

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
3227

33-
## perltidy
34-
[*.{pl,pm,t,it}]
35-
indent_style = space
36-
indent_size = 4
28+
[*.Tests.asmdef]
29+
scrape_api = false
3730

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
4237

43-
# other filetypes we want to overwrite default configuration to preserve the standard
4438
[{Makefile,makefile}]
45-
# TAB characters are part of the Makefile format
39+
; tab characters are part of the Makefile format
4640
indent_style = tab
4741

48-
[*.{md,markdown}]
49-
# trailing whitespace is significant in markdown (bad choice, bad!)
50-
trim_trailing_whitespace = false
42+
[*.asmdef]
43+
indent_size = 4
5144

52-
[*.{json,asmdef}]
53-
indent_style = space
54-
# seems to be more common
45+
[*.json]
5546
indent_size = 2
5647

57-
# keep these and the VS stuff below in sync with .hgeol's CRLF extensions
5848
[*.{vcproj,bat,cmd,xaml,tt,t4,ttinclude}]
5949
end_of_line = crlf
6050

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}]
6562
indent_style = space
6663
indent_size = 2
6764
end_of_line = crlf
@@ -72,5 +69,6 @@ insert_final_newline = false
7269
indent_style = tab
7370
indent_size = 4
7471
end_of_line = crlf
72+
charset = utf-8
7573
trim_trailing_whitespace = true
7674
insert_final_newline = false

.gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
* text=auto eol=lf
2+
3+
# match .editorconfig
4+
5+
*.vcproj eol=crlf
6+
*.bat eol=crlf
7+
*.cmd eol=crlf
8+
*.xaml eol=crlf
9+
*.tt eol=crlf
10+
*.t4 eol=crlf
11+
*.ttinclude eol=crlf
12+
13+
*.vcxproj eol=crlf
14+
*.vcxproj.filters eol=crlf
15+
16+
*.csproj eol=crlf
17+
*.pyproj eol=crlf
18+
*.props eol=crlf
19+
*.targets eol=crlf
20+
21+
*.sln eol=crlf
22+
*.sln.template eol=crlf

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ TestProject/**/Temp
7171
TestProject/**/Logs
7272
TestProject/**/*.csproj
7373
TestProject/**/*.sln
74+
TestProject/Usd-Development/Library
7475
build_usdcs

package/com.unity.formats.usd/Runtime/Plugins/x86_64/Windows/cmake.meta renamed to TestProject/Usd-Development/Assets/Resources.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TestProject/Usd-Development/Packages/manifest.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": {
3+
"com.unity.coding": "0.1.0-preview.20",
34
"com.unity.analytics": "3.3.5",
45
"com.unity.ext.nunit": "1.0.0",
56
"com.unity.formats.usd": "file:../../../package/com.unity.formats.usd/",

0 commit comments

Comments
 (0)