HomeWildfire Games

Define, document, validate and test validation of the format of mod.json files.
AuditedrP20637

Description

Define, document, validate and test validation of the format of mod.json files.

The mod "name" may only consist of alphanumeric characters, underscore and dash, because it should be used for mod dependency checks.
Drop two special characters from the "version" property.

Differential Revision: https://code.wildfiregames.com/D1093
Res #4427, rP20552
Reviewed By: Itms

Details

Auditors
Imarok
mimo
Committed
elexisDec 10 2017, 5:13 PM
Reviewer
Itms
Differential Revision
D1093: Add mod documentation, specification, validation and validation test
Parents
rP20636: [Windows] Automated build.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 4074
Build 7153: Post-Commit BuildJenkins

Event Timeline

Imarok added a subscriber: Imarok.Dec 11 2017, 3:04 PM
Imarok added inline comments.
/ps/trunk/binaries/data/mods/mod/gui/modmod/validatemod.js
123

Shouldn't this be version?

Imarok added inline comments.Dec 11 2017, 3:08 PM
/ps/trunk/binaries/data/mods/mod/gui/modmod/validatemod.js
41

What about capital letters?

Imarok raised a concern with this commit.Dec 11 2017, 3:20 PM

Things above.
(If we don't allow caps in the mod name, the comment and the warning should state this)

This commit now has outstanding concerns.Dec 11 2017, 3:20 PM
Itms added a subscriber: Itms.Dec 12 2017, 7:52 PM
Itms added inline comments.
/ps/trunk/binaries/data/mods/mod/gui/modmod/validatemod.js
41

I am for keeping the regex like this and stating that in the doc.

123

Good catch, had missed it.

mimo raised a concern with this commit.Dec 14 2017, 7:29 PM
mimo added a subscriber: mimo.

"dependencies": ["0ad=0.0.23"] is broken, it gives a dependency not met message.

In rP20637#26036, @mimo wrote:

"dependencies": ["0ad=0.0.23"] is broken, it gives a dependency not met message.

Sure the dependency is met?

mimo added a comment.Dec 15 2017, 6:48 PM
In rP20637#26036, @mimo wrote:

"dependencies": ["0ad=0.0.23"] is broken, it gives a dependency not met message.

Sure the dependency is met?

What do you mean? as I'm on svn, it should be the case. But does it work for you?

Was asking since one can disable the public mod and I thought I had tested it again. But you are right, it wasn't parsed correctly, g_RegExpComparison should be g_RegExpComparisonOperator.

/ps/trunk/binaries/data/mods/mod/gui/modmod/validatemod.js
41

There is an i here, but it's dropped when later combining the regex'

mimo accepted this commit.Dec 16 2017, 11:43 AM
elexis requested verification of this commit.Dec 16 2017, 5:58 PM
This commit now requires verification by auditors.Dec 16 2017, 5:58 PM
Imarok accepted this commit.Dec 20 2017, 12:23 PM
All concerns with this commit have now been addressed.Dec 20 2017, 12:23 PM

Imarok accepted this commit

Since this commit is about the same file and closely related topics in rP20552, since you worked with this file recently and since you are one of the developers addressing linting patches, may I ask for a formal audit of that commit?