Skip to content

Conversation

@mszabo-wikia
Copy link
Contributor

@mszabo-wikia mszabo-wikia commented Dec 21, 2025

Changes

We already have a Python script that checks for duplicate LoadFolders.xml entries, but it hasn't been updated for 1.6. Convert it into a .NET SDK test project and add a workflow to run it for PRs. Have it also check that the directories defined in LoadFolders.xml actually exist.

Run this locally with dotnet test Source/CombatExtended.sln.

Example output:

% dotnet test Source/CombatExtended.sln  
 VSTest version 17.14.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.68]     Tests.LoadFoldersXmlTests.TestLoadFoldersPathAreValid [FAIL]
  Failed Tests.LoadFoldersXmlTests.TestLoadFoldersPathAreValid [23 ms]
  Error Message:
   Mod HappyPurging.AgeofDarkness has an invalid patch directory ModPatches/GrimWorld Angels of Death in LoadFolders.xml
  Stack Trace:
     at Tests.LoadFoldersXmlTests.TestLoadFoldersPathAreValid() in /home/runner/work/CombatExtended/CombatExtended/Source/Tests/LoadFoldersXmlTests.cs:line 30
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Failed!  - Failed:     1, Passed:     0, Skipped:     0, Total:     1, Duration: 45 ms - Tests.dll (net9.0)

References

Reasoning

CE devs are already likely to have a working .NET SDK install, so it's simpler to use it to run the validation.

Alternatives

Fix DupeFinder.py - this requires a working Python install in addition to .NET for local development

@mszabo-wikia mszabo-wikia requested review from a team as code owners December 21, 2025 17:38
@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20413464394.zip

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Dec 21, 2025
@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20413508484.zip

We already have a Python script that checks for duplicate LoadFolders.xml
entries, but it hasn't been updated for 1.6 and doesn't currently run in CI.
Convert it into a .NET SDK test project and add a workflow to run it for PRs.
Have it also check that the directories defined in LoadFolders.xml actually exist.
@mszabo-wikia mszabo-wikia force-pushed the add-loadfolders-validator branch from bd9cdbe to f73eabf Compare December 21, 2025 17:45
@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20413538135.zip

@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20413579362.zip

@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20413614358.zip

@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20417494009.zip

@mszabo-wikia mszabo-wikia force-pushed the add-loadfolders-validator branch from e240832 to b590feb Compare December 21, 2025 23:48
@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20417640103.zip

@mszabo-wikia mszabo-wikia force-pushed the add-loadfolders-validator branch from b590feb to eedaf75 Compare December 21, 2025 23:54
@mszabo-wikia mszabo-wikia force-pushed the add-loadfolders-validator branch from eedaf75 to 5405b5a Compare December 21, 2025 23:55
@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20417699796.zip

@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20417710746.zip

@github-actions
Copy link

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-20419370924.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discussion]: LoadFolder path validator utility.

2 participants