File tree 6 files changed +38
-47
lines changed
modules/mono/glue/GodotSharp
6 files changed +38
-47
lines changed Original file line number Diff line number Diff line change 88
88
run : |
89
89
doc/tools/doc_status.py doc/classes modules/*/doc_classes platform/*/doc_classes
90
90
91
- - name : Style checks via dotnet format (dotnet_format.sh)
92
- run : |
93
- if grep -q "modules/mono" changed.txt || [ -z "$(cat changed.txt)" ]; then
94
- bash ./misc/scripts/dotnet_format.sh
95
- else
96
- echo "Skipping dotnet format as no C# files were changed."
97
- fi
98
-
99
91
- name : Spell checks via codespell
100
92
if : github.event_name == 'pull_request' && env.CHANGED_FILES != ''
101
93
uses : codespell-project/actions-codespell@v2
Original file line number Diff line number Diff line change 47
47
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper.*|
48
48
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.*
49
49
)
50
+
51
+ - id : dotnet-format
52
+ name : dotnet-format
53
+ language : python
54
+ entry : python3 misc/scripts/dotnet_format.py
55
+ types_or : [c#]
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import glob
5
+ import os
6
+ import sys
7
+
8
+ # Create dummy generated files.
9
+ for path in [
10
+ "modules/mono/SdkPackageVersions.props" ,
11
+ ]:
12
+ os .makedirs (os .path .dirname (path ), exist_ok = True )
13
+ with open (path , "w" ) as f :
14
+ f .write ("<Project />" )
15
+
16
+ # Avoid importing GeneratedIncludes.props.
17
+ os .environ ["GodotSkipGenerated" ] = "true"
18
+
19
+ # Match all the input files to their respective C# project.
20
+ input_files = [os .path .normpath (x ) for x in sys .argv ]
21
+ projects = {
22
+ path : [f for f in sys .argv if os .path .commonpath ([f , path ]) == path ]
23
+ for path in [os .path .dirname (f ) for f in glob .glob ("**/*.csproj" , recursive = True )]
24
+ }
25
+
26
+ # Run dotnet format on all projects with more than 0 modified files.
27
+ for path , files in projects .items ():
28
+ if len (files ) > 0 :
29
+ command = f"dotnet format { path } --include { ' ' .join (files )} "
30
+ os .system (command )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 142
142
We can't use wildcards as there may be undesired old files still hanging around.
143
143
Fortunately code completion, go to definition and such still work.
144
144
-->
145
- <Import Project =" Generated\GeneratedIncludes.props" />
145
+ <Import Condition = " '$(GodotSkipGenerated)' == '' " Project =" Generated\GeneratedIncludes.props" />
146
146
</Project >
Original file line number Diff line number Diff line change 44
44
We can't use wildcards as there may be undesired old files still hanging around.
45
45
Fortunately code completion, go to definition and such still work.
46
46
-->
47
- <Import Project =" Generated\GeneratedIncludes.props" />
47
+ <Import Condition = " '$(GodotSkipGenerated)' == '' " Project =" Generated\GeneratedIncludes.props" />
48
48
</Project >
You can’t perform that action at this time.
0 commit comments