In order to compute metrics on all units of a given project, you use the gnat driver with '-P' option.
The gnatcheck command has the form gnat check -P [project_file_path] [options] -rules [rule_options].