LCOV - code coverage report
Current view: top level - src/esys/repo/cli - cmdstatus_cli.cpp (source / functions) Hit Total Coverage
Test: esysrepo_coverage.info Lines: 16 20 80.0 %
Date: 2026-08-01 10:43:40 Functions: 4 6 66.7 %

          Line data    Source code
       1             : /*!
       2             :  * \file esys/repo/cli/cmdmanifest_cli.cpp
       3             :  * \brief
       4             :  *
       5             :  * \cond
       6             :  * __legal_b__
       7             :  *
       8             :  * Copyright (c) 2020-2023 Michel Gillet
       9             :  * Distributed under the MIT License.
      10             :  * (See accompanying file LICENSE.txt or
      11             :  * copy at https://opensource.org/licenses/MIT)
      12             :  *
      13             :  * __legal_e__
      14             :  * \endcond
      15             :  *
      16             :  */
      17             : 
      18             : #include "esys/repo/esysrepo_prec.h"
      19             : #include "esys/repo/cli/cmdstatus.h"
      20             : 
      21             : #include <msword2md/cpp/string.h>
      22             : 
      23             : #include <termcolor/termcolor.hpp>
      24             : 
      25             : #include <boost/filesystem.hpp>
      26             : 
      27             : #include <vector>
      28             : 
      29             : namespace esys::repo::cli
      30             : {
      31             : 
      32             : #include "esys/repo/cli/cmdstatus_doc.cpp"
      33             : 
      34          17 : CmdStatus::CmdStatus(AppBase *app)
      35          34 :     : BaseType(app, "status", "Show the working tree status")
      36             : {
      37          17 : }
      38             : 
      39          17 : CmdStatus::~CmdStatus() = default;
      40             : 
      41           3 : std::shared_ptr<po::options_description> CmdStatus::get_desc()
      42             : {
      43           3 :     auto desc = Cmd::get_desc();
      44           3 :     if (desc != nullptr) return desc;
      45             : 
      46           3 :     desc = std::make_shared<po::options_description>("Status options");
      47             :     // clang-format off
      48           3 :     desc->add_options()
      49           3 :         ("help,h", "produce help message")
      50           3 :         ("quiet,q", po::value<bool>()->default_value(false)->implicit_value(true), "Only print the name of modified projects")
      51             :         ;
      52             :     // clang-format on
      53           6 :     Cmd::set_desc(desc);
      54           3 :     return desc;
      55           0 : }
      56             : 
      57           5 : int CmdStatus::configure_cmd(CmdType &cmd)
      58             : {
      59          10 :     if (get_vm()["quiet"].as<bool>()) cmd.set_quiet(true);
      60             : 
      61           5 :     return 0;
      62             : }
      63             : 
      64           0 : int CmdStatus::print_doc(std::ostream &os)
      65             : {
      66           0 :     os << cmdstatus_doc_strings;
      67           0 :     return 0;
      68             : }
      69             : 
      70             : } // namespace esys::repo::cli

Generated by: LCOV version 1.14