pub fn unified(self) -> Result<(UnifiedArgs, Config)> {
        let (config, config_path) = self.load_config()?;
        let unified = match self.command {
            Some(Sub::Config {
                stdout,
                user,
                overwrite,
                filter: checkers,
            }) => {
                let dest_config = match self.cfg {
                    None if stdout => ConfigWriteDestination::Stdout,
                    Some(path) => ConfigWriteDestination::File { overwrite, path },
                    None if user => ConfigWriteDestination::File {
                        overwrite,
                        path: Config::default_path()?,
                    },
                    _ => bail!("Neither --user or --stdout are given, invalid flags passed."),
                };
                UnifiedArgs::Config {
                    dest_config,
                    checker_filter_set: checkers,
                }
            }
            Some(Sub::ListFiles {
                ref paths,
                recursive,
                skip_readme,
            }) => UnifiedArgs::Operate {
                action: self.action(),
                config_path,
                dev_comments: false, // not relevant
                skip_readme,
                recursive,
                paths: paths.clone(),
                exit_code_override: 1,
            },
            None => {
                let common = &self.common;
                UnifiedArgs::Operate {
                    action: Action::Check,
                    config_path,
                    dev_comments: common.dev_comments || config.dev_comments,
                    skip_readme: common.skip_readme || config.skip_readme,
                    recursive: common.recursive,
                    paths: common.paths.clone(),
                    exit_code_override: common.code,
                }
            }
            Some(
                Sub::Reflow { ref common, .. }
                | Sub::Fix { ref common, .. }
                | Sub::Check { ref common, .. },
            ) => UnifiedArgs::Operate {
                action: self.action(),
                config_path,
                dev_comments: common.dev_comments || config.dev_comments,
                skip_readme: common.skip_readme || config.skip_readme,
                recursive: common.recursive,
                paths: common.paths.clone(),
                exit_code_override: common.code,
            },
            Some(Sub::Completions { .. }) => unreachable!("Was handled earlier. qed"),
        };

        Ok((unified, config))
    }
Evaluate the configuration flags, overwrite config values as needed and
provide a new, unified config struct.
src/config/args.rs