-
Notifications
You must be signed in to change notification settings - Fork 135
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
Fix: Tank armor and invalid builds #1676
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1676 +/- ##
===========================================
- Coverage 2.14% 2.14% -0.01%
Complexity 209 209
===========================================
Files 270 270
Lines 31247 31267 +20
Branches 5328 5329 +1
===========================================
Hits 670 670
- Misses 30420 30440 +20
Partials 157 157 ☔ View full report in Codecov by Sentry. |
tmpFile = File.createTempFile("tmp_mekfiles/" + UUID.randomUUID() + "/" + file.getName(), ".blk"); | ||
} | ||
|
||
if (UnitUtil.persistUnit(tmpFile, entity)) { |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium
|
||
if (UnitUtil.persistUnit(tmpFile, entity)) { | ||
Entity repersistedEntity = loadUnit(tmpFile); | ||
var reValidation = UnitUtil.verify(repersistedEntity); |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium
"The unit is invalid:\n\t" + entity.getDisplayName() + "\n" + validation.report()); | ||
File tmpFile; | ||
if (entity instanceof Mek) { | ||
tmpFile = File.createTempFile("tmp_mekfiles/" + UUID.randomUUID() + "/" + file.getName(), ".mtf"); |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium
if (entity instanceof Mek) { | ||
tmpFile = File.createTempFile("tmp_mekfiles/" + UUID.randomUUID() + "/" + file.getName(), ".mtf"); | ||
} else { | ||
tmpFile = File.createTempFile("tmp_mekfiles/" + UUID.randomUUID() + "/" + file.getName(), ".blk"); |
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium
Given units are based in MegaMek for the builds etc, should these be a MegaMek Side fix? |
Agree |
Implements test suite to validate all units in our current data folders.