Skip to content

Unify MHQ Faction and FactionRecord and use yaml faction data files #6735

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Merge branch 'master' into export-factions-to-yaml

702d1c8
Select commit
Loading
Failed to load commit list.
Draft

Unify MHQ Faction and FactionRecord and use yaml faction data files #6735

Merge branch 'master' into export-factions-to-yaml
702d1c8
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / CodeQL succeeded Mar 23, 2025 in 4s

18 new alerts

New alerts in code changed by this pull request

  • 2 warnings
  • 16 notes

Alerts not introduced by this pull request might have been detected because the code changes were too large.

See annotations below for details.

View all branch alerts.

Annotations

Check notice on line 122 in megamek/src/megamek/client/ratgenerator/AbstractUnitRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Exposing internal representation Note

getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.
getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.
getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.
getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.
getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.
getIncludedFactions exposes the internal representation stored in field includedFactions. The value may be modified
after this call to getIncludedFactions
.

Check notice on line 225 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 481 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 581 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 584 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 587 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 590 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 597 in megamek/src/megamek/client/ratgenerator/FactionRecord.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 1584 in megamek/src/megamek/client/ratgenerator/ForceDescriptor.java

See this annotation in the file changed.

Code scanning / CodeQL

Exposing internal representation Note

getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.

Check notice on line 1733 in megamek/src/megamek/client/ratgenerator/ForceDescriptor.java

See this annotation in the file changed.

Code scanning / CodeQL

Exposing internal representation Note

getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.
getFlags exposes the internal representation stored in field flags. The value may be modified
after this call to getFlags
.

Check failure on line 1345 in megamek/src/megamek/client/ratgenerator/RATGenerator.java

See this annotation in the file changed.

Code scanning / CodeQL

Sleep with lock held Error

This calls 'Thread.sleep()' with a lock held.

Check notice on line 1358 in megamek/src/megamek/client/ratgenerator/RATGenerator.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 1397 in megamek/src/megamek/client/ratgenerator/RATGenerator.java

See this annotation in the file changed.

Code scanning / CodeQL

Useless parameter Note

The parameter 'dir' is never used.

Check warning on line 1400 in megamek/src/megamek/client/ratgenerator/RATGenerator.java

See this annotation in the file changed.

Code scanning / CodeQL

Potential input resource leak Warning

This FileInputStream is not always closed on method exit.

Check failure on line 1459 in megamek/src/megamek/client/ratgenerator/RATGenerator.java

See this annotation in the file changed.

Code scanning / CodeQL

Sleep with lock held Error

This calls 'Thread.sleep()' with a lock held.

Check notice on line 767 in megamek/src/megamek/client/ratgenerator/UnitTable.java

See this annotation in the file changed.

Code scanning / CodeQL

Exposing internal representation Note

getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.
getRoles exposes the internal representation stored in field roles. The value may be modified
after this call to getRoles
.

Check notice on line 718 in megamek/src/megamek/client/ui/swing/ForceGeneratorOptionsView.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check notice on line 996 in megamek/src/megamek/client/ui/swing/ForceGeneratorOptionsView.java

See this annotation in the file changed.

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.

Check warning on line 971 in megamek/src/megamek/client/ui/swing/RandomArmyDialog.java

See this annotation in the file changed.

Code scanning / CodeQL

Field masks field in super class Warning

This field shadows another field called
windowListener
in a superclass.

Check notice on line 117 in megamek/src/megamek/common/universe/Faction2.java

See this annotation in the file changed.

Code scanning / CodeQL

Exposing internal representation Note

getYearsActive exposes the internal representation stored in field yearsActive. The value may be modified
after this call to getYearsActive
.
getYearsActive exposes the internal representation stored in field yearsActive. The value may be modified
after this call to getYearsActive
.