Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: file encodings, REUSE #657

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/workflows/run-build-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ jobs:
- name: ✅ Run Unit Tests ✅
shell: bash
run: dotnet nuke TestAll

encoding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify encoding
shell: pwsh
run: scripts/Test-Encoding.ps1
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ dotnet publish Cesium.Compiler/Cesium.Compiler.csproj -r win-x64 --self-containe

Then navigate to `Cesium.Compiler\bin\Debug\net7.0\win-x64\publish\` and that's your Cesium.

File Encoding Changes
---------------------
If the automation asks you to update the file encoding (line endings or UTF-8 BOM) in certain files, run the following PowerShell script ([PowerShell Core][powershell] is recommended to run this script):
```console
$ pwsh -File scripts/Test-Encoding.ps1 -AutoFix
```

The `-AutoFix` switch will automatically fix the encoding issues, and you'll only need to commit and push the changes.

[docs.tests]: docs/tests.md
[dotnet.download]: https://dotnet.microsoft.com/en-us/download
[powershell]: https://github.com/PowerShell/PowerShell
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(method System.Void *(System.Int32,System.Int32) x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(method System.Void *(System.Int32,System.Int32) x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(method System.Void *(System.Int32,System.Int32) x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(method System.Void *(System.Int32,System.Int32) x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: Foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: Foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: Foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: Foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(System.Void* x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(System.Void* x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(System.Void* x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::foo(System.Void* x)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>
Methods:
System.Int32 <Module>::main()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Module: Primary
Module: Primary
Type: <Module>

Type: <typedef>foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
IL_0000: call System.Int32 System.Console::Read()
IL_0005: ret

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
System.Int32* V_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
System.Int32* V_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Byte* V_0
IL_0000: ldc.i4.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
System.Int32 V_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
System.Int32* V_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main(System.Int32 argc, System.Byte** argv)
System.Int32 <Module>::main(System.Int32 argc, System.Byte** argv)
Locals:
System.Byte V_0
IL_0000: ldarg.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::foo(System.Int32* ints)
System.Int32 <Module>::foo(System.Int32* ints)
IL_0000: ldarg.0
IL_0001: ldc.i4.4
IL_0002: ldc.i4.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
<typedef>foo* V_0
IL_0000: ldc.i4.s 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Byte* V_0
IL_0000: ldc.i4.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Void <Module>::.cctor()
System.Void <Module>::.cctor()
IL_0000: ldc.i4.s 40
IL_0002: conv.u
IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Void <Module>::.cctor()
System.Void <Module>::.cctor()
IL_0000: ldc.i4.s 16
IL_0002: conv.u
IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Void <Module>::.cctor()
System.Void <Module>::.cctor()
IL_0000: ldc.i4.s 12
IL_0002: conv.u
IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Void <Module>::.cctor()
System.Void <Module>::.cctor()
IL_0000: ldc.i4 160
IL_0005: conv.u
IL_0006: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4 160
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
IL_0000: ldc.i4.s 80
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::f(System.Byte*** t)
System.Int32 <Module>::f(System.Byte*** t)
Locals:
System.Byte* V_0
IL_0000: ldarg.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.Int32* V_0
System.Int32* V_1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
System.Int32 <Module>::main()
System.Int32 <Module>::main()
Locals:
System.SByte* V_0
System.SByte V_1
Expand Down
Loading
Loading