Commit d55f8fbaf1b09d1f50c991d30984f5fed36d3a9b
Committed by
GitHub
1 parent
656dda16
style: fix and add spelling check (#615)
* style: fix and add spelling check * Update .pre-commit-config.yaml
Showing
7 changed files
with
20 additions
and
6 deletions
.pre-commit-config.yaml
| @@ -39,3 +39,17 @@ repos: | @@ -39,3 +39,17 @@ repos: | ||
| 39 | hooks: | 39 | hooks: |
| 40 | - id: cmake-format | 40 | - id: cmake-format |
| 41 | additional_dependencies: [pyyaml] | 41 | additional_dependencies: [pyyaml] |
| 42 | + | ||
| 43 | +- repo: local | ||
| 44 | + hooks: | ||
| 45 | + - id: disallow-caps | ||
| 46 | + name: Disallow improper capitalization | ||
| 47 | + language: pygrep | ||
| 48 | + entry: PyBind|Numpy|Cmake|CCache|PyTest|Github | ||
| 49 | + exclude: .pre-commit-config.yaml | ||
| 50 | + | ||
| 51 | +- repo: https://github.com/codespell-project/codespell | ||
| 52 | + rev: v2.1.0 | ||
| 53 | + hooks: | ||
| 54 | + - id: codespell | ||
| 55 | + args: ["-L", "atleast,ans,doub,inout"] |
docs/mainpage.md
| 1 | # Introduction {#mainpage} | 1 | # Introduction {#mainpage} |
| 2 | 2 | ||
| 3 | -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/). | 3 | +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/). |
| 4 | 4 | ||
| 5 | The main classes are: | 5 | The main classes are: |
| 6 | 6 |
include/CLI/Macros.hpp
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | // [CLI11:macros_hpp:verbatim] | 9 | // [CLI11:macros_hpp:verbatim] |
| 10 | 10 | ||
| 11 | -// The following version macro is very similar to the one in PyBind11 | 11 | +// The following version macro is very similar to the one in pybind11 |
| 12 | #if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER) | 12 | #if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER) |
| 13 | #if __cplusplus >= 201402L | 13 | #if __cplusplus >= 201402L |
| 14 | #define CLI11_CPP14 | 14 | #define CLI11_CPP14 |
include/CLI/TypeTools.hpp
| @@ -1059,7 +1059,7 @@ bool lexical_cast(const std::string &input, T &output) { | @@ -1059,7 +1059,7 @@ bool lexical_cast(const std::string &input, T &output) { | ||
| 1059 | } | 1059 | } |
| 1060 | // LCOV_EXCL_START | 1060 | // LCOV_EXCL_START |
| 1061 | // This version of cast is only used for odd cases in an older compilers the fail over | 1061 | // This version of cast is only used for odd cases in an older compilers the fail over |
| 1062 | - // from_stream is tested elsewhere an not relevent for coverage here | 1062 | + // from_stream is tested elsewhere an not relevant for coverage here |
| 1063 | return from_stream(input, output); | 1063 | return from_stream(input, output); |
| 1064 | // LCOV_EXCL_STOP | 1064 | // LCOV_EXCL_STOP |
| 1065 | } | 1065 | } |
tests/ConfigFileTest.cpp
| @@ -536,7 +536,7 @@ TEST_CASE_METHOD(TApp, "IniRequiredNoDefault", "[config]") { | @@ -536,7 +536,7 @@ TEST_CASE_METHOD(TApp, "IniRequiredNoDefault", "[config]") { | ||
| 536 | app.add_option("--two", two); | 536 | app.add_option("--two", two); |
| 537 | REQUIRE_THROWS_AS(run(), CLI::FileError); | 537 | REQUIRE_THROWS_AS(run(), CLI::FileError); |
| 538 | // test to make sure help still gets called correctly | 538 | // test to make sure help still gets called correctly |
| 539 | - // Github issue #533 https://github.com/CLIUtils/CLI11/issues/553 | 539 | + // GitHub issue #533 https://github.com/CLIUtils/CLI11/issues/553 |
| 540 | args = {"--help"}; | 540 | args = {"--help"}; |
| 541 | REQUIRE_THROWS_AS(run(), CLI::CallForHelp); | 541 | REQUIRE_THROWS_AS(run(), CLI::CallForHelp); |
| 542 | } | 542 | } |
tests/OptionGroupTest.cpp
| @@ -593,7 +593,7 @@ TEST_CASE_METHOD(ManyGroups, "SameSubcommand", "[optiongroup]") { | @@ -593,7 +593,7 @@ TEST_CASE_METHOD(ManyGroups, "SameSubcommand", "[optiongroup]") { | ||
| 593 | // so when the subcommands are disabled they can have the same name | 593 | // so when the subcommands are disabled they can have the same name |
| 594 | sub1->disabled(false); | 594 | sub1->disabled(false); |
| 595 | sub2->disabled(false); | 595 | sub2->disabled(false); |
| 596 | - // if they are reenabled they are not checked for overlap on enabling so they can have the same name | 596 | + // if they are re-enabled they are not checked for overlap on enabling so they can have the same name |
| 597 | args = {"sub1", "sub1", "sub1"}; | 597 | args = {"sub1", "sub1", "sub1"}; |
| 598 | 598 | ||
| 599 | run(); | 599 | run(); |
tests/StringParseTest.cpp
| @@ -79,7 +79,7 @@ TEST_CASE_METHOD(TApp, "ExistingExeCheckWithLotsOfSpace", "[stringparse]") { | @@ -79,7 +79,7 @@ TEST_CASE_METHOD(TApp, "ExistingExeCheckWithLotsOfSpace", "[stringparse]") { | ||
| 79 | CHECK(std::string("./") + std::string(tmpexe) == app.get_name()); | 79 | CHECK(std::string("./") + std::string(tmpexe) == app.get_name()); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | -// From Github issue #591 https://github.com/CLIUtils/CLI11/issues/591 | 82 | +// From GitHub issue #591 https://github.com/CLIUtils/CLI11/issues/591 |
| 83 | TEST_CASE_METHOD(TApp, "ProgNameWithSpace", "[stringparse]") { | 83 | TEST_CASE_METHOD(TApp, "ProgNameWithSpace", "[stringparse]") { |
| 84 | 84 | ||
| 85 | app.add_flag("--foo"); | 85 | app.add_flag("--foo"); |