mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 12:43:52 +00:00
style: fix and add spelling check (#615)
* style: fix and add spelling check * Update .pre-commit-config.yaml
This commit is contained in:
parent
656dda1695
commit
d55f8fbaf1
@ -39,3 +39,17 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: cmake-format
|
- id: cmake-format
|
||||||
additional_dependencies: [pyyaml]
|
additional_dependencies: [pyyaml]
|
||||||
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: disallow-caps
|
||||||
|
name: Disallow improper capitalization
|
||||||
|
language: pygrep
|
||||||
|
entry: PyBind|Numpy|Cmake|CCache|PyTest|Github
|
||||||
|
exclude: .pre-commit-config.yaml
|
||||||
|
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: v2.1.0
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
args: ["-L", "atleast,ans,doub,inout"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Introduction {#mainpage}
|
# Introduction {#mainpage}
|
||||||
|
|
||||||
This is the Doxygen API documentation for CLI11 parser. There is a friendly introduction to CLI11 on the [Github page](https://github.com/CLIUtils/CLI11), and [a tutorial series](https://cliutils.github.io/CLI11/book/).
|
This is the Doxygen API documentation for CLI11 parser. There is a friendly introduction to CLI11 on the [GitHub page](https://github.com/CLIUtils/CLI11), and [a tutorial series](https://cliutils.github.io/CLI11/book/).
|
||||||
|
|
||||||
The main classes are:
|
The main classes are:
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// [CLI11:macros_hpp:verbatim]
|
// [CLI11:macros_hpp:verbatim]
|
||||||
|
|
||||||
// The following version macro is very similar to the one in PyBind11
|
// The following version macro is very similar to the one in pybind11
|
||||||
#if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
|
#if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
|
||||||
#if __cplusplus >= 201402L
|
#if __cplusplus >= 201402L
|
||||||
#define CLI11_CPP14
|
#define CLI11_CPP14
|
||||||
|
@ -1059,7 +1059,7 @@ bool lexical_cast(const std::string &input, T &output) {
|
|||||||
}
|
}
|
||||||
// LCOV_EXCL_START
|
// LCOV_EXCL_START
|
||||||
// This version of cast is only used for odd cases in an older compilers the fail over
|
// This version of cast is only used for odd cases in an older compilers the fail over
|
||||||
// from_stream is tested elsewhere an not relevent for coverage here
|
// from_stream is tested elsewhere an not relevant for coverage here
|
||||||
return from_stream(input, output);
|
return from_stream(input, output);
|
||||||
// LCOV_EXCL_STOP
|
// LCOV_EXCL_STOP
|
||||||
}
|
}
|
||||||
|
@ -536,7 +536,7 @@ TEST_CASE_METHOD(TApp, "IniRequiredNoDefault", "[config]") {
|
|||||||
app.add_option("--two", two);
|
app.add_option("--two", two);
|
||||||
REQUIRE_THROWS_AS(run(), CLI::FileError);
|
REQUIRE_THROWS_AS(run(), CLI::FileError);
|
||||||
// test to make sure help still gets called correctly
|
// test to make sure help still gets called correctly
|
||||||
// Github issue #533 https://github.com/CLIUtils/CLI11/issues/553
|
// GitHub issue #533 https://github.com/CLIUtils/CLI11/issues/553
|
||||||
args = {"--help"};
|
args = {"--help"};
|
||||||
REQUIRE_THROWS_AS(run(), CLI::CallForHelp);
|
REQUIRE_THROWS_AS(run(), CLI::CallForHelp);
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ TEST_CASE_METHOD(ManyGroups, "SameSubcommand", "[optiongroup]") {
|
|||||||
// so when the subcommands are disabled they can have the same name
|
// so when the subcommands are disabled they can have the same name
|
||||||
sub1->disabled(false);
|
sub1->disabled(false);
|
||||||
sub2->disabled(false);
|
sub2->disabled(false);
|
||||||
// if they are reenabled they are not checked for overlap on enabling so they can have the same name
|
// if they are re-enabled they are not checked for overlap on enabling so they can have the same name
|
||||||
args = {"sub1", "sub1", "sub1"};
|
args = {"sub1", "sub1", "sub1"};
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
@ -79,7 +79,7 @@ TEST_CASE_METHOD(TApp, "ExistingExeCheckWithLotsOfSpace", "[stringparse]") {
|
|||||||
CHECK(std::string("./") + std::string(tmpexe) == app.get_name());
|
CHECK(std::string("./") + std::string(tmpexe) == app.get_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
// From Github issue #591 https://github.com/CLIUtils/CLI11/issues/591
|
// From GitHub issue #591 https://github.com/CLIUtils/CLI11/issues/591
|
||||||
TEST_CASE_METHOD(TApp, "ProgNameWithSpace", "[stringparse]") {
|
TEST_CASE_METHOD(TApp, "ProgNameWithSpace", "[stringparse]") {
|
||||||
|
|
||||||
app.add_flag("--foo");
|
app.add_flag("--foo");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user