-
Notifications
You must be signed in to change notification settings - Fork 20
Description
If the target in your reccmp-project.yml uses lower-case chars, everything will work except parsing code annotations. The problem is that the code parser converts the module name to upper case, and so it cannot match the input target.
Historically, reccmp target names have been upper-case, starting with LEGO1 and ISLE, but we don't document this as a requirement. Using a mixed-case module in your annotation will raise the bad_recomp_marker warning in decomplint, but (IIRC) my intention was for processing to go through regardless.
We could patch this easily by converting the input target name to upper case, but this implies that targets have case-insensitive uniqueness in the YML. (i.e. Another thing to validate.)
#230 is another potential solution (apart from its own merits as an independent enhancement).
@pytest.mark.xfail(reason="TODO")
def test_mixed_case_module_name(parser):
parser.read(
dedent(
"""\
// FUNCTION: Hello 0x1234
void interesting_function() {
}
"""
)
)
# Preserve module case
assert len(parser.functions) == 1
assert parser.functions[0].module == "Hello"
# Should alert to this
assert len(parser.alerts) == 1
assert parser.alerts[0].code == ParserError.BAD_DECOMP_MARKER