idaholab / magpie

Mesoscale Atomistic Glue Program for Integrated Execution
http://mooseframework.org/magpie/
GNU Lesser General Public License v2.1
8 stars 28 forks source link

Poor usage of setCheckUnusedFlag(true) #480

Closed socratesgorilla closed 1 year ago

socratesgorilla commented 1 year ago

In main.c, this app is calling app->setCheckUnusedFlag(true), which prevents --allow-unused from working at all, even on the command line. Since MOOSE already sets this flag by default, this line is superfluous, but worse yet, it actually prevents the opposite behavior (allowing warnings for unused parameters) from being able to work, as the call in main.C overrides anything on the CLI.

A MOOSE PR is privating this function so it can no longer be used outside of MOOSE's setting of the flag: https://github.com/idaholab/moose/pull/23392

In order to merge it, the line needs to be removed from this app.