• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 5079590438

25 May 2023 12:28PM UTC coverage: 92.228% (+0.5%) from 91.723%
5079590438

Pull #3502

github

Pull Request #3502: Apply clang-format to the codebase

75589 of 81959 relevant lines covered (92.23%)

12139530.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/cli/main.cpp
1
/*
2
* (C) 2009,2014,2015 Jack Lloyd
3
*
4
* Botan is released under the Simplified BSD License (see license.txt)
5
*/
6

7
#include "cli.h"
8
#include <botan/version.h>
9
#include <algorithm>
10
#include <iostream>
11

12
int main(int argc, char* argv[]) {
6,569✔
13
   std::cerr << Botan::runtime_version_check(BOTAN_VERSION_MAJOR, BOTAN_VERSION_MINOR, BOTAN_VERSION_PATCH);
13,138✔
14

15
   std::string cmd_name = "help";
6,569✔
16

17
   if(argc >= 2) {
6,569✔
18
      cmd_name = argv[1];
6,569✔
19
      if(cmd_name == "--help" || cmd_name == "-h")
6,569✔
20
         cmd_name = "help";
×
21
      if(cmd_name == "--version" || cmd_name == "-V")
6,569✔
22
         cmd_name = "version";
×
23
   }
24

25
   std::unique_ptr<Botan_CLI::Command> cmd(Botan_CLI::Command::get_cmd(cmd_name));
6,569✔
26

27
   if(!cmd) {
6,569✔
28
      std::cerr << "Unknown command " << cmd_name << " (try --help)\n";
×
29
      return 1;
30
   }
31

32
   std::vector<std::string> args(argv + std::min(argc, 2), argv + argc);
13,138✔
33
   return cmd->run(args);
6,569✔
34
}
13,139✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc