private fun check_ini(toolcontext: ToolContext) do
if not has_ini then
toolcontext.error(location, "No `package.ini` file for `{name}`")
return
end
var pkg_path = package_path
if pkg_path == null then return
var ini_path = ini_path
if ini_path == null then return
var ini = new IniFile.from_file(ini_path)
ini.check_key(ini_path, toolcontext, self, "package.name", name)
ini.check_key(ini_path, toolcontext, self, "package.desc")
ini.check_key(ini_path, toolcontext, self, "package.tags")
# FIXME since `git reflog --follow` seems bugged
ini.check_key(ini_path, toolcontext, self, "package.maintainer")
# var maint = mpackage.maintainer
# if maint != null then
# ini.check_key(toolcontext, self, "package.maintainer", maint)
# end
# FIXME since `git reflog --follow` seems bugged
# var contribs = mpackage.contributors
# if contribs.not_empty then
# ini.check_key(toolcontext, self, "package.more_contributors", contribs.join(", "))
# end
ini.check_key(ini_path, toolcontext, self, "package.license", license)
ini.check_key(ini_path, toolcontext, self, "upstream.browse", browse_url)
ini.check_key(ini_path, toolcontext, self, "upstream.git", git_url)
ini.check_key(ini_path, toolcontext, self, "upstream.git.directory", git_dir)
ini.check_key(ini_path, toolcontext, self, "upstream.homepage", homepage_url)
ini.check_key(ini_path, toolcontext, self, "upstream.issues", issues_url)
for key in ini.flatten.keys do
if not allowed_ini_keys.has(key) then
toolcontext.warning(location, "unknown-ini-key",
"Warning: ignoring unknown `{key}` key in `{ini_path}`")
end
end
end
src/nitpackage.nit:244,2--288,4