| 136 | return false; |
| 137 | } |
| 138 | |
| 139 | CliHelpMode DetectHelpMode(const std::vector<std::string>& args) |
| 140 | { |
| 141 | bool helpRequested = false; |
| 142 | bool fullHelpRequested = false; |
| 143 | bool devRequested = false; |
| 144 | |
| 145 | for (const std::string& arg : args) |
| 146 | { |
| 147 | if (IsCliArg(arg, "--help")) |
| 148 | helpRequested = true; |
| 149 | else if (IsCliArg(arg, "--help-full")) |
| 150 | fullHelpRequested = true; |
| 151 | else if (IsCliArg(arg, "--dev")) |
| 152 | devRequested = true; |
| 153 | } |
| 154 | |
| 155 | if ((helpRequested || fullHelpRequested) && devRequested) |
| 156 | return CliHelpMode::Dev; |
| 157 | if (fullHelpRequested) |
| 158 | return CliHelpMode::Full; |
| 159 | return CliHelpMode::Basic; |
| 160 | } |
| 161 | |
| 162 | bool ContainsCliArg(const std::vector<std::string>& args, const char* name) |
no test coverage detected