Skip to content

Commit 106a0e9

Browse files
authored
style: use clap derive feature (#204)
Allows the CLI to be structured using nested structs and enums. Help messages are set using the doc strings for instance attributes. ## Behavioral changes Same behavior as before except: * `-h` shows a shorter help message while `--help` shows the same long help message * `-extensions` will error if a blank string is passed. cpp-linter v1.x just silently ignores blank file extensions ## Other Changes - updated python dependencies (and uv.lock) - added support for free-threaded python builds - adjusted docs' cli-gen binding accordingly for `-h` vs `--help` output (favoring the later when available). - adopt PEP639 about License info in Python package metadata.
1 parent c9b1b1c commit 106a0e9

File tree

12 files changed

+773
-737
lines changed

12 files changed

+773
-737
lines changed

Cargo.lock

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/python/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main(args: Option<Vec<String>>) -> PyResult<()> {
2020

2121
/// The python binding for the cpp_linter package. It only exposes a ``main()`` function
2222
/// that is used as the entrypoint script.
23-
#[pymodule]
23+
#[pymodule(gil_used = false)]
2424
fn cpp_linter(m: &Bound<'_, PyModule>) -> PyResult<()> {
2525
m.add_function(wrap_pyfunction!(main, m)?)?;
2626
Ok(())

cpp-linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ license.workspace = true
1616
[dependencies]
1717
anyhow = "1.0.100"
1818
chrono = "0.4.42"
19-
clap = "4.5.50"
19+
clap = { version = "4.5.50", features = ["derive"] }
2020
colored = "3.0.0"
2121
fast-glob = "1.0.0"
2222
futures = "0.3.31"

0 commit comments

Comments
 (0)