RawConfiguration
struct RawConfiguration {
bool help;
bool errorHelp;
bool shortPluginHelp;
bool mccabe;
bool outputJson;
bool outputStdout;
int mccabeThreshold;
int workerThreads;
string outdir;
string restrictDir;
string[] cflags;
string[] compileDb;
string[] files;
}
Handle parsing of user arguments.
For a simple plugin this is overly complex. But a plugin very seldom stays simple. By keeping the user input parsing and validation separate from the rest of the program it become more robust to future changes.