private fun check_key(ini_file: String, toolcontext: ToolContext, mpackage: MPackage, key: String, value: nullable String) do
if not has_key(key) then
toolcontext.warning(mpackage.location, "missing-ini-key",
"Warning: missing `{key}` key in `{ini_file}`")
return
end
if self[key].as(not null).is_empty then
toolcontext.warning(mpackage.location, "missing-ini-value",
"Warning: empty `{key}` key in `{ini_file}`")
return
end
if value != null and self[key] != value then
toolcontext.warning(mpackage.location, "wrong-ini-value",
"Warning: wrong value for `{key}` in `{ini_file}`. " +
"Expected `{value}`, got `{self[key] or else ""}`")
end
end
src/nitpackage.nit:532,2--548,4