Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
rffontenelle committed Jan 15, 2024
1 parent 92220dc commit 4f051b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dnf5-plugins/config-manager_plugin/addrepo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ void ConfigManagerAddRepoCommand::set_argument_parser() {
const char * value) {
auto val = strchr(value + 1, '=');
if (!val) {
throw cli::ArgumentParserError(M_("{}: Badly formatted argument value \"{}\""), std::string{"set"}, std::string{value});
throw cli::ArgumentParserError(
M_("{}: Badly formatted argument value \"{}\""), std::string{"set"}, std::string{value});
}
std::string key{value, val};
std::string key_value{val + 1};
Expand Down
6 changes: 4 additions & 2 deletions dnf5-plugins/config-manager_plugin/setopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ void ConfigManagerSetOptCommand::set_argument_parser() {
auto value = argv[i];
auto val = strchr(value + 1, '=');
if (!val) {
throw cli::ArgumentParserError(M_("{}: Badly formatted argument value \"{}\""), std::string{"optval"}, std::string{value});
throw cli::ArgumentParserError(
M_("{}: Badly formatted argument value \"{}\""), std::string{"optval"}, std::string{value});
}
std::string key{value, val};
std::string key_value{val + 1};
Expand All @@ -88,7 +89,8 @@ void ConfigManagerSetOptCommand::set_argument_parser() {
if (dot_pos == key.size() - 1) {
throw cli::ArgumentParserError(
M_("{}: Badly formatted argument value: Last key character cannot be '.': {}"),
std::string{"optval"}, std::string{value});
std::string{"optval"},
std::string{value});
}

// Save the repository option for later processing (solving glob pattern, writing to file).
Expand Down
4 changes: 3 additions & 1 deletion dnf5-plugins/config-manager_plugin/unsetopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ void ConfigManagerUnsetOptCommand::set_argument_parser() {
auto repo_id = key.substr(0, dot_pos);
if (repo_id.empty()) {
throw cli::ArgumentParserError(
M_("{}: Empty repository id is not allowed: {}"), std::string{"remove-opt"}, std::string{value});
M_("{}: Empty repository id is not allowed: {}"),
std::string{"remove-opt"},
std::string{value});
}
auto repo_key = key.substr(dot_pos + 1);

Expand Down

0 comments on commit 4f051b5

Please sign in to comment.