From bba2e68f43fa2ee652cc67a18ea2cd1cfbfe537a Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 24 Nov 2024 02:44:39 -0800 Subject: [PATCH 01/43] fix python binding's entry point --- bindings/node/README.md | 3 ++- bindings/python/README.md | 4 ++-- bindings/python/cpp_linter/__init__.py | 14 -------------- bindings/python/cpp_linter/cpp_linter.pyi | 3 --- bindings/python/cpp_linter/py.typed | 0 bindings/python/src/lib.rs | 6 +++++- cpp-linter/src/run.rs | 11 +++++++---- cpp_linter.pyi | 1 + 8 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 bindings/python/cpp_linter/__init__.py delete mode 100644 bindings/python/cpp_linter/cpp_linter.pyi delete mode 100644 bindings/python/cpp_linter/py.typed create mode 100644 cpp_linter.pyi diff --git a/bindings/node/README.md b/bindings/node/README.md index 2452c35..ad7d25a 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -58,10 +58,11 @@ This script runs a simple test to ensure the native module was built correctly. | `build.rs` | The cargo-specific build script used when compiling the binding. | | `Cargo.toml` | Metadata about the binding's rust package (which _is not_ intended to be published to crates.io). | | `package.json` | Metadata about the npm package (platform agnostic). | +| `cli.js` | The executable script invoked as a Command Line Interface. | | `index.d.ts` | The generated TypeScript typing info the describes the exposing functionality in the built native module. | | `index.js` | The generated script that delegates which platform-specific package to import. | | `cpp-linter.x-y-z.node` | Then native module built for a specific platform (where `x-y-z` denotes the platform's name using compilation target). | Hidden files and folders are not described in the table above. If they are not ignored by a gitignore specification, then they should be considered -important for maintenance or distribution. +important only for maintenance or distribution. diff --git a/bindings/python/README.md b/bindings/python/README.md index c57b8f3..86ce27f 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -46,12 +46,12 @@ cpp-linter -help | Name | Description | |-----:|:------------| -| `cpp_linter` | The pure python sources that wrap the rust binding. Typing information is located here. | | `src` | The location for all rust sources related to binding the cpp-linter library. | | `Cargo.toml` | Metadata about the binding's rust package (which _is not_ intended to be published to crates.io). | +| `../../cpp_linter.pyi` | The typing stubs for the package (located in repo root). | | `../../pyproject.toml` | Metadata about the python package (located in repo root). | | `requirements-dev.txt` | The dependencies used in development (not needed for runtime/production). | Hidden files and folders are not described in the table above. If they are not ignored by a gitignore specification, then they should be considered -important for maintenance or distribution. +important only for maintenance or distribution. diff --git a/bindings/python/cpp_linter/__init__.py b/bindings/python/cpp_linter/__init__.py deleted file mode 100644 index f2126fa..0000000 --- a/bindings/python/cpp_linter/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# type: ignore -# ruff: noqa: F405 F403 -import sys -from .cpp_linter import * - -__doc__ = cpp_linter.__doc__ -if hasattr(cpp_linter, "__all__"): - __all__ = list(filter(lambda x: x != "main", cpp_linter.__all__)) - - -def main(): - """The main entrypoint for the python frontend. See our rust docs for more info on - the backend (implemented in rust)""" - sys.exit(cpp_linter.main(sys.argv)) diff --git a/bindings/python/cpp_linter/cpp_linter.pyi b/bindings/python/cpp_linter/cpp_linter.pyi deleted file mode 100644 index f1b57a5..0000000 --- a/bindings/python/cpp_linter/cpp_linter.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import List - -def main(args: List[str]) -> int: ... diff --git a/bindings/python/cpp_linter/py.typed b/bindings/python/cpp_linter/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index a3538b0..a5eb276 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -1,11 +1,15 @@ use pyo3::{exceptions::PyOSError, prelude::*}; +use std::env; use tokio::runtime::Builder; use ::cpp_linter::run::run_main; /// A wrapper for the ``::cpp_linter::run::run_main()``` #[pyfunction] -fn main(args: Vec) -> PyResult<()> { +#[pyo3(signature = (args = None))] +fn main(args: Option>) -> PyResult<()> { + // exclude path to python interpreter + let args = args.unwrap_or(env::args().collect::>()[1..].to_vec()); Builder::new_multi_thread() .enable_all() .build() diff --git a/cpp-linter/src/run.rs b/cpp-linter/src/run.rs index b2a1adb..8dd16d0 100644 --- a/cpp-linter/src/run.rs +++ b/cpp-linter/src/run.rs @@ -32,10 +32,13 @@ fn probe_ssl_certs() { /// The idea here is that all functionality is implemented in Rust. However, passing /// command line arguments is done differently in Python, node.js, or Rust. /// -/// - In python, the `sys.argv` list is passed from the `cpp_linter.main()` -/// function to rust via the `cpp_linter.main()` binding (which wraps [`run_main()`]). -/// - In node.js, the `process.argv` array is passed from `cli.js` module to -/// rust via `index.node` module's `main()` (which wraps([`run_main()`])). +/// - In python, the CLI arguments list is optionally passed to the binding's +/// `cpp_linter.main()` function (which wraps [`run_main()`]). If no args are passed, +/// then `cpp_linter.main()` uses [`std::env::args`] without the leading path to the +/// python interpreter removed. +/// - In node.js, the `process.argv` array (without the leading path to the node +/// interpreter removed) is passed from `cli.js` module to rust via `index.node` +/// module's `main()` (which wraps([`run_main()`])). /// - In rust, the [`std::env::args`] is passed to [`run_main()`] in the binary /// source `main.rs`. /// diff --git a/cpp_linter.pyi b/cpp_linter.pyi new file mode 100644 index 0000000..29614dd --- /dev/null +++ b/cpp_linter.pyi @@ -0,0 +1 @@ +def main(args: list[str] | None = None) -> int: ... From a2001f395a6bb078ed43d4ef5014fa3304ca9323 Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Sun, 24 Nov 2024 11:13:16 +0000 Subject: [PATCH 02/43] Bump version to v2.0.0-rc7 --- CHANGELOG.md | 15 +++++++++++++-- Cargo.lock | 6 +++--- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b37c3..d387f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc7] - 2024-11-24 + +### 🛠️ Fixed + +- Fix python binding's entry point by @2bndy5 in [`bba2e68`](https://github.com/cpp-linter/cpp-linter-rs/commit/bba2e68f43fa2ee652cc67a18ea2cd1cfbfe537a) + +[2.0.0-rc7]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc6...2.0.0-rc7 + +Full commit diff: [`v2.0.0-rc6...2.0.0-rc7`][2.0.0-rc7] + ## [2.0.0-rc6] - 2024-11-23 ### 🚀 Added @@ -38,10 +48,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 🗨️ Changed - Reorganize repo folders by @2bndy5 in [`d30125b`](https://github.com/cpp-linter/cpp-linter-rs/commit/d30125bbe9015d7ea070a3b8c20fcc9acc56dbc0) +- Bump version to v2.0.0-rc6 by @2bndy5 in [`12729b8`](https://github.com/cpp-linter/cpp-linter-rs/commit/12729b86ec9047f550c842c7cbbd412a232b8470) -[2.0.0-rc6]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc5...2.0.0-rc6 +[2.0.0-rc6]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc5...v2.0.0-rc6 -Full commit diff: [`v2.0.0-rc5...2.0.0-rc6`][2.0.0-rc6] +Full commit diff: [`v2.0.0-rc5...v2.0.0-rc6`][2.0.0-rc6] ## [2.0.0-rc5] - 2024-09-29 diff --git a/Cargo.lock b/Cargo.lock index 83258a3..66fbca5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc6" +version = "2.0.0-rc7" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc6" +version = "2.0.0-rc7" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc6" +version = "2.0.0-rc7" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 317db5e..f56be9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc6" # auto +version = "2.0.0-rc7" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index 2ba4a1a..d63f5b9 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc6", + "version": "2.0.0-rc7", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index b031ab2..f09a21b 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc6", + "version": "2.0.0-rc7", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index 3332ce3..ed94d0c 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc6", + "version": "2.0.0-rc7", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index e143e5c..9e8296f 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc6", + "version": "2.0.0-rc7", "main": "index.js", "types": "index.d.ts", "napi": { From 7dfcce72f39412f45208e5586d0a1ef2d0a40207 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 24 Nov 2024 03:31:24 -0800 Subject: [PATCH 03/43] fix: include type stubs in python source distribution --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2e8a0bd..ce3e44b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,9 @@ tracker = "https://github.com/cpp-linter/cpp-linter-rs/issues" [tool.maturin] features = ["pyo3/extension-module"] +include = [ + {path = "cpp_linter.pyi", format = "sdist"}, +] exclude = [ {path = "**/tests/**", format="sdist"}, {path = "**/examples/**", format="sdist"}, From 33337965a240ff791d39d4e4cd6339855ea42fd8 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 24 Nov 2024 03:35:43 -0800 Subject: [PATCH 04/43] fix: clang tools' version output string in PR review summary --- cpp-linter/src/clang_tools/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-linter/src/clang_tools/mod.rs b/cpp-linter/src/clang_tools/mod.rs index 817db84..c05bbd5 100644 --- a/cpp-linter/src/clang_tools/mod.rs +++ b/cpp-linter/src/clang_tools/mod.rs @@ -276,7 +276,7 @@ impl ReviewComments { // If the tool's version is unknown, then we don't need to output this line. // NOTE: If the tool was invoked at all, then the tool's version shall be known. if let Some(ver_str) = tool_version { - body.push_str(format!("### Used {tool_name} {ver_str}\n").as_str()); + body.push_str(format!("\n### Used {tool_name} v{ver_str}\n").as_str()); } for comment in &self.comments { if comment From fc2244f81903c719a5268f18e595f422d1a958e1 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 24 Nov 2024 03:45:23 -0800 Subject: [PATCH 05/43] docs: minor update node binding README --- bindings/node/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/node/README.md b/bindings/node/README.md index ad7d25a..739777a 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -39,7 +39,7 @@ tool for the CI/CD workflow. This script builds the native module for distribution (with release profile optimizations). -##### `yarn build:debug` +#### `yarn build:debug` Same as `yarn build` but does not use the release profile optimizations. You should use this script when testing locally. From 205bd2d492ee45e199ca23d1ac9f118c03a2c4a2 Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Sun, 24 Nov 2024 11:59:04 +0000 Subject: [PATCH 06/43] Bump version to v2.0.0-rc8 --- CHANGELOG.md | 23 +++++++++++++++++-- Cargo.lock | 6 ++--- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 29 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d387f23..76ae244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc8] - 2024-11-24 + +### 🛠️ Fixed + +- Include type stubs in python source distribution by @2bndy5 in [`7dfcce7`](https://github.com/cpp-linter/cpp-linter-rs/commit/7dfcce72f39412f45208e5586d0a1ef2d0a40207) +- Clang tools' version output string in PR review summary by @2bndy5 in [`3333796`](https://github.com/cpp-linter/cpp-linter-rs/commit/33337965a240ff791d39d4e4cd6339855ea42fd8) + +### 📝 Documentation + +- Minor update node binding README by @2bndy5 in [`fc2244f`](https://github.com/cpp-linter/cpp-linter-rs/commit/fc2244f81903c719a5268f18e595f422d1a958e1) + +[2.0.0-rc8]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc7...2.0.0-rc8 + +Full commit diff: [`v2.0.0-rc7...2.0.0-rc8`][2.0.0-rc8] + ## [2.0.0-rc7] - 2024-11-24 ### 🛠️ Fixed - Fix python binding's entry point by @2bndy5 in [`bba2e68`](https://github.com/cpp-linter/cpp-linter-rs/commit/bba2e68f43fa2ee652cc67a18ea2cd1cfbfe537a) -[2.0.0-rc7]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc6...2.0.0-rc7 +### 🗨️ Changed + +- Bump version to v2.0.0-rc7 by @2bndy5 in [`a2001f3`](https://github.com/cpp-linter/cpp-linter-rs/commit/a2001f395a6bb078ed43d4ef5014fa3304ca9323) + +[2.0.0-rc7]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc6...v2.0.0-rc7 -Full commit diff: [`v2.0.0-rc6...2.0.0-rc7`][2.0.0-rc7] +Full commit diff: [`v2.0.0-rc6...v2.0.0-rc7`][2.0.0-rc7] ## [2.0.0-rc6] - 2024-11-23 diff --git a/Cargo.lock b/Cargo.lock index 66fbca5..455dfc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc7" +version = "2.0.0-rc8" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc7" +version = "2.0.0-rc8" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc7" +version = "2.0.0-rc8" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index f56be9c..56f1a72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc7" # auto +version = "2.0.0-rc8" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index d63f5b9..54b1cee 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc7", + "version": "2.0.0-rc8", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index f09a21b..201f1c8 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc7", + "version": "2.0.0-rc8", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index ed94d0c..9fb1b64 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc7", + "version": "2.0.0-rc8", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index 9e8296f..4ae0e93 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc7", + "version": "2.0.0-rc8", "main": "index.js", "types": "index.d.ts", "napi": { From c4bf3d0baef06bb6d91f95a540ee07d95fa18a52 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 27 Nov 2024 00:37:25 -0800 Subject: [PATCH 07/43] fix: clang-tidy diagnostic comments in PR review (#77) * prevent tidy diagnostics outside of PR's diff * fix markdown format of diagnostic comment --- cpp-linter/src/clang_tools/mod.rs | 4 ++-- cpp-linter/src/common_fs/mod.rs | 27 ++++++++++++++++++++++++--- cpp-linter/src/run.rs | 17 +++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/cpp-linter/src/clang_tools/mod.rs b/cpp-linter/src/clang_tools/mod.rs index c05bbd5..c2be8b2 100644 --- a/cpp-linter/src/clang_tools/mod.rs +++ b/cpp-linter/src/clang_tools/mod.rs @@ -180,7 +180,7 @@ pub async fn capture_clang_tools_output( ); clang_versions.tidy_version = Some(version_found); clang_params.clang_tidy_command = Some(exe_path); - }; + } if !clang_params.style.is_empty() { let exe_path = get_clang_tool_exe("clang-format", version)?; let version_found = capture_clang_version(&exe_path)?; @@ -190,7 +190,7 @@ pub async fn capture_clang_tools_output( ); clang_versions.format_version = Some(version_found); clang_params.clang_format_command = Some(exe_path); - }; + } // parse database (if provided) to match filenames when parsing clang-tidy's stdout if let Some(db_path) = &clang_params.database { diff --git a/cpp-linter/src/common_fs/mod.rs b/cpp-linter/src/common_fs/mod.rs index 447e69d..00bf62b 100644 --- a/cpp-linter/src/common_fs/mod.rs +++ b/cpp-linter/src/common_fs/mod.rs @@ -119,6 +119,20 @@ impl FileObj { None } + /// Similar to [`FileObj::is_hunk_in_diff()`] but looks for a single line instead of + /// an entire [`DiffHunk`]. + /// + /// This is a private function because it is only used in + /// [`FileObj::make_suggestions_from_patch()`]. + fn is_line_in_diff(&self, line: &u32) -> bool { + for range in &self.diff_chunks { + if range.contains(line) { + return true; + } + } + false + } + /// Create a list of [`Suggestion`](struct@crate::clang_tools::Suggestion) from a /// generated [`Patch`](struct@git2::Patch) and store them in the given /// [`ReviewComments`](struct@crate::clang_tools::ReviewComments). @@ -161,10 +175,10 @@ impl FileObj { // Count of clang-tidy diagnostics that had no fixes applied let mut total = 0; for note in &advice.notes { - if note.fixed_lines.is_empty() { + if note.fixed_lines.is_empty() && self.is_line_in_diff(¬e.line) { // notification had no suggestion applied in `patched` let mut suggestion = format!( - "### clang-tidy diagnostic\n**{file_name}:{}:{}** {}: [{}]\n> {}", + "### clang-tidy diagnostic\n**{file_name}:{}:{}** {}: [{}]\n\n> {}\n", ¬e.line, ¬e.cols, ¬e.severity, @@ -173,7 +187,8 @@ impl FileObj { ); if !note.suggestion.is_empty() { suggestion.push_str( - format!("```{file_ext}\n{}```", ¬e.suggestion.join("\n")).as_str(), + format!("\n```{file_ext}\n{}\n```\n", ¬e.suggestion.join("\n")) + .as_str(), ); } total += 1; @@ -342,4 +357,10 @@ mod test { let ranges = file_obj.get_ranges(&LinesChangedOnly::On); assert_eq!(ranges, vec![4..=5, 9..=9]); } + + #[test] + fn line_not_in_diff() { + let file_obj = FileObj::new(PathBuf::from("tests/demo/demo.cpp")); + assert!(!file_obj.is_line_in_diff(&42)); + } } diff --git a/cpp-linter/src/run.rs b/cpp-linter/src/run.rs index 8dd16d0..d7fe857 100644 --- a/cpp-linter/src/run.rs +++ b/cpp-linter/src/run.rs @@ -221,4 +221,21 @@ mod test { .await; assert!(result.is_err()); } + + // Verifies that the system gracefully handles cases where all analysis is disabled. + // This ensures no diagnostic comments are generated when analysis is explicitly skipped. + #[tokio::test] + async fn no_analysis() { + env::remove_var("GITHUB_OUTPUT"); // avoid writing to GH_OUT in parallel-running tests + let result = run_main(vec![ + "cpp-linter".to_string(), + "-l".to_string(), + "false".to_string(), + "--style".to_string(), + String::new(), + "--tidy-checks=-*".to_string(), + ]) + .await; + assert!(result.is_ok()); + } } From d69a1b76c1327721d77215571f631d759cb1471f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:51:54 -0800 Subject: [PATCH 08/43] Bump pyo3 from 0.23.1 to 0.23.2 in the cargo group (#76) Bumps the cargo group with 1 update: [pyo3](https://github.com/pyo3/pyo3). Updates `pyo3` from 0.23.1 to 0.23.2 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/v0.23.2/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.23.1...v0.23.2) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 20 ++++++++++---------- bindings/python/Cargo.toml | 2 +- docs/Cargo.toml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 455dfc5..d2b1bc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1181,9 +1181,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebb0c0cc0de9678e53be9ccf8a2ab53045e6e3a8be03393ceccc5e7396ccb40" +checksum = "f54b3d09cbdd1f8c20650b28e7b09e338881482f4aa908a5f61a00c98fba2690" dependencies = [ "cfg-if", "indoc", @@ -1199,9 +1199,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e3ce69c4ec34476534b490e412b871ba03a82e35604c3dfb95fcb6bfb60c09" +checksum = "3015cf985888fe66cfb63ce0e321c603706cd541b7aec7ddd35c281390af45d8" dependencies = [ "once_cell", "target-lexicon", @@ -1209,9 +1209,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09f311c76b36dfd6dd6f7fa6f9f18e7e46a1c937110d283e80b12ba2468a75" +checksum = "6fca7cd8fd809b5ac4eefb89c1f98f7a7651d3739dfb341ca6980090f554c270" dependencies = [ "libc", "pyo3-build-config", @@ -1219,9 +1219,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4f74086536d1e1deaff99ec0387481fb3325c82e4e48be0e75ab3d3fcb487a" +checksum = "34e657fa5379a79151b6ff5328d9216a84f55dc93b17b08e7c3609a969b73aa0" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1231,9 +1231,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e77dfeb76b32bbf069144a5ea0a36176ab59c8db9ce28732d0f06f096bbfbc8" +checksum = "295548d5ffd95fd1981d2d3cf4458831b21d60af046b729b6fd143b0ba7aee2f" dependencies = [ "heck", "proc-macro2", diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 71c5ab3..2f0b81c 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -16,7 +16,7 @@ name = "cpp_linter" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23.1", features = ["extension-module"] } +pyo3 = { version = "0.23.2", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } tokio = "1.41.1" diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 9cfeb4a..3a37a9d 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.23.1" +pyo3 = "0.23.2" [lib] name = "cli_gen" From 9ccbc14c575ddceec5827f18c9c0cf69d8296927 Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Wed, 27 Nov 2024 09:06:49 +0000 Subject: [PATCH 09/43] Bump version to v2.0.0-rc9 --- CHANGELOG.md | 22 +++++++++++++++++-- Cargo.lock | 6 ++--- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ae244..82afe46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc9] - 2024-11-27 + +### 🛠️ Fixed + +- Clang-tidy diagnostic comments in PR review by @2bndy5 in [#77](https://github.com/cpp-linter/cpp-linter-rs/pull/77) + +### 📦 Dependency updates + +- Bump pyo3 from 0.23.1 to 0.23.2 in the cargo group by @dependabot[bot] in [#76](https://github.com/cpp-linter/cpp-linter-rs/pull/76) + +[2.0.0-rc9]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc8...2.0.0-rc9 + +Full commit diff: [`v2.0.0-rc8...2.0.0-rc9`][2.0.0-rc9] + ## [2.0.0-rc8] - 2024-11-24 ### 🛠️ Fixed @@ -17,9 +31,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Minor update node binding README by @2bndy5 in [`fc2244f`](https://github.com/cpp-linter/cpp-linter-rs/commit/fc2244f81903c719a5268f18e595f422d1a958e1) -[2.0.0-rc8]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc7...2.0.0-rc8 +### 🗨️ Changed + +- Bump version to v2.0.0-rc8 by @2bndy5 in [`205bd2d`](https://github.com/cpp-linter/cpp-linter-rs/commit/205bd2d492ee45e199ca23d1ac9f118c03a2c4a2) + +[2.0.0-rc8]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc7...v2.0.0-rc8 -Full commit diff: [`v2.0.0-rc7...2.0.0-rc8`][2.0.0-rc8] +Full commit diff: [`v2.0.0-rc7...v2.0.0-rc8`][2.0.0-rc8] ## [2.0.0-rc7] - 2024-11-24 diff --git a/Cargo.lock b/Cargo.lock index d2b1bc5..437b9e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc8" +version = "2.0.0-rc9" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc8" +version = "2.0.0-rc9" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc8" +version = "2.0.0-rc9" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 56f1a72..e81ffdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc8" # auto +version = "2.0.0-rc9" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index 54b1cee..f16e8d6 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc8", + "version": "2.0.0-rc9", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index 201f1c8..8b8860e 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc8", + "version": "2.0.0-rc9", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index 9fb1b64..3d0c4c5 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc8", + "version": "2.0.0-rc9", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index 4ae0e93..93f71c2 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc8", + "version": "2.0.0-rc9", "main": "index.js", "types": "index.d.ts", "napi": { From 98fbbdc14ab7917bdc1dd046c66868e5229e8f54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:14:51 -0800 Subject: [PATCH 10/43] Bump pyo3 from 0.23.2 to 0.23.3 (#79) Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 20 ++++++++++---------- bindings/python/Cargo.toml | 2 +- docs/Cargo.toml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 437b9e8..76a4a15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1181,9 +1181,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54b3d09cbdd1f8c20650b28e7b09e338881482f4aa908a5f61a00c98fba2690" +checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15" dependencies = [ "cfg-if", "indoc", @@ -1199,9 +1199,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3015cf985888fe66cfb63ce0e321c603706cd541b7aec7ddd35c281390af45d8" +checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b" dependencies = [ "once_cell", "target-lexicon", @@ -1209,9 +1209,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fca7cd8fd809b5ac4eefb89c1f98f7a7651d3739dfb341ca6980090f554c270" +checksum = "eb1547a7f9966f6f1a0f0227564a9945fe36b90da5a93b3933fc3dc03fae372d" dependencies = [ "libc", "pyo3-build-config", @@ -1219,9 +1219,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e657fa5379a79151b6ff5328d9216a84f55dc93b17b08e7c3609a969b73aa0" +checksum = "fdb6da8ec6fa5cedd1626c886fc8749bdcbb09424a86461eb8cdf096b7c33257" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1231,9 +1231,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295548d5ffd95fd1981d2d3cf4458831b21d60af046b729b6fd143b0ba7aee2f" +checksum = "38a385202ff5a92791168b1136afae5059d3ac118457bb7bc304c197c2d33e7d" dependencies = [ "heck", "proc-macro2", diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 2f0b81c..596e67e 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -16,7 +16,7 @@ name = "cpp_linter" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23.2", features = ["extension-module"] } +pyo3 = { version = "0.23.3", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } tokio = "1.41.1" diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 3a37a9d..986d4af 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.23.2" +pyo3 = "0.23.3" [lib] name = "cli_gen" From 9d2a9a3e4c4f91ab778959396e4e153d7cbb6d56 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 11 Dec 2024 12:00:43 -0800 Subject: [PATCH 11/43] add: prefix review comments with marker --- cpp-linter/src/clang_tools/clang_tidy.rs | 2 +- cpp-linter/src/clang_tools/mod.rs | 24 ++++++------- cpp-linter/src/cli/mod.rs | 34 +++++++++++++++---- .../src/rest_api/github/serde_structs.rs | 3 +- 4 files changed, 42 insertions(+), 21 deletions(-) diff --git a/cpp-linter/src/clang_tools/clang_tidy.rs b/cpp-linter/src/clang_tools/clang_tidy.rs index cd82709..1570adf 100644 --- a/cpp-linter/src/clang_tools/clang_tidy.rs +++ b/cpp-linter/src/clang_tools/clang_tidy.rs @@ -318,7 +318,7 @@ pub fn run_clang_tidy( )?); if clang_params.tidy_review { if let Some(tidy_advice) = &mut file.tidy_advice { - // cache file changes in a buffer and restore the original contents for further analysis by clang-format + // cache file changes in a buffer and restore the original contents for further analysis tidy_advice.patched = Some(fs::read(&file_name).with_context(|| { format!("Failed to read changes from clang-tidy: {file_name}") diff --git a/cpp-linter/src/clang_tools/mod.rs b/cpp-linter/src/clang_tools/mod.rs index c2be8b2..29d813c 100644 --- a/cpp-linter/src/clang_tools/mod.rs +++ b/cpp-linter/src/clang_tools/mod.rs @@ -95,39 +95,39 @@ fn analyze_single_file( .lock() .map_err(|_| anyhow!("Failed to lock file mutex"))?; let mut logs = vec![]; - if clang_params.clang_tidy_command.is_some() { + if clang_params.clang_format_command.is_some() { if clang_params - .tidy_filter + .format_filter .as_ref() .is_some_and(|f| f.is_source_or_ignored(file.name.as_path())) - || clang_params.tidy_filter.is_none() + || clang_params.format_filter.is_none() { - let tidy_result = run_clang_tidy(&mut file, &clang_params)?; - logs.extend(tidy_result); + let format_result = run_clang_format(&mut file, &clang_params)?; + logs.extend(format_result); } else { logs.push(( log::Level::Info, format!( - "{} not scanned by clang-tidy due to `--ignore-tidy`", + "{} not scanned by clang-format due to `--ignore-format`", file.name.as_os_str().to_string_lossy() ), )); } } - if clang_params.clang_format_command.is_some() { + if clang_params.clang_tidy_command.is_some() { if clang_params - .format_filter + .tidy_filter .as_ref() .is_some_and(|f| f.is_source_or_ignored(file.name.as_path())) - || clang_params.format_filter.is_none() + || clang_params.tidy_filter.is_none() { - let format_result = run_clang_format(&mut file, &clang_params)?; - logs.extend(format_result); + let tidy_result = run_clang_tidy(&mut file, &clang_params)?; + logs.extend(tidy_result); } else { logs.push(( log::Level::Info, format!( - "{} not scanned by clang-format due to `--ignore-format`", + "{} not scanned by clang-tidy due to `--ignore-tidy`", file.name.as_os_str().to_string_lossy() ), )); diff --git a/cpp-linter/src/cli/mod.rs b/cpp-linter/src/cli/mod.rs index 9ce03b2..1e01ca1 100644 --- a/cpp-linter/src/cli/mod.rs +++ b/cpp-linter/src/cli/mod.rs @@ -336,13 +336,33 @@ Further filtering can still be applied (see [Source options](#source-options))." ) .groups([ ArgGroup::new("Clang-tidy options") - .args(["tidy-checks", "database", "extra-arg", "ignore-tidy"]).multiple(true), - ArgGroup::new("Clang-format options").args(["style", "ignore-format"]).multiple(true), - ArgGroup::new("General options").args(["verbosity", "version"]).multiple(true), - ArgGroup::new("Source options").args(["extensions", "repo-root", "ignore", "lines-changed-only", "files-changed-only"]).multiple(true), - ArgGroup::new("Feedback options").args([ - "thread-comments", "no-lgtm", "step-summary", "file-annotations", "tidy-review", "format-review", "passive-reviews" - ]).multiple(true), + .args(["tidy-checks", "database", "extra-arg", "ignore-tidy"]) + .multiple(true) + .required(false), + ArgGroup::new("Clang-format options") + .args(["style", "ignore-format"]) + .multiple(true) + .required(false), + ArgGroup::new("General options") + .args(["verbosity", "version"]) + .multiple(true) + .required(false), + ArgGroup::new("Source options") + .args(["extensions", "repo-root", "ignore", "lines-changed-only", "files-changed-only"]) + .multiple(true) + .required(false), + ArgGroup::new("Feedback options") + .args([ + "thread-comments", + "no-lgtm", + "step-summary", + "file-annotations", + "tidy-review", + "format-review", + "passive-reviews", + ]) + .multiple(true) + .required(false), ]) .next_line_help(true) } diff --git a/cpp-linter/src/rest_api/github/serde_structs.rs b/cpp-linter/src/rest_api/github/serde_structs.rs index c23eb40..9e0a56e 100644 --- a/cpp-linter/src/rest_api/github/serde_structs.rs +++ b/cpp-linter/src/rest_api/github/serde_structs.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; use crate::clang_tools::Suggestion; +use crate::rest_api::COMMENT_MARKER; #[derive(Debug, Serialize)] pub struct FullReview { @@ -24,7 +25,7 @@ pub struct ReviewDiffComment { impl From for ReviewDiffComment { fn from(value: Suggestion) -> Self { Self { - body: value.suggestion, + body: format!("{COMMENT_MARKER}{}", value.suggestion), line: value.line_end as i64, start_line: if value.line_end != value.line_start { Some(value.line_start as i64) From 3915e2b5a09fd9b69a0233da6b8f64a2e34ce553 Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:36:59 +0000 Subject: [PATCH 12/43] Bump version to v2.0.0-rc10 --- CHANGELOG.md | 22 +++++++++++++++++-- Cargo.lock | 8 +++---- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 29 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82afe46..729995d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc10] - 2024-12-11 + +### 🚀 Added + +- Prefix review comments with marker by @2bndy5 in [`9d2a9a3`](https://github.com/cpp-linter/cpp-linter-rs/commit/9d2a9a3e4c4f91ab778959396e4e153d7cbb6d56) + +### 📦 Dependency updates + +- Bump pyo3 from 0.23.2 to 0.23.3 by @dependabot[bot] in [#79](https://github.com/cpp-linter/cpp-linter-rs/pull/79) + +[2.0.0-rc10]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc9...2.0.0-rc10 + +Full commit diff: [`v2.0.0-rc9...2.0.0-rc10`][2.0.0-rc10] + ## [2.0.0-rc9] - 2024-11-27 ### 🛠️ Fixed @@ -16,9 +30,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump pyo3 from 0.23.1 to 0.23.2 in the cargo group by @dependabot[bot] in [#76](https://github.com/cpp-linter/cpp-linter-rs/pull/76) -[2.0.0-rc9]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc8...2.0.0-rc9 +### 🗨️ Changed + +- Bump version to v2.0.0-rc9 by @2bndy5 in [`9ccbc14`](https://github.com/cpp-linter/cpp-linter-rs/commit/9ccbc14c575ddceec5827f18c9c0cf69d8296927) + +[2.0.0-rc9]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc8...v2.0.0-rc9 -Full commit diff: [`v2.0.0-rc8...2.0.0-rc9`][2.0.0-rc9] +Full commit diff: [`v2.0.0-rc8...v2.0.0-rc9`][2.0.0-rc9] ## [2.0.0-rc8] - 2024-11-24 diff --git a/Cargo.lock b/Cargo.lock index 76a4a15..3f5c419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc9" +version = "2.0.0-rc10" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc9" +version = "2.0.0-rc10" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc9" +version = "2.0.0-rc10" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index e81ffdc..1b0fc4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc9" # auto +version = "2.0.0-rc10" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index f16e8d6..ed47ee7 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc9", + "version": "2.0.0-rc10", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index 8b8860e..d81ac66 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc9", + "version": "2.0.0-rc10", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index 3d0c4c5..4ca7bdd 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc9", + "version": "2.0.0-rc10", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index 93f71c2..235d80a 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc9", + "version": "2.0.0-rc10", "main": "index.js", "types": "index.d.ts", "napi": { From ec4e6d4c9a36b84c86fafac071b23bfbe9180716 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 11 Dec 2024 12:47:32 -0800 Subject: [PATCH 13/43] fix changelog on auto-version bump --- .github/workflows/bump_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump_version.py b/.github/workflows/bump_version.py index d7f6ea3..25ee75f 100644 --- a/.github/workflows/bump_version.py +++ b/.github/workflows/bump_version.py @@ -127,7 +127,7 @@ def main(): "--config", ".config/cliff.toml", "--tag", - Updater.new_version, + f"v{Updater.new_version}", "--output", "CHANGELOG.md", ], From 64a0732d126d286db702db3cace289b833d22b3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:44:05 -0800 Subject: [PATCH 14/43] Bump pypa/gh-action-pypi-publish in the actions group (#81) Bumps the actions group with 1 update: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish). Updates `pypa/gh-action-pypi-publish` from 1.12.2 to 1.12.3 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/15c56dba361d8335944d31a2ecd17d700fc7bcbc...67339c736fd9354cd4f8cb0b744f2b82a74b5c70) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/python-packaging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-packaging.yml b/.github/workflows/python-packaging.yml index 062efc4..2cdf30c 100644 --- a/.github/workflows/python-packaging.yml +++ b/.github/workflows/python-packaging.yml @@ -185,7 +185,7 @@ jobs: path: dist merge-multiple: true - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc + uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 with: attestations: true skip-existing: true From d1da10007c5487f4be4fb1137da57c428f2000a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:26:50 -0800 Subject: [PATCH 15/43] Bump the npm group with 3 updates (#78) Bumps the npm group with 3 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals). Updates `@eslint/js` from 9.15.0 to 9.16.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.16.0/packages/js) Updates `eslint` from 9.15.0 to 9.16.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.15.0...v9.16.0) Updates `globals` from 15.12.0 to 15.13.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.12.0...v15.13.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bindings/node/package.json | 6 +++--- yarn.lock | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bindings/node/package.json b/bindings/node/package.json index 235d80a..fb1ccd0 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -9,11 +9,11 @@ }, "license": "MIT", "devDependencies": { - "@eslint/js": "^9.15.0", + "@eslint/js": "^9.16.0", "@napi-rs/cli": "^2.18.4", "ava": "^6.2.0", - "eslint": "^9.15.0", - "globals": "^15.12.0" + "eslint": "^9.16.0", + "globals": "^15.13.0" }, "ava": { "timeout": "3m" diff --git a/yarn.lock b/yarn.lock index 86cc2cb..399a682 100644 --- a/yarn.lock +++ b/yarn.lock @@ -43,10 +43,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.15.0", "@eslint/js@^9.15.0": - version "9.15.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5" - integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg== +"@eslint/js@9.16.0", "@eslint/js@^9.16.0": + version "9.16.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" + integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== "@eslint/object-schema@^2.1.4": version "2.1.4" @@ -582,17 +582,17 @@ eslint-visitor-keys@^4.2.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.15.0: - version "9.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.15.0.tgz#77c684a4e980e82135ebff8ee8f0a9106ce6b8a6" - integrity sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw== +eslint@^9.16.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" + integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.12.1" "@eslint/config-array" "^0.19.0" "@eslint/core" "^0.9.0" "@eslint/eslintrc" "^3.2.0" - "@eslint/js" "9.15.0" + "@eslint/js" "9.16.0" "@eslint/plugin-kit" "^0.2.3" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" @@ -823,10 +823,10 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globals@^15.12.0: - version "15.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-15.12.0.tgz#1811872883ad8f41055b61457a130221297de5b5" - integrity sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ== +globals@^15.13.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== globby@^14.0.2: version "14.0.2" From f183dabb8652fe44b3c510c989121631665cedc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:36:14 -0800 Subject: [PATCH 16/43] Bump the cargo group across 1 directory with 7 updates (#82) Bumps the cargo group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.93` | `1.0.94` | | [chrono](https://github.com/chronotope/chrono) | `0.4.38` | `0.4.39` | | [clap](https://github.com/clap-rs/clap) | `4.5.21` | `4.5.23` | | [serde](https://github.com/serde-rs/serde) | `1.0.215` | `1.0.216` | | [tokio](https://github.com/tokio-rs/tokio) | `1.41.1` | `1.42.0` | | [tokio-stream](https://github.com/tokio-rs/tokio) | `0.1.16` | `0.1.17` | | [napi-derive](https://github.com/napi-rs/napi-rs) | `2.16.12` | `2.16.13` | Updates `anyhow` from 1.0.93 to 1.0.94 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.93...1.0.94) Updates `chrono` from 0.4.38 to 0.4.39 - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.38...v0.4.39) Updates `clap` from 4.5.21 to 4.5.23 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23) Updates `serde` from 1.0.215 to 1.0.216 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.215...v1.0.216) Updates `tokio` from 1.41.1 to 1.42.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.41.1...tokio-1.42.0) Updates `tokio-stream` from 0.1.16 to 0.1.17 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.16...tokio-stream-0.1.17) Updates `napi-derive` from 2.16.12 to 2.16.13 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-derive@2.16.12...napi-derive@2.16.13) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: tokio-stream dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: napi-derive dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 44 +++++++++++++++++++------------------- bindings/node/Cargo.toml | 4 ++-- bindings/python/Cargo.toml | 2 +- cpp-linter/Cargo.toml | 12 +++++------ 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f5c419..51e4f38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,9 +92,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] name = "assert-json-diff" @@ -182,9 +182,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -196,18 +196,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -217,9 +217,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cli-gen" @@ -974,9 +974,9 @@ checksum = "e1c0f5d67ee408a4685b61f5ab7e58605c8ae3f2b4189f0127d804ff13d5560a" [[package]] name = "napi-derive" -version = "2.16.12" +version = "2.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17435f7a00bfdab20b0c27d9c56f58f6499e418252253081bfff448099da31d1" +checksum = "7cbe2585d8ac223f7d34f13701434b9d5f4eb9c332cccce8dee57ea18ab8ab0c" dependencies = [ "cfg-if", "convert_case", @@ -988,9 +988,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "1.0.74" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967c485e00f0bf3b1bdbe510a38a4606919cf1d34d9a37ad41f25a81aa077abe" +checksum = "1639aaa9eeb76e91c6ae66da8ce3e89e921cd3885e99ec85f4abacae72fc91bf" dependencies = [ "convert_case", "once_cell", @@ -1488,9 +1488,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] @@ -1509,9 +1509,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -1694,9 +1694,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -1743,9 +1743,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index 7c77837..1ca03ac 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -17,9 +17,9 @@ crate-type = ["cdylib"] [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.16.13", default-features = false, features = ["napi4", "async"] } -napi-derive = "2.12.2" +napi-derive = "2.16.13" cpp-linter = { path = "../../cpp-linter" } -anyhow = "1.0.93" +anyhow = "1.0.94" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 596e67e..e5dbf52 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib"] [dependencies] pyo3 = { version = "0.23.3", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } -tokio = "1.41.1" +tokio = "1.42.0" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 6d0c9ed..0e7ed53 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -14,9 +14,9 @@ license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.93" -chrono = "0.4.38" -clap = "4.5.21" +anyhow = "1.0.94" +chrono = "0.4.39" +clap = "4.5.23" colored = "2.1.0" fast-glob = "0.4.0" futures = "0.3.31" @@ -28,12 +28,12 @@ openssl-probe = { version = "0.1", optional = true } regex = "1.11.1" reqwest = "0.12.9" semver = "1.0.23" -serde = { version = "1.0.215", features = ["derive"] } +serde = { version = "1.0.216", features = ["derive"] } serde-xml-rs = "0.6.0" serde_json = "1.0.133" -tokio = { version = "1.41.1", features = ["macros", "rt-multi-thread"]} +tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" -tokio-stream = "0.1.16" +tokio-stream = "0.1.17" which = "7.0.0" [dev-dependencies] From d73c4f6c7d80bc55e8204b3b9a75879c5914f75a Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:55:28 +0000 Subject: [PATCH 17/43] Bump version to v2.0.0-rc11 --- CHANGELOG.md | 24 +++++++++++++++++-- Cargo.lock | 6 ++--- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 729995d..c472a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc11] - 2024-12-11 + +### 🛠️ Fixed + +- Fix changelog on auto-version bump by @2bndy5 in [`ec4e6d4`](https://github.com/cpp-linter/cpp-linter-rs/commit/ec4e6d4c9a36b84c86fafac071b23bfbe9180716) + +### 📦 Dependency updates + +- Bump pypa/gh-action-pypi-publish in the actions group by @dependabot[bot] in [#81](https://github.com/cpp-linter/cpp-linter-rs/pull/81) +- Bump the npm group with 3 updates by @dependabot[bot] in [#78](https://github.com/cpp-linter/cpp-linter-rs/pull/78) +- Bump the cargo group across 1 directory with 7 updates by @dependabot[bot] in [#82](https://github.com/cpp-linter/cpp-linter-rs/pull/82) + +[2.0.0-rc11]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc10...v2.0.0-rc11 + +Full commit diff: [`v2.0.0-rc10...v2.0.0-rc11`][2.0.0-rc11] + ## [2.0.0-rc10] - 2024-12-11 ### 🚀 Added @@ -16,9 +32,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump pyo3 from 0.23.2 to 0.23.3 by @dependabot[bot] in [#79](https://github.com/cpp-linter/cpp-linter-rs/pull/79) -[2.0.0-rc10]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc9...2.0.0-rc10 +### 🗨️ Changed + +- Bump version to v2.0.0-rc10 by @2bndy5 in [`3915e2b`](https://github.com/cpp-linter/cpp-linter-rs/commit/3915e2b5a09fd9b69a0233da6b8f64a2e34ce553) + +[2.0.0-rc10]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc9...v2.0.0-rc10 -Full commit diff: [`v2.0.0-rc9...2.0.0-rc10`][2.0.0-rc10] +Full commit diff: [`v2.0.0-rc9...v2.0.0-rc10`][2.0.0-rc10] ## [2.0.0-rc9] - 2024-11-27 diff --git a/Cargo.lock b/Cargo.lock index 51e4f38..1af0ae7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc10" +version = "2.0.0-rc11" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc10" +version = "2.0.0-rc11" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc10" +version = "2.0.0-rc11" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 1b0fc4e..37036b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc10" # auto +version = "2.0.0-rc11" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index ed47ee7..a983879 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc10", + "version": "2.0.0-rc11", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index d81ac66..442d9c2 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc10", + "version": "2.0.0-rc11", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index 4ca7bdd..e579511 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc10", + "version": "2.0.0-rc11", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index fb1ccd0..4284ffc 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc10", + "version": "2.0.0-rc11", "main": "index.js", "types": "index.d.ts", "napi": { From 31b7add5ea8b1938ea4f816f27a732f3ec8d5227 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 11 Dec 2024 16:35:33 -0800 Subject: [PATCH 18/43] docs:[rust API] update logo, favicon, and some links --- cpp-linter/README.md | 2 +- cpp-linter/src/lib.rs | 4 ++-- cpp-linter/src/logger.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp-linter/README.md b/cpp-linter/README.md index 68d327d..ff907cd 100644 --- a/cpp-linter/README.md +++ b/cpp-linter/README.md @@ -14,7 +14,7 @@ This crate contains the the library used as a backend for the Since the [cpp-linter python package][pypi-org] now uses this library as a binding, the native binary's `main()` behavior is also present in this -library (see `run::run_main()`). +library (see [`run::run_main()`](fn@crate::run::run_main)). See also the [CLI document hosted on github][gh-pages]. diff --git a/cpp-linter/src/lib.rs b/cpp-linter/src/lib.rs index 5510e29..60bf0d6 100644 --- a/cpp-linter/src/lib.rs +++ b/cpp-linter/src/lib.rs @@ -1,8 +1,8 @@ #![doc( - html_logo_url = "https://github.com/cpp-linter/cpp-linter-rs/raw/main/docs/theme/favicon.png" + html_logo_url = "https://raw.githubusercontent.com/cpp-linter/cpp-linter-rs/main/docs/docs/images/logo.png" )] #![doc( - html_favicon_url = "https://github.com/cpp-linter/cpp-linter-rs/raw/main/docs/theme/favicon.png" + html_favicon_url = "https://github.com/cpp-linter/cpp-linter-rs/raw/main/docs/docs/images/favicon.ico" )] #![doc = include_str!("../README.md")] diff --git a/cpp-linter/src/logger.rs b/cpp-linter/src/logger.rs index f7fc004..ca2f834 100644 --- a/cpp-linter/src/logger.rs +++ b/cpp-linter/src/logger.rs @@ -46,7 +46,7 @@ impl log::Log for SimpleLogger { /// A function to initialize the private `LOGGER`. /// /// The logging level defaults to [`LevelFilter::Info`]. -/// Returns a [`SetLoggerError`] if the `LOGGER` is already initialized. +/// Returns a [`SetLoggerError`](struct@log::SetLoggerError) if the `LOGGER` is already initialized. pub fn init() -> Result<()> { let logger: SimpleLogger = SimpleLogger; if matches!( From 0923c6a1c61617a09fd914a702959204fc41c26d Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Thu, 12 Dec 2024 08:57:47 -0800 Subject: [PATCH 19/43] add: rationale to diagnostic comments in PR reviews --- cpp-linter/src/clang_tools/clang_tidy.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp-linter/src/clang_tools/clang_tidy.rs b/cpp-linter/src/clang_tools/clang_tidy.rs index 1570adf..988dc77 100644 --- a/cpp-linter/src/clang_tools/clang_tidy.rs +++ b/cpp-linter/src/clang_tools/clang_tidy.rs @@ -106,7 +106,11 @@ impl MakeSuggestions for TidyAdvice { for note in &self.notes { for fixed_line in ¬e.fixed_lines { if (start_line..=end_line).contains(fixed_line) { - diagnostics.push(format!("- {}\n", note.diagnostic_link())); + diagnostics.push(format!( + "- {} [{}]\n", + note.rationale, + note.diagnostic_link() + )); } } } From aa03ebb48a5bff90ffa0bcf2e1adb4dc64932c57 Mon Sep 17 00:00:00 2001 From: 2bndy5 <14963867+2bndy5@users.noreply.github.com> Date: Thu, 12 Dec 2024 20:36:07 +0000 Subject: [PATCH 20/43] Bump version to v2.0.0-rc12 --- CHANGELOG.md | 18 ++++++++++++++++++ Cargo.lock | 6 +++--- Cargo.toml | 2 +- bindings/node/npm/darwin-x64/package.json | 2 +- bindings/node/npm/linux-x64-gnu/package.json | 2 +- bindings/node/npm/win32-x64-msvc/package.json | 2 +- bindings/node/package.json | 2 +- 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c472a56..3e79c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0-rc12] - 2024-12-12 + +### 🚀 Added + +- Rationale to diagnostic comments in PR reviews by @2bndy5 in [`0923c6a`](https://github.com/cpp-linter/cpp-linter-rs/commit/0923c6a1c61617a09fd914a702959204fc41c26d) + +### 📝 Documentation + +- [rust API] update logo, favicon, and some links by @2bndy5 in [`31b7add`](https://github.com/cpp-linter/cpp-linter-rs/commit/31b7add5ea8b1938ea4f816f27a732f3ec8d5227) + +[2.0.0-rc12]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc11...v2.0.0-rc12 + +Full commit diff: [`v2.0.0-rc11...v2.0.0-rc12`][2.0.0-rc12] + ## [2.0.0-rc11] - 2024-12-11 ### 🛠️ Fixed @@ -18,6 +32,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump the npm group with 3 updates by @dependabot[bot] in [#78](https://github.com/cpp-linter/cpp-linter-rs/pull/78) - Bump the cargo group across 1 directory with 7 updates by @dependabot[bot] in [#82](https://github.com/cpp-linter/cpp-linter-rs/pull/82) +### 🗨️ Changed + +- Bump version to v2.0.0-rc11 by @2bndy5 in [`d73c4f6`](https://github.com/cpp-linter/cpp-linter-rs/commit/d73c4f6c7d80bc55e8204b3b9a75879c5914f75a) + [2.0.0-rc11]: https://github.com/cpp-linter/cpp-linter-rs/compare/v2.0.0-rc10...v2.0.0-rc11 Full commit diff: [`v2.0.0-rc10...v2.0.0-rc11`][2.0.0-rc11] diff --git a/Cargo.lock b/Cargo.lock index 1af0ae7..b09bf4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpp-linter" -version = "2.0.0-rc11" +version = "2.0.0-rc12" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cpp-linter-js" -version = "2.0.0-rc11" +version = "2.0.0-rc12" dependencies = [ "anyhow", "cpp-linter", @@ -312,7 +312,7 @@ dependencies = [ [[package]] name = "cpp-linter-py" -version = "2.0.0-rc11" +version = "2.0.0-rc12" dependencies = [ "cpp-linter", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index 37036b6..8c9378b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["cpp-linter", "bindings/python", "bindings/node", "docs"] resolver = "2" [workspace.package] -version = "2.0.0-rc11" # auto +version = "2.0.0-rc12" # auto authors = [ "Brendan Doherty", "Peter Shen", diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index a983879..b2f58c0 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-darwin-x64", - "version": "2.0.0-rc11", + "version": "2.0.0-rc12", "os": [ "darwin" ], diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index 442d9c2..0324673 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-linux-x64-gnu", - "version": "2.0.0-rc11", + "version": "2.0.0-rc12", "os": [ "linux" ], diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index e579511..12f808c 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter-win32-x64-msvc", - "version": "2.0.0-rc11", + "version": "2.0.0-rc12", "os": [ "win32" ], diff --git a/bindings/node/package.json b/bindings/node/package.json index 4284ffc..6fa0cb0 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "@cpp-linter/cpp-linter", - "version": "2.0.0-rc11", + "version": "2.0.0-rc12", "main": "index.js", "types": "index.d.ts", "napi": { From 2c14c497467713fd39bade6cc309d25ab18aa8c6 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Mon, 23 Dec 2024 00:09:07 -0800 Subject: [PATCH 21/43] update dependabot pip config also updates some mkdocs dependencies --- .github/dependabot.yml | 2 +- docs/requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 57b1832..dcd41be 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,7 +14,7 @@ updates: patterns: - "*" - package-ecosystem: pip - directory: py-binding/ + directory: / schedule: interval: "weekly" groups: diff --git a/docs/requirements.txt b/docs/requirements.txt index 9024916..6e243a6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ markdown-gfm-admonition==0.1.1 mkdocs==1.6.1 mkdocs-gen-files==0.5.0 -mkdocs-include-markdown-plugin==6.2.2 -mkdocs-material==9.5.39 +mkdocs-include-markdown-plugin==7.1.2 +mkdocs-material==9.5.49 pyyaml==6.0.2 From 57576486ccc3228a28b6463c04845eb960b8076b Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Mon, 23 Dec 2024 01:06:31 -0800 Subject: [PATCH 22/43] typo: trim trailing whitespace --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 6e243a6..bb4b1cf 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ markdown-gfm-admonition==0.1.1 mkdocs==1.6.1 mkdocs-gen-files==0.5.0 -mkdocs-include-markdown-plugin==7.1.2 +mkdocs-include-markdown-plugin==7.1.2 mkdocs-material==9.5.49 pyyaml==6.0.2 From 26c3b2d6d06e111449c1ac7e8bd2d26675709098 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 31 Dec 2024 10:42:06 +0000 Subject: [PATCH 23/43] add gitlens to vscode and update repo link --- .vscode/extensions.json | 3 ++- bindings/python/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5dfb37f..875f78b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "rust-lang.rust-analyzer", "streetsidesoftware.code-spell-checker", "fill-labs.dependi", - "wolfmah-vscode.just-syntax" + "wolfmah-vscode.just-syntax", + "eamodio.gitlens" ] } diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index e5dbf52..f57d3e3 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -2,7 +2,7 @@ name = "cpp-linter-py" edition = "2021" readme = "README.md" -repository = "https://github.com/cpp-linter/cpp-linter-rs/tree/main/py-binding" +repository = "https://github.com/cpp-linter/cpp-linter-rs/tree/main/bindings/python" version.workspace = true authors.workspace = true description.workspace = true From 2e1aea831851be2e17d1292743b3fc40f060f108 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 31 Dec 2024 10:48:38 +0000 Subject: [PATCH 24/43] Thanks for having me and updated to my chinese name --- Cargo.toml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8c9378b..cdc383b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ resolver = "2" version = "2.0.0-rc12" # auto authors = [ "Brendan Doherty", - "Peter Shen", + "Xianpeng Shen", ] description = "Run clang-format and clang-tidy on a batch of files." homepage = "https://cpp-linter.github.io/cpp-linter-rs" diff --git a/pyproject.toml b/pyproject.toml index ce3e44b..17e6ed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ license = {text = "MIT License"} requires-python = ">=3.9" authors = [ { name = "Brendan Doherty", email = "2bndy5@gmail.com" }, - { name = "Peter Shen", email = "xianpeng.shen@gmail.com" }, + { name = "Xianpeng Shen", email = "xianpeng.shen@gmail.com" }, ] classifiers = [ # https://pypi.org/pypi?%3Aaction=list_classifiers From 23c30d97afdd382209dc43ddde059910719b9091 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 31 Dec 2024 18:50:04 -0500 Subject: [PATCH 25/43] docs: reorganize LICENSE info (#89) * docs: format LICENSE and fix typo * docs: move third-party licenses to a single file in docs * changes for mkdocs build * generate license list from `cargo tree` --------- Co-authored-by: Brendan <2bndy5@gmail.com> --- .github/workflows/bump-n-release.yml | 2 +- LICENSE | 18 +++++-- README.md | 55 ++-------------------- docs/docs/index.md | 1 + docs/docs/other-licenses.md | 5 ++ docs/license_gen.py | 70 ++++++++++++++++++++++++++++ docs/mkdocs.yml | 2 + 7 files changed, 98 insertions(+), 55 deletions(-) create mode 100644 docs/docs/other-licenses.md create mode 100644 docs/license_gen.py diff --git a/.github/workflows/bump-n-release.yml b/.github/workflows/bump-n-release.yml index dfbcbf8..ef8ff8a 100644 --- a/.github/workflows/bump-n-release.yml +++ b/.github/workflows/bump-n-release.yml @@ -40,7 +40,7 @@ jobs: - run: yarn global add @napi-rs/cli - uses: cargo-bins/cargo-binstall@main - run: cargo binstall -y git-cliff - - name: Bump ${{ inputs.component }} verion + - name: Bump ${{ inputs.component }} version env: GITHUB_TOKEN: ${{ secrets.BUMP_N_RELEASE }} GH_TOKEN: ${{ secrets.BUMP_N_RELEASE }} diff --git a/LICENSE b/LICENSE index 6c80e74..b9c4642 100644 --- a/LICENSE +++ b/LICENSE @@ -2,8 +2,20 @@ MIT License Copyright (c) 2024 2bndy5 -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 91840d4..476320d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [step-summary]: https://cpp-linter.github.io/cpp-linter-rs/cli#-w-step-summary [tidy-review]: https://cpp-linter.github.io/cpp-linter-rs/cli#-d-tidy-review [format-review]: https://cpp-linter.github.io/cpp-linter-rs/cli#-m-format-review +[other-licenses]: https://cpp-linter.github.io/cpp-linter-rs/other-licenses [format-annotations-preview]: docs/docs/images/annotations-clang-format.png [tidy-annotations-preview]: docs/docs/images/annotations-clang-tidy.png @@ -172,56 +173,8 @@ To provide feedback (requesting a feature or reporting a bug) please post to ## License -The scripts and documentation in this project are released under the [MIT]. - -Dependencies (that are redistributed by us in binary form) have the following -license agreements: - -- [clap](https://crates.io/crates/clap): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [git2](https://crates.io/crates/git2): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. - - The following are conditionally included in binaries (using the `openssl-vendored` feature on a - case-by-case basis) because it is a dependency of git2: - - - [openssl](https://crates.io/crates/openssl): Licensed under [Apache 2.0][Apache2] - - [openssl-probe](https://crates.io/crates/openssl-probe): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. - -- [lenient_semver](https://crates.io/crates/lenient_semver): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [log](https://crates.io/crates/log): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [regex](https://crates.io/crates/regex): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [reqwest](https://crates.io/crates/reqwest): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [semver](https://crates.io/crates/semver): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [serde](https://crates.io/crates/serde): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [serde-xml-rs](https://crates.io/crates/serde-xml-rs): Licensed under [MIT]. -- [serde_json](https://crates.io/crates/serde_json): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [which](https://crates.io/crates/which): Licensed under [MIT]. -- [tokio](https://crates.io/crates/tokio): Licensed under [MIT]. -- [futures](https://crates.io/crates/futures): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [chrono](https://crates.io/crates/chrono): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. -- [colored](https://crates.io/crates/colored): Licensed under [MPL-2.0] - -The python binding uses - -- [pyo3](https://crates.io/crates/pyo3): - Dual-licensed under [Apache 2.0][Apache2] or [MIT]. - -The node binding uses - -- [napi](https://crates.io/crates/napi): Licensed under [MIT] -- [napi-derive](https://crates.io/crates/napi-derive): Licensed under [MIT] +The scripts and documentation in this project are released under the [MIT] license. + +As for dependencies (that are redistributed by us in binary form) and their licenses, refer to [THIRD-PARTY LICENSES][other-licenses]. [MIT]: https://choosealicense.com/licenses/mit -[Apache2]: https://choosealicense.com/licenses/apache-2.0/ -[MPL-2.0]: https://choosealicense.com/licenses/mpl-2.0 diff --git a/docs/docs/index.md b/docs/docs/index.md index 627e8a7..e13f7ed 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -5,6 +5,7 @@ [step-summary]: cli.md#-w-step-summary [tidy-review]: cli.md#-d-tidy-review [format-review]: cli.md#-m-format-review +[other-licenses]: other-licenses.md [format-annotations-preview]: images/annotations-clang-format.png [tidy-annotations-preview]: images/annotations-clang-tidy.png diff --git a/docs/docs/other-licenses.md b/docs/docs/other-licenses.md new file mode 100644 index 0000000..af04be4 --- /dev/null +++ b/docs/docs/other-licenses.md @@ -0,0 +1,5 @@ +# Third-party Licenses + +This page is generated when mkdocs builds. +All content here is overwritten when building the docs. +For changes to this document, please refer to [license_gen.py](../license_gen.py). diff --git a/docs/license_gen.py b/docs/license_gen.py new file mode 100644 index 0000000..2df5110 --- /dev/null +++ b/docs/license_gen.py @@ -0,0 +1,70 @@ +import mkdocs_gen_files +from subprocess import run + +FILENAME = "other-licenses.md" + +INTRO = """# Third-party Licenses + +[MIT]: https://choosealicense.com/licenses/mit +[Apache-2.0]: https://choosealicense.com/licenses/apache-2.0/ +[MPL-2.0]: https://choosealicense.com/licenses/mpl-2.0 +""" + +OPTIONAL_DEPS = """## Optional dependencies + +The following are conditionally included in binaries (using the `openssl-vendored` +feature on a case-by-case basis) because it is a dependency of +[git2](https://crates.io/crates/git2): + +- [openssl](https://crates.io/crates/openssl): Licensed under [Apache-2.0]. +- [openssl-probe](https://crates.io/crates/openssl-probe): + Dual-licensed under [Apache-2.0] or [MIT]. +""" + +BINDING_DEPS = """## Bindings' dependencies + +The python binding uses + +- [pyo3](https://crates.io/crates/pyo3): + Dual-licensed under [Apache-2.0] or [MIT]. + +The node binding uses + +- [napi](https://crates.io/crates/napi): Licensed under [MIT] +- [napi-derive](https://crates.io/crates/napi-derive): Licensed under [MIT] +""" + +with mkdocs_gen_files.open(FILENAME, "w") as io_doc: + print(INTRO, file=io_doc) + output = run( + [ + "cargo", + "tree", + "-f", + r"[{p}]({r}): Licensed under {l}", + "-e", + "normal", + "-p", + "cpp-linter", + "--depth", + "1", + ], + capture_output=True, + check=True, + ) + doc = "\n".join( + [ + "- " + + line[3:] + .replace(" MIT", " [MIT]") + .replace(" Apache-2.0", " [Apache-2.0]") + .replace(" MPL-2.0", " [MPL-2.0]") + for line in output.stdout.decode(encoding="utf-8").splitlines()[1:] + ] + ) + # print(doc) + print(doc, file=io_doc) + print(f"\n{OPTIONAL_DEPS}\n", file=io_doc) + print(f"\n{BINDING_DEPS}\n", file=io_doc) + +mkdocs_gen_files.set_edit_path(FILENAME, "license-gen.py") diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a968d56..48cbb10 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -12,6 +12,7 @@ nav: - python.md - node.md - changelog.md + - other-licenses.md theme: name: material @@ -78,6 +79,7 @@ plugins: - gen-files: scripts: - gen_cli_doc.py + - license_gen.py markdown_extensions: - pymdownx.superfences From 999088da9629fbd4e3ae8a314f178d11c31979b7 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 1 Jan 2025 16:22:57 -0800 Subject: [PATCH 26/43] docs: render licenses of deps in tables (#91) Also generates tables for the dependencies of the bindings using the `cargo tree` command. typos in bindings/node/README --- bindings/node/README.md | 10 ++--- docs/license_gen.py | 87 ++++++++++++++++++++++++++--------------- 2 files changed, 61 insertions(+), 36 deletions(-) diff --git a/bindings/node/README.md b/bindings/node/README.md index 739777a..1b69441 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -53,15 +53,15 @@ This script runs a simple test to ensure the native module was built correctly. | Name | Description | |-----:|:------------| | `__test__` | The location of the unit test(s). | -| `npm` | The required metadata for publishing platform-specific packages to npm. | +| `npm` | The required metadata for publishing platform-specific binary packages to npm. | | `src` | The location for all rust sources related to binding the cpp-linter library. | | `build.rs` | The cargo-specific build script used when compiling the binding. | | `Cargo.toml` | Metadata about the binding's rust package (which _is not_ intended to be published to crates.io). | -| `package.json` | Metadata about the npm package (platform agnostic). | +| `package.json` | Metadata about the npm package (platform agnostic - no binary). | | `cli.js` | The executable script invoked as a Command Line Interface. | -| `index.d.ts` | The generated TypeScript typing info the describes the exposing functionality in the built native module. | -| `index.js` | The generated script that delegates which platform-specific package to import. | -| `cpp-linter.x-y-z.node` | Then native module built for a specific platform (where `x-y-z` denotes the platform's name using compilation target). | +| `index.d.ts` | The generated TypeScript typing and doc info that describes the exposed API in the built native module. | +| `index.js` | The generated script that delegates which native binary (platform-specific package or dev build) to import. | +| `cpp-linter.x-y-z.node` | The native module built for a specific platform (where `x-y-z` denotes the platform's name using the compilation target). | Hidden files and folders are not described in the table above. If they are not ignored by a gitignore specification, then they should be considered diff --git a/docs/license_gen.py b/docs/license_gen.py index 2df5110..19d6731 100644 --- a/docs/license_gen.py +++ b/docs/license_gen.py @@ -1,3 +1,4 @@ +import re import mkdocs_gen_files from subprocess import run @@ -10,61 +11,85 @@ [MPL-2.0]: https://choosealicense.com/licenses/mpl-2.0 """ -OPTIONAL_DEPS = """## Optional dependencies +TABLE_HEADER = "| Dependency | License |\n|:------------|:-------|\n" + +OPTIONAL_DEPS = f"""## Optional dependencies The following are conditionally included in binaries (using the `openssl-vendored` feature on a case-by-case basis) because it is a dependency of [git2](https://crates.io/crates/git2): -- [openssl](https://crates.io/crates/openssl): Licensed under [Apache-2.0]. -- [openssl-probe](https://crates.io/crates/openssl-probe): - Dual-licensed under [Apache-2.0] or [MIT]. +{TABLE_HEADER}\ +| [openssl](https://crates.io/crates/openssl) | [Apache-2.0] | +| [openssl-probe](https://crates.io/crates/openssl-probe) | [MIT] OR [Apache-2.0] | """ -BINDING_DEPS = """## Bindings' dependencies +PY_BINDING_HEADER = f"""## Bindings' dependencies -The python binding uses +### Python binding -- [pyo3](https://crates.io/crates/pyo3): - Dual-licensed under [Apache-2.0] or [MIT]. +{TABLE_HEADER}""" -The node binding uses +JS_BINDING_HEADER = f"""### Node.js binding -- [napi](https://crates.io/crates/napi): Licensed under [MIT] -- [napi-derive](https://crates.io/crates/napi-derive): Licensed under [MIT] -""" +{TABLE_HEADER}""" -with mkdocs_gen_files.open(FILENAME, "w") as io_doc: - print(INTRO, file=io_doc) - output = run( - [ +SELF_DEP = re.compile(r"(\| \[cpp-linter v[0-9.]+[^\s]*)[^\]]+(\]\(.*)$") + + +class TreeGetter: + def __init__(self): + self.args = [ "cargo", "tree", "-f", - r"[{p}]({r}): Licensed under {l}", + r"| [{p}]({r}) | {l} |", "-e", "normal", "-p", "cpp-linter", "--depth", "1", - ], - capture_output=True, - check=True, - ) - doc = "\n".join( - [ - "- " - + line[3:] - .replace(" MIT", " [MIT]") - .replace(" Apache-2.0", " [Apache-2.0]") - .replace(" MPL-2.0", " [MPL-2.0]") - for line in output.stdout.decode(encoding="utf-8").splitlines()[1:] ] - ) + + def package(self, value: str) -> None: + self.args[7] = value + + def get_output(self) -> str: + output = run( + self.args, + capture_output=True, + check=True, + ) + result = [] + for line in output.stdout.decode(encoding="utf-8").splitlines()[1:]: + dep = ( + line[3:] + .replace(" MIT", " [MIT]") + .replace(" Apache-2.0", " [Apache-2.0]") + .replace(" MPL-2.0", " [MPL-2.0]") + .strip() + ) + self_match = SELF_DEP.match(dep) + if self_match is not None: + dep = SELF_DEP.sub(r"\1\2", dep) + result.append(dep) + return "\n".join(result) + + +with mkdocs_gen_files.open(FILENAME, "w") as io_doc: + tg = TreeGetter() + print(INTRO, file=io_doc) + doc = TABLE_HEADER + doc += tg.get_output() # print(doc) print(doc, file=io_doc) print(f"\n{OPTIONAL_DEPS}\n", file=io_doc) - print(f"\n{BINDING_DEPS}\n", file=io_doc) + tg.package("cpp-linter-py") + doc = tg.get_output() + print(f"\n{PY_BINDING_HEADER}{doc}", file=io_doc) + tg.package("cpp-linter-js") + doc = tg.get_output() + print(f"\n{JS_BINDING_HEADER}{doc}", file=io_doc) mkdocs_gen_files.set_edit_path(FILENAME, "license-gen.py") From b883ba642ebf8d283c1c45e970a06758553ca93b Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 3 Jan 2025 20:21:50 -0800 Subject: [PATCH 27/43] CI: Better Benchmark (#92) * benchmark with codspeed only run benchmark on changes that effect performance * various improvements to src ignore logger init errors * use `lines-changed-only` when getting file changes move helper function to gh-specific API --- .config/nextest.toml | 2 +- .github/workflows/benchmark.yml | 55 ++++ .github/workflows/perf-test.yml | 146 ---------- .github/workflows/perf_annotate.py | 68 ----- .gitignore | 1 + Cargo.lock | 263 +++++++++++++++++- bindings/node/Cargo.toml | 1 + bindings/python/Cargo.toml | 1 + cpp-linter/Cargo.toml | 8 + cpp-linter/benches/run.rs | 31 +++ cpp-linter/src/clang_tools/clang_format.rs | 8 +- cpp-linter/src/clang_tools/clang_tidy.rs | 24 +- cpp-linter/src/cli/mod.rs | 14 +- cpp-linter/src/cli/structs.rs | 17 +- cpp-linter/src/common_fs/file_filter.rs | 31 +-- cpp-linter/src/git.rs | 75 +++-- cpp-linter/src/logger.rs | 20 +- cpp-linter/src/rest_api/github/mod.rs | 82 ++---- .../src/rest_api/github/serde_structs.rs | 2 + .../src/rest_api/github/specific_api.rs | 77 ++++- cpp-linter/src/rest_api/mod.rs | 41 +-- cpp-linter/src/run.rs | 58 ++-- cpp-linter/tests/paginated_changed_files.rs | 7 +- .../paginated_changes/push_files_pg1.json | 5 +- cspell.config.yml | 2 + docs/Cargo.toml | 1 + 26 files changed, 630 insertions(+), 410 deletions(-) create mode 100644 .github/workflows/benchmark.yml delete mode 100644 .github/workflows/perf-test.yml delete mode 100644 .github/workflows/perf_annotate.py create mode 100644 cpp-linter/benches/run.rs diff --git a/.config/nextest.toml b/.config/nextest.toml index 00d072c..bc5838d 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -15,7 +15,7 @@ slow-timeout = "10s" # This is all tests in tests/ folder + unit test for --extra-args. default-filter = "kind(test) + test(#*use_extra_args)" -# show wich tests were skipped +# show which tests were skipped status-level = "skip" # show log output from each test diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 0000000..f6dd2c2 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,55 @@ +name: Benchmark + +on: + push: + branches: [main] + paths: + - cpp-linter/src/ + - cpp-linter/benches/ + - cpp-linter/Cargo.toml + - Cargo.toml + - Cargo.lock + - .github/workflows/benchmark.yml + tags-ignore: ['*'] + pull_request: + branches: [main] + paths: + - cpp-linter/src/ + - cpp-linter/benches/ + - cpp-linter/Cargo.toml + - Cargo.toml + - Cargo.lock + - .github/workflows/benchmark.yml + # `workflow_dispatch` allows CodSpeed to trigger back-test + # performance analysis in order to generate initial data. + workflow_dispatch: + +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # using the generated compilation database, + # we will use cpp-linter to scan libgit2 src/libgit2/**.c files. + - name: Checkout libgit2 + uses: actions/checkout@v4 + with: + repository: libgit2/libgit2 + ref: v1.8.1 + path: cpp-linter/benches/libgit2 + - name: Generate compilation database + working-directory: cpp-linter/benches/libgit2 + run: | + mkdir build && cd build + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. + - name: Install cargo-binstall + uses: cargo-bins/cargo-binstall@main + - name: Install cargo-codspeed + run: cargo binstall -y cargo-codspeed + - name: Build the benchmark target(s) + run: cargo codspeed build + - name: Run benchmarks + uses: CodSpeedHQ/action@v3 + with: + run: cargo codspeed run + token: ${{ secrets.CODSPEED_TOKEN }} diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.yml deleted file mode 100644 index f6ac7ad..0000000 --- a/.github/workflows/perf-test.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: Performance Regression - -on: - push: - branches: [main] - paths: - - cpp-linter/src/** - - cpp-linter/Cargo.toml - - Cargo.toml - - Cargo.lock - - .github/workflows/perf-test.yml - - .github/workflows/bench.py - tags-ignore: ['*'] - pull_request: - branches: [main] - paths: - - cpp-linter/src/** - - cpp-linter/Cargo.toml - - Cargo.toml - - Cargo.lock - - .github/workflows/perf* -jobs: - build: - name: Build ${{ matrix.name }} - runs-on: ubuntu-latest - strategy: - matrix: - include: - - commit: ${{ github.sha }} - name: current - - commit: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} - name: previous - outputs: - cached-previous: ${{ steps.is-cached-previous.outputs.is-cached == 'true' && steps.validate.outputs.cache-valid != 'false' }} - cached-current: ${{ steps.is-cached-current.outputs.is-cached == 'true' && steps.validate.outputs.cache-valid != 'false' }} - env: - BIN: target/release/cpp-linter - steps: - - name: Checkout ${{ matrix.name }} - uses: actions/checkout@v4 - with: - ref: ${{ matrix.commit }} - - name: Cache base ref build - uses: actions/cache@v4 - id: cache - with: - key: bin-cache-${{ hashFiles('cpp-linter/src/**', 'Cargo.toml', 'Cargo.lock', 'cpp-linter/Cargo.toml') }} - path: ${{ env.BIN }} - - name: Is previous cached? - if: matrix.name == 'previous' - id: is-cached-previous - run: echo "is-cached=${{ steps.cache.outputs.cache-hit }}" >> "$GITHUB_OUTPUT" - - name: Is current cached? - if: matrix.name == 'current' - id: is-cached-current - run: echo "is-cached=${{ steps.cache.outputs.cache-hit }}" >> "$GITHUB_OUTPUT" - - name: Validate cached binary - if: steps.cache.outputs.cache-hit == 'true' - id: validate - run: | - chmod +x ${{ env.BIN }} - if ! ${{ env.BIN }} version; then - echo "Cached binary is invalid, rebuilding..." - echo "cache-valid=false" >> "$GITHUB_OUTPUT" - fi - - run: rustup update --no-self-update - if: steps.cache.outputs.cache-hit != 'true' || steps.validate.outputs.cache-valid == 'false' - - run: cargo build --bin cpp-linter --release - if: steps.cache.outputs.cache-hit != 'true' || steps.validate.outputs.cache-valid == 'false' - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: ${{ env.BIN }} - - benchmark: - name: Measure Performance Difference - needs: [build] - if: ${{ !needs.build.outputs.cached-current || !needs.build.outputs.cached-previous }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Checkout libgit2 - uses: actions/checkout@v4 - with: - repository: libgit2/libgit2 - ref: v1.8.1 - path: libgit2 - - name: Download built binaries - uses: actions/download-artifact@v4 - - name: Make binaries executable - run: chmod +x ./*/cpp-linter - - name: Generate compilation database - working-directory: libgit2 - run: | - mkdir build && cd build - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. - - name: Install cargo-binstall - uses: cargo-bins/cargo-binstall@main - - name: Install hyperfine - run: cargo binstall -y hyperfine - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: pip install 'cpp-linter < 2.0' - - name: Warmup and list files - env: - CPP_LINTER_COLOR: true - working-directory: libgit2 - # Use previous build for stability. This will - # - create the .cpp-linter_cache folder - # - list the files concerning the benchmark test - # NOTE: This does not actually invoke clang tools. - run: ../previous/cpp-linter -l 0 -p build -i='|!src/libgit2' -s="" -c="-*" -e c - - name: Run hyperfine tool - # using the generated compilation database, - # we will use cpp-linter (both builds) to scan libgit2 src/libgit2/**.c files. - working-directory: libgit2 - run: >- - hyperfine - --runs 2 - --style color - --export-markdown '${{ runner.temp }}/benchmark.md' - --export-json '${{ runner.temp }}/benchmark.json' - --command-name=previous-build - "../previous/cpp-linter -l 0 -p build -i='|!src/libgit2' -e c" - --command-name=current-build - "../current/cpp-linter -l 0 -p build -i='|!src/libgit2' -e c" - --command-name=pure-python - "cpp-linter -l false -j 0 -p build -i='|!src/libgit2' -e c" - - name: Append report to job summary - run: cat ${{ runner.temp }}/benchmark.md >> "$GITHUB_STEP_SUMMARY" - - name: Upload JSON results - uses: actions/upload-artifact@v4 - with: - name: benchmark-json - path: ${{ runner.temp }}/benchmark.json - - name: Annotate summary - run: python .github/workflows/perf_annotate.py "${{ runner.temp }}/benchmark.json" - - report-no-src-changes: - runs-on: ubuntu-latest - needs: [build] - if: needs.build.outputs.cached-current && needs.build.outputs.cached-previous - steps: - - run: echo "::notice title=No benchmark performed::No changes to cpp-linter source code detected." diff --git a/.github/workflows/perf_annotate.py b/.github/workflows/perf_annotate.py deleted file mode 100644 index 072c9b0..0000000 --- a/.github/workflows/perf_annotate.py +++ /dev/null @@ -1,68 +0,0 @@ -import argparse -import json -from os import environ -from pathlib import Path -from typing import List, Any, Dict, cast - - -class Args(argparse.Namespace): - json_file: Path - - -def main(): - arg_parser = argparse.ArgumentParser() - arg_parser.add_argument("json_file", type=Path) - arg_parser.parse_args(namespace=Args) - - bench_json = Args.json_file.read_text(encoding="utf-8") - bench: List[Dict[str, Any]] = json.loads(bench_json)["results"] - - assert len(bench) == 3 - old_mean, new_mean = (None, None) - for result in bench: - mean = cast(float, result["mean"]) - if result["command"] == "previous-build": - old_mean = mean - elif result["command"] == "current-build": - new_mean = mean - - assert old_mean is not None, "benchmark report has no result for previous-build" - assert new_mean is not None, "benchmark report has no result for current-build" - - diff = round(new_mean - old_mean, 2) - scalar = int((new_mean - old_mean) / old_mean * 100) - - output = [] - if diff > 2: - output.extend( - [ - "> [!CAUTION]", - "> Detected a performance regression in new changes:", - ] - ) - elif diff < -2: - output.extend( - [ - "> [!TIP]", - "> Detected a performance improvement in new changes:", - ] - ) - else: - output.extend( - [ - "> [!NOTE]", - "> Determined a negligible difference in performance with new changes:", - ] - ) - output[-1] += f" {diff}s ({scalar} %)" - annotation = "\n".join(output) - - if "GITHUB_STEP_SUMMARY" in environ: - with open(environ["GITHUB_STEP_SUMMARY"], "a") as summary: - summary.write(f"\n{annotation}\n") - else: - print(annotation) - - -if __name__ == "__main__": - main() diff --git a/.gitignore b/.gitignore index 4c683a4..f79fbe0 100644 --- a/.gitignore +++ b/.gitignore @@ -346,3 +346,4 @@ docs/site cpp-linter-py/docs/cli_args.rst lcov.info coverage.json +cpp-linter/benches/libgit2/ diff --git a/Cargo.lock b/Cargo.lock index b09bf4a..8acf807 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,6 +41,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "anstream" version = "0.6.15" @@ -163,6 +169,12 @@ version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" version = "1.1.22" @@ -194,6 +206,33 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "clap" version = "4.5.23" @@ -229,6 +268,30 @@ dependencies = [ "pyo3", ] +[[package]] +name = "codspeed" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "450a0e9df9df1c154156f4344f99d8f6f6e69d0fc4de96ef6e2e68b2ec3bce97" +dependencies = [ + "colored", + "libc", + "serde_json", +] + +[[package]] +name = "codspeed-criterion-compat" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb1a6cb9c20e177fde58cdef97c1c7c9264eb1424fe45c4fccedc2fb078a569" +dependencies = [ + "codspeed", + "colored", + "criterion", + "futures", + "tokio", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -277,6 +340,7 @@ dependencies = [ "anyhow", "chrono", "clap", + "codspeed-criterion-compat", "colored", "fast-glob", "futures", @@ -319,6 +383,75 @@ dependencies = [ "tokio", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "tokio", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "ctor" version = "0.2.8" @@ -542,6 +675,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -560,6 +703,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "home" version = "0.5.9" @@ -743,12 +892,32 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -922,7 +1091,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1054,6 +1223,12 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "oorandom" +version = "11.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" + [[package]] name = "openssl" version = "0.10.68" @@ -1155,6 +1330,34 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + [[package]] name = "portable-atomic" version = "1.9.0" @@ -1281,6 +1484,26 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.5.6" @@ -1442,6 +1665,15 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.24" @@ -1677,6 +1909,16 @@ dependencies = [ "syn", ] +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1858,6 +2100,16 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -1962,6 +2214,15 @@ dependencies = [ "winsafe", ] +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "windows-core" version = "0.52.0" diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index 1ca03ac..d80c6ff 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -13,6 +13,7 @@ license.workspace = true [lib] crate-type = ["cdylib"] +bench = false [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index f57d3e3..d15775b 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -14,6 +14,7 @@ license.workspace = true [lib] name = "cpp_linter" crate-type = ["cdylib"] +bench = false [dependencies] pyo3 = { version = "0.23.3", features = ["extension-module"] } diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 0e7ed53..9ac777e 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -37,14 +37,22 @@ tokio-stream = "0.1.17" which = "7.0.0" [dev-dependencies] +criterion = { version = "2.7.2", package = "codspeed-criterion-compat", features=["async_tokio"] } mockito = "1.6.1" tempfile = "3.14.0" [features] openssl-vendored = ["dep:openssl", "dep:openssl-probe"] +[lib] +bench = false + [[bin]] name = "cpp-linter" path = "src/main.rs" test = false bench = false + +[[bench]] +name = "run" +harness = false diff --git a/cpp-linter/benches/run.rs b/cpp-linter/benches/run.rs new file mode 100644 index 0000000..f202b55 --- /dev/null +++ b/cpp-linter/benches/run.rs @@ -0,0 +1,31 @@ +use cpp_linter::run::run_main; +use criterion::Criterion; +use criterion::{criterion_group, criterion_main}; + +// This is a struct that tells Criterion.rs to use the tokio crate's multi-thread executor +use tokio::runtime::Runtime; +async fn run() -> Result<(), anyhow::Error> { + let args = vec![ + "cpp-linter".to_string(), + "--lines-changed-only".to_string(), + "false".to_string(), + "--database".to_string(), + "benches/libgit2/build".to_string(), + "--ignore".to_string(), + "|!benches/libgit2/src/libgit2".to_string(), + "--extensions".to_string(), + "c".to_string(), + ]; + run_main(args).await +} + +fn bench1(c: &mut Criterion) { + c.bench_function("scan libgit2", |b| { + // Insert a call to `to_async` to convert the bencher to async mode. + // The timing loops are the same as with the normal bencher. + b.to_async(Runtime::new().unwrap()).iter(run); + }); +} + +criterion_group!(benches, bench1); +criterion_main!(benches); diff --git a/cpp-linter/src/clang_tools/clang_format.rs b/cpp-linter/src/clang_tools/clang_format.rs index a3c82d3..ba0b1d9 100644 --- a/cpp-linter/src/clang_tools/clang_format.rs +++ b/cpp-linter/src/clang_tools/clang_format.rs @@ -135,8 +135,8 @@ pub fn run_clang_format( .to_str() .unwrap_or_default(), cmd.get_args() - .map(|a| a.to_str().unwrap()) - .collect::>() + .map(|a| a.to_string_lossy()) + .collect::>() .join(" ") ), )); @@ -153,8 +153,8 @@ pub fn run_clang_format( "Running \"{} {}\"", cmd.get_program().to_string_lossy(), cmd.get_args() - .map(|x| x.to_str().unwrap()) - .collect::>() + .map(|x| x.to_string_lossy()) + .collect::>() .join(" ") ), )); diff --git a/cpp-linter/src/clang_tools/clang_tidy.rs b/cpp-linter/src/clang_tools/clang_tidy.rs index 988dc77..fd39b75 100644 --- a/cpp-linter/src/clang_tools/clang_tidy.rs +++ b/cpp-linter/src/clang_tools/clang_tidy.rs @@ -264,15 +264,17 @@ pub fn run_clang_tidy( let file_name = file.name.to_string_lossy().to_string(); if clang_params.lines_changed_only != LinesChangedOnly::Off { let ranges = file.get_ranges(&clang_params.lines_changed_only); - let filter = format!( - "[{{\"name\":{:?},\"lines\":{:?}}}]", - &file_name.replace('/', if OS == "windows" { "\\" } else { "/" }), - ranges - .iter() - .map(|r| [r.start(), r.end()]) - .collect::>() - ); - cmd.args(["--line-filter", filter.as_str()]); + if !ranges.is_empty() { + let filter = format!( + "[{{\"name\":{:?},\"lines\":{:?}}}]", + &file_name.replace('/', if OS == "windows" { "\\" } else { "/" }), + ranges + .iter() + .map(|r| [r.start(), r.end()]) + .collect::>() + ); + cmd.args(["--line-filter", filter.as_str()]); + } } let mut original_content = None; if clang_params.tidy_review { @@ -294,8 +296,8 @@ pub fn run_clang_tidy( "Running \"{} {}\"", cmd.get_program().to_string_lossy(), cmd.get_args() - .map(|x| x.to_str().unwrap()) - .collect::>() + .map(|x| x.to_string_lossy()) + .collect::>() .join(" ") ), )); diff --git a/cpp-linter/src/cli/mod.rs b/cpp-linter/src/cli/mod.rs index 1e01ca1..630f62b 100644 --- a/cpp-linter/src/cli/mod.rs +++ b/cpp-linter/src/cli/mod.rs @@ -390,14 +390,13 @@ pub fn convert_extra_arg_val(args: &ArgMatches) -> Vec { let mut val = args.get_many::("extra-arg").unwrap_or_default(); if val.len() == 1 { // specified once; split and return result - return val - .next() + val.next() .unwrap() .trim_matches('\'') .trim_matches('"') .split(' ') .map(|i| i.to_string()) - .collect(); + .collect() } else { // specified multiple times; just return val.map(|i| i.to_string()).collect() @@ -408,13 +407,20 @@ pub fn convert_extra_arg_val(args: &ArgMatches) -> Vec { mod test { use clap::ArgMatches; - use super::{convert_extra_arg_val, get_arg_parser}; + use super::{convert_extra_arg_val, get_arg_parser, Cli}; fn parser_args(input: Vec<&str>) -> ArgMatches { let arg_parser = get_arg_parser(); arg_parser.get_matches_from(input) } + #[test] + fn ignore_blank_extensions() { + let args = parser_args(vec!["cpp-linter", "-e", "c,,h"]); + let cli = Cli::from(&args); + assert!(!cli.extensions.contains(&"".to_string())); + } + #[test] fn extra_arg_0() { let args = parser_args(vec!["cpp-linter"]); diff --git a/cpp-linter/src/cli/structs.rs b/cpp-linter/src/cli/structs.rs index 5bc876b..071ee5c 100644 --- a/cpp-linter/src/cli/structs.rs +++ b/cpp-linter/src/cli/structs.rs @@ -25,6 +25,14 @@ impl LinesChangedOnly { _ => LinesChangedOnly::Off, } } + + pub fn is_change_valid(&self, added_lines: bool, diff_chunks: bool) -> bool { + match self { + LinesChangedOnly::Off => true, + LinesChangedOnly::Diff => diff_chunks, + LinesChangedOnly::On => added_lines, + } + } } impl Display for LinesChangedOnly { @@ -91,7 +99,14 @@ impl From<&ArgMatches> for Cli { let extensions = args .get_many::("extensions") .unwrap() - .map(|s| s.to_string()) + .filter_map(|s| { + if s.is_empty() { + // filter out blank extensions here + None + } else { + Some(s.to_string()) + } + }) .collect::>(); Self { diff --git a/cpp-linter/src/common_fs/file_filter.rs b/cpp-linter/src/common_fs/file_filter.rs index 88a5521..a8ba786 100644 --- a/cpp-linter/src/common_fs/file_filter.rs +++ b/cpp-linter/src/common_fs/file_filter.rs @@ -105,10 +105,15 @@ impl FileFilter { let glob_matched = glob_match(pattern, file_name.to_string_lossy().to_string().as_str()); let pat = PathBuf::from(&pattern); - if glob_matched + if pattern.as_str() == "./" + || glob_matched || (pat.is_file() && file_name == pat) || (pat.is_dir() && file_name.starts_with(pat)) { + log::debug!( + "file {file_name:?} is in {}ignored with domain {pattern:?}.", + if is_ignored { "" } else { "not " } + ); return true; } } @@ -124,23 +129,17 @@ impl FileFilter { /// - Is `entry` specified in the list of explicitly `not_ignored` paths? (supersedes /// specified `ignored` paths) pub fn is_source_or_ignored(&self, entry: &Path) -> bool { - let extension = entry.extension(); - if extension.is_none() { + let extension = entry + .extension() + .unwrap_or_default() // allow for matching files with no extension + .to_string_lossy() + .to_string(); + if !self.extensions.contains(&extension) { return false; } - let mut is_ignored = true; - for ext in &self.extensions { - if ext == &extension.unwrap().to_os_string().into_string().unwrap() { - is_ignored = false; - break; - } - } - if !is_ignored { - let is_in_ignored = self.is_file_in_list(entry, true); - let is_in_not_ignored = self.is_file_in_list(entry, false); - if is_in_not_ignored || !is_in_ignored { - return true; - } + let is_in_not_ignored = self.is_file_in_list(entry, false); + if is_in_not_ignored || !self.is_file_in_list(entry, true) { + return true; } false } diff --git a/cpp-linter/src/git.rs b/cpp-linter/src/git.rs index 030ed65..e777f23 100644 --- a/cpp-linter/src/git.rs +++ b/cpp-linter/src/git.rs @@ -15,7 +15,10 @@ use anyhow::{Context, Result}; use git2::{Diff, Error, Patch, Repository}; // project specific modules/crates -use crate::common_fs::{FileFilter, FileObj}; +use crate::{ + cli::LinesChangedOnly, + common_fs::{FileFilter, FileObj}, +}; /// This (re-)initializes the repository located in the specified `path`. /// @@ -61,6 +64,10 @@ pub fn get_diff(repo: &Repository) -> Result { } } + // RARE BUG when `head` is the first commit in the repo! Affects local-only runs. + // > panicked at cpp-linter\src\git.rs:73:43: + // > called `Result::unwrap()` on an `Err` value: + // > Error { code: -3, class: 3, message: "parent 0 does not exist" } if has_staged_files { // get diff for staged files only repo.diff_tree_to_index(Some(&head), None, None) @@ -100,22 +107,26 @@ fn parse_patch(patch: &Patch) -> (Vec, Vec>) { /// /// The specified list of `extensions`, `ignored` and `not_ignored` files are used as /// filters to expedite the process and only focus on the data cpp_linter can use. -pub fn parse_diff(diff: &git2::Diff, file_filter: &FileFilter) -> Vec { +pub fn parse_diff( + diff: &git2::Diff, + file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, +) -> Vec { let mut files: Vec = Vec::new(); for file_idx in 0..diff.deltas().count() { let diff_delta = diff.get_delta(file_idx).unwrap(); let file_path = diff_delta.new_file().path().unwrap().to_path_buf(); - if [ - git2::Delta::Added, - git2::Delta::Modified, - git2::Delta::Renamed, - ] - .contains(&diff_delta.status()) - && file_filter.is_source_or_ignored(&file_path) + if matches!( + diff_delta.status(), + git2::Delta::Added | git2::Delta::Modified | git2::Delta::Renamed, + ) && file_filter.is_source_or_ignored(&file_path) { let (added_lines, diff_chunks) = parse_patch(&Patch::from_diff(diff, file_idx).unwrap().unwrap()); - files.push(FileObj::from(file_path, added_lines, diff_chunks)); + if lines_changed_only.is_change_valid(!added_lines.is_empty(), !diff_chunks.is_empty()) + { + files.push(FileObj::from(file_path, added_lines, diff_chunks)); + } } } files @@ -128,12 +139,20 @@ pub fn parse_diff(diff: &git2::Diff, file_filter: &FileFilter) -> Vec { /// log warning and error are output when this occurs. Please report this instance for /// troubleshooting/diagnosis as this likely means the diff is malformed or there is a /// bug in libgit2 source. -pub fn parse_diff_from_buf(buff: &[u8], file_filter: &FileFilter) -> Vec { +pub fn parse_diff_from_buf( + buff: &[u8], + file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, +) -> Vec { if let Ok(diff_obj) = &Diff::from_buffer(buff) { - parse_diff(diff_obj, file_filter) + parse_diff(diff_obj, file_filter, lines_changed_only) } else { log::warn!("libgit2 failed to parse the diff"); - brute_force_parse_diff::parse_diff(&String::from_utf8_lossy(buff), file_filter) + brute_force_parse_diff::parse_diff( + &String::from_utf8_lossy(buff), + file_filter, + lines_changed_only, + ) } } @@ -149,7 +168,10 @@ mod brute_force_parse_diff { use regex::Regex; use std::{ops::RangeInclusive, path::PathBuf}; - use crate::common_fs::{FileFilter, FileObj}; + use crate::{ + cli::LinesChangedOnly, + common_fs::{FileFilter, FileObj}, + }; fn get_filename_from_front_matter(front_matter: &str) -> Option<&str> { let diff_file_name = Regex::new(r"(?m)^\+\+\+\sb?/(.*)$").unwrap(); @@ -212,7 +234,11 @@ mod brute_force_parse_diff { (additions, diff_chunks) } - pub fn parse_diff(diff: &str, file_filter: &FileFilter) -> Vec { + pub fn parse_diff( + diff: &str, + file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, + ) -> Vec { log::error!("Using brute force diff parsing!"); let mut results = Vec::new(); let diff_file_delimiter = Regex::new(r"(?m)^diff --git a/.*$").unwrap(); @@ -233,7 +259,11 @@ mod brute_force_parse_diff { let file_path = PathBuf::from(file_name); if file_filter.is_source_or_ignored(&file_path) { let (added_lines, diff_chunks) = parse_patch(&file_diff[hunk_start..]); - results.push(FileObj::from(file_path, added_lines, diff_chunks)); + if lines_changed_only + .is_change_valid(!added_lines.is_empty(), !diff_chunks.is_empty()) + { + results.push(FileObj::from(file_path, added_lines, diff_chunks)); + } } } // } else { @@ -250,6 +280,7 @@ mod brute_force_parse_diff { use super::parse_diff; use crate::{ + cli::LinesChangedOnly, common_fs::{FileFilter, FileObj}, git::parse_diff_from_buf, }; @@ -277,6 +308,7 @@ rename to /tests/demo/some source.c let files = parse_diff_from_buf( diff_buf, &FileFilter::new(&["target".to_string()], vec!["c".to_string()]), + &LinesChangedOnly::Off, ); assert!(!files.is_empty()); assert!(files @@ -292,6 +324,7 @@ rename to /tests/demo/some source.c let files = parse_diff_from_buf( diff_buf, &FileFilter::new(&["target".to_string()], vec!["c".to_string()]), + &LinesChangedOnly::Off, ); assert!(!files.is_empty()); } @@ -304,8 +337,13 @@ rename to /tests/demo/some source.c parse_diff_from_buf( buf.as_bytes(), &FileFilter::new(&ignore, extensions.to_owned()), + &LinesChangedOnly::Off, + ), + parse_diff( + buf, + &FileFilter::new(&ignore, extensions.to_owned()), + &LinesChangedOnly::Off, ), - parse_diff(buf, &FileFilter::new(&ignore, extensions.to_owned())), ) } @@ -380,6 +418,7 @@ mod test { use tempfile::{tempdir, TempDir}; use crate::{ + cli::LinesChangedOnly, common_fs::FileFilter, rest_api::{github::GithubApiClient, RestApiClient}, }; @@ -409,7 +448,7 @@ mod test { env::set_var("CI", "false"); // avoid use of REST API when testing in CI rest_api_client .unwrap() - .get_list_of_changed_files(&file_filter) + .get_list_of_changed_files(&file_filter, &LinesChangedOnly::Off) .await .unwrap() } diff --git a/cpp-linter/src/logger.rs b/cpp-linter/src/logger.rs index ca2f834..1c1290e 100644 --- a/cpp-linter/src/logger.rs +++ b/cpp-linter/src/logger.rs @@ -2,7 +2,6 @@ use std::env; -use anyhow::{Error, Result}; use colored::{control::set_override, Colorize}; use log::{Level, LevelFilter, Metadata, Record}; @@ -46,8 +45,9 @@ impl log::Log for SimpleLogger { /// A function to initialize the private `LOGGER`. /// /// The logging level defaults to [`LevelFilter::Info`]. -/// Returns a [`SetLoggerError`](struct@log::SetLoggerError) if the `LOGGER` is already initialized. -pub fn init() -> Result<()> { +/// This logs a debug message about [`SetLoggerError`](struct@log::SetLoggerError) +/// if the `LOGGER` is already initialized. +pub fn try_init() { let logger: SimpleLogger = SimpleLogger; if matches!( env::var("CPP_LINTER_COLOR").as_deref(), @@ -55,21 +55,25 @@ pub fn init() -> Result<()> { ) { set_override(true); } - log::set_boxed_logger(Box::new(logger)) - .map(|()| log::set_max_level(LevelFilter::Info)) - .map_err(Error::from) + if let Err(e) = + log::set_boxed_logger(Box::new(logger)).map(|()| log::set_max_level(LevelFilter::Info)) + { + // logger singleton already instantiated. + // we'll just use whatever the current config is. + log::debug!("{e:?}"); + } } #[cfg(test)] mod test { use std::env; - use super::{init, SimpleLogger}; + use super::{try_init, SimpleLogger}; #[test] fn trace_log() { env::set_var("CPP_LINTER_COLOR", "true"); - init().unwrap_or(()); + try_init(); assert!(SimpleLogger::level_color(&log::Level::Trace).contains("TRACE")); log::set_max_level(log::LevelFilter::Trace); log::trace!("A dummy log statement for code coverage"); diff --git a/cpp-linter/src/rest_api/github/mod.rs b/cpp-linter/src/rest_api/github/mod.rs index 500d7f6..05b5a61 100644 --- a/cpp-linter/src/rest_api/github/mod.rs +++ b/cpp-linter/src/rest_api/github/mod.rs @@ -14,21 +14,19 @@ use reqwest::{ header::{HeaderMap, HeaderValue, AUTHORIZATION}, Client, Method, Url, }; -use serde_json; // project specific modules/crates use super::{RestApiClient, RestApiRateLimitHeaders}; use crate::clang_tools::clang_format::tally_format_advice; use crate::clang_tools::clang_tidy::tally_tidy_advice; use crate::clang_tools::ClangVersions; -use crate::cli::{FeedbackInput, ThreadComments}; +use crate::cli::{FeedbackInput, LinesChangedOnly, ThreadComments}; use crate::common_fs::{FileFilter, FileObj}; use crate::git::{get_diff, open_repo, parse_diff, parse_diff_from_buf}; // private submodules. mod serde_structs; mod specific_api; -use serde_structs::{GithubChangedFile, PushEventFiles}; /// A structure to work with Github REST API. pub struct GithubApiClient { @@ -121,7 +119,11 @@ impl RestApiClient for GithubApiClient { Ok(headers) } - async fn get_list_of_changed_files(&self, file_filter: &FileFilter) -> Result> { + async fn get_list_of_changed_files( + &self, + file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, + ) -> Result> { if env::var("CI").is_ok_and(|val| val.as_str() == "true") && self.repo.is_some() && self.sha.is_some() @@ -153,9 +155,13 @@ impl RestApiClient for GithubApiClient { 0, ) .await - .with_context(|| "Failed to get list of changed files from GitHub server.")?; + .with_context(|| "Failed to get list of changed files.")?; if response.status().is_success() { - Ok(parse_diff_from_buf(&response.bytes().await?, file_filter)) + Ok(parse_diff_from_buf( + &response.bytes().await?, + file_filter, + lines_changed_only, + )) } else { let endpoint = if is_pr { Url::parse(format!("{}/files", url.as_str()).as_str())? @@ -164,7 +170,7 @@ impl RestApiClient for GithubApiClient { }; Self::log_response(response, "Failed to get full diff for event").await; log::debug!("Trying paginated request to {}", endpoint.as_str()); - self.get_changed_files_paginated(endpoint, file_filter) + self.get_changed_files_paginated(endpoint, file_filter, lines_changed_only) .await } } else { @@ -172,61 +178,11 @@ impl RestApiClient for GithubApiClient { let repo = open_repo(".").with_context(|| { "Please ensure the repository is checked out before running cpp-linter." })?; - let list = parse_diff(&get_diff(&repo)?, file_filter); + let list = parse_diff(&get_diff(&repo)?, file_filter, lines_changed_only); Ok(list) } } - async fn get_changed_files_paginated( - &self, - url: Url, - file_filter: &FileFilter, - ) -> Result> { - let mut url = Some(Url::parse_with_params(url.as_str(), &[("page", "1")])?); - let mut files = vec![]; - while let Some(ref endpoint) = url { - let request = - Self::make_api_request(&self.client, endpoint.as_str(), Method::GET, None, None)?; - let response = Self::send_api_request( - self.client.clone(), - request, - self.rate_limit_headers.clone(), - 0, - ) - .await; - if let Ok(response) = response { - url = Self::try_next_page(response.headers()); - let files_list = if self.event_name != "pull_request" { - let json_value: PushEventFiles = serde_json::from_str(&response.text().await?) - .with_context(|| { - "Failed to deserialize list of changed files from json response" - })?; - json_value.files - } else { - serde_json::from_str::>(&response.text().await?) - .with_context(|| { - "Failed to deserialize list of file changes from Pull Request event." - })? - }; - for file in files_list { - if let Some(patch) = file.patch { - let diff = format!( - "diff --git a/{old} b/{new}\n--- a/{old}\n+++ b/{new}\n{patch}", - old = file.previous_filename.unwrap_or(file.filename.clone()), - new = file.filename, - ); - if let Some(file_obj) = - parse_diff_from_buf(diff.as_bytes(), file_filter).first() - { - files.push(file_obj.to_owned()); - } - } - } - } - } - Ok(files) - } - async fn post_feedback( &self, files: &[Arc>], @@ -241,7 +197,7 @@ impl RestApiClient for GithubApiClient { self.post_annotations(files, feedback_inputs.style.as_str()); } if feedback_inputs.step_summary { - comment = Some(self.make_comment( + comment = Some(Self::make_comment( files, format_checks_failed, tidy_checks_failed, @@ -259,7 +215,7 @@ impl RestApiClient for GithubApiClient { if feedback_inputs.thread_comments != ThreadComments::Off { // post thread comment for PR or push event if comment.as_ref().is_some_and(|c| c.len() > 65535) || comment.is_none() { - comment = Some(self.make_comment( + comment = Some(Self::make_comment( files, format_checks_failed, tidy_checks_failed, @@ -319,7 +275,7 @@ mod test { clang_tidy::{TidyAdvice, TidyNotification}, ClangVersions, }, - cli::FeedbackInput, + cli::{FeedbackInput, LinesChangedOnly}, common_fs::{FileFilter, FileObj}, logger, rest_api::{RestApiClient, USER_OUTREACH}, @@ -334,7 +290,7 @@ mod test { ) -> (String, String) { let tmp_dir = tempdir().unwrap(); let rest_api_client = GithubApiClient::new().unwrap(); - logger::init().unwrap(); + logger::try_init(); if env::var("ACTIONS_STEP_DEBUG").is_ok_and(|var| var == "true") { assert!(rest_api_client.debug_enabled); log::set_max_level(log::LevelFilter::Debug); @@ -478,7 +434,7 @@ mod test { env::set_current_dir(tmp_dir.path()).unwrap(); let rest_client = GithubApiClient::new().unwrap(); let files = rest_client - .get_list_of_changed_files(&FileFilter::new(&[], vec![])) + .get_list_of_changed_files(&FileFilter::new(&[], vec![]), &LinesChangedOnly::Off) .await; assert!(files.is_err()) } diff --git a/cpp-linter/src/rest_api/github/serde_structs.rs b/cpp-linter/src/rest_api/github/serde_structs.rs index 9e0a56e..e34e3a0 100644 --- a/cpp-linter/src/rest_api/github/serde_structs.rs +++ b/cpp-linter/src/rest_api/github/serde_structs.rs @@ -49,6 +49,8 @@ pub struct GithubChangedFile { pub previous_filename: Option, /// The individual patch that describes the file's changes. pub patch: Option, + /// The number of changes to the file contents. + pub changes: i64, } /// A structure for deserializing a Push event's changed files. diff --git a/cpp-linter/src/rest_api/github/specific_api.rs b/cpp-linter/src/rest_api/github/specific_api.rs index be367f3..aa86d5f 100644 --- a/cpp-linter/src/rest_api/github/specific_api.rs +++ b/cpp-linter/src/rest_api/github/specific_api.rs @@ -5,6 +5,7 @@ use std::{ env, fs::OpenOptions, io::{Read, Write}, + path::{Path, PathBuf}, sync::{Arc, Mutex}, }; @@ -13,15 +14,16 @@ use reqwest::{Client, Method, Url}; use crate::{ clang_tools::{clang_format::summarize_style, ClangVersions, ReviewComments}, - cli::FeedbackInput, - common_fs::FileObj, + cli::{FeedbackInput, LinesChangedOnly}, + common_fs::{FileFilter, FileObj}, + git::parse_diff_from_buf, rest_api::{RestApiRateLimitHeaders, COMMENT_MARKER, USER_AGENT}, }; use super::{ serde_structs::{ - FullReview, PullRequestInfo, ReviewComment, ReviewDiffComment, ThreadComment, - REVIEW_DISMISSAL, + FullReview, GithubChangedFile, PullRequestInfo, PushEventFiles, ReviewComment, + ReviewDiffComment, ThreadComment, REVIEW_DISMISSAL, }, GithubApiClient, RestApiClient, }; @@ -77,6 +79,73 @@ impl GithubApiClient { }) } + /// A way to get the list of changed files using REST API calls that employ a paginated response. + /// + /// This is a helper to [`Self::get_list_of_changed_files()`] but takes a formulated `url` + /// endpoint based on the context of the triggering CI event. + pub(super) async fn get_changed_files_paginated( + &self, + url: Url, + file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, + ) -> Result> { + let mut url = Some(Url::parse_with_params(url.as_str(), &[("page", "1")])?); + let mut files = vec![]; + while let Some(ref endpoint) = url { + let request = + Self::make_api_request(&self.client, endpoint.as_str(), Method::GET, None, None)?; + let response = Self::send_api_request( + self.client.clone(), + request, + self.rate_limit_headers.clone(), + 0, + ) + .await + .with_context(|| "Failed to get paginated list of changed files")?; + url = Self::try_next_page(response.headers()); + let files_list = if self.event_name != "pull_request" { + let json_value: PushEventFiles = serde_json::from_str(&response.text().await?) + .with_context(|| { + "Failed to deserialize list of changed files from json response" + })?; + json_value.files + } else { + serde_json::from_str::>(&response.text().await?) + .with_context(|| { + "Failed to deserialize list of file changes from Pull Request event." + })? + }; + for file in files_list { + let ext = Path::new(&file.filename).extension().unwrap_or_default(); + if !file_filter + .extensions + .contains(&ext.to_string_lossy().to_string()) + { + continue; + } + if let Some(patch) = file.patch { + let diff = format!( + "diff --git a/{old} b/{new}\n--- a/{old}\n+++ b/{new}\n{patch}\n", + old = file.previous_filename.unwrap_or(file.filename.clone()), + new = file.filename, + ); + if let Some(file_obj) = + parse_diff_from_buf(diff.as_bytes(), file_filter, lines_changed_only) + .first() + { + files.push(file_obj.to_owned()); + } + } else if file.changes == 0 { + // file may have been only renamed. + // include it in case files-changed-only is enabled. + files.push(FileObj::new(PathBuf::from(file.filename))); + } + // else changes are too big or we don't care + } + } + Ok(files) + } + /// Append step summary to CI workflow's summary page. pub fn post_step_summary(&self, comment: &String) { if let Ok(gh_out) = env::var("GITHUB_STEP_SUMMARY") { diff --git a/cpp-linter/src/rest_api/mod.rs b/cpp-linter/src/rest_api/mod.rs index 198c5c6..059ea9b 100644 --- a/cpp-linter/src/rest_api/mod.rs +++ b/cpp-linter/src/rest_api/mod.rs @@ -18,7 +18,7 @@ use reqwest::{Client, IntoUrl, Method, Request, Response, Url}; // project specific modules pub mod github; use crate::clang_tools::ClangVersions; -use crate::cli::FeedbackInput; +use crate::cli::{FeedbackInput, LinesChangedOnly}; use crate::common_fs::{FileFilter, FileObj}; pub static COMMENT_MARKER: &str = "\n"; @@ -209,16 +209,7 @@ pub trait RestApiClient { fn get_list_of_changed_files( &self, file_filter: &FileFilter, - ) -> impl Future>>; - - /// A way to get the list of changed files using REST API calls that employ a paginated response. - /// - /// This is a helper to [`RestApiClient::get_list_of_changed_files()`] but takes a formulated URL - /// endpoint based on the context of the triggering CI event. - fn get_changed_files_paginated( - &self, - url: Url, - file_filter: &FileFilter, + lines_changed_only: &LinesChangedOnly, ) -> impl Future>>; /// Makes a comment in MarkDown syntax based on the concerns in `format_advice` and @@ -230,7 +221,6 @@ pub trait RestApiClient { /// Returns the markdown comment as a string as well as the total count of /// `format_checks_failed` and `tidy_checks_failed` (in respective order). fn make_comment( - &self, files: &[Arc>], format_checks_failed: u64, tidy_checks_failed: u64, @@ -415,12 +405,13 @@ mod test { use anyhow::{anyhow, Result}; use chrono::Utc; use mockito::{Matcher, Server}; + use reqwest::Method; use reqwest::{ header::{HeaderMap, HeaderValue}, Client, }; - use reqwest::{Method, Url}; + use crate::cli::LinesChangedOnly; use crate::{ clang_tools::ClangVersions, cli::FeedbackInput, @@ -451,14 +442,7 @@ mod test { async fn get_list_of_changed_files( &self, _file_filter: &FileFilter, - ) -> Result> { - Err(anyhow!("Not implemented")) - } - - async fn get_changed_files_paginated( - &self, - _url: reqwest::Url, - _file_filter: &FileFilter, + _lines_changed_only: &LinesChangedOnly, ) -> Result> { Err(anyhow!("Not implemented")) } @@ -488,14 +472,7 @@ mod test { dummy.start_log_group("Dummy test".to_string()); assert_eq!(dummy.set_exit_code(1, None, None), 0); assert!(dummy - .get_list_of_changed_files(&FileFilter::new(&[], vec![])) - .await - .is_err()); - assert!(dummy - .get_changed_files_paginated( - Url::parse("https://example.net").unwrap(), - &FileFilter::new(&[], vec![]) - ) + .get_list_of_changed_files(&FileFilter::new(&[], vec![]), &LinesChangedOnly::Off) .await .is_err()); assert!(dummy @@ -513,7 +490,7 @@ mod test { assert!(headers .insert("link", HeaderValue::from_str("; rel=\"next\"").unwrap()) .is_none()); - logger::init().unwrap(); + logger::try_init(); log::set_max_level(log::LevelFilter::Debug); let result = TestClient::try_next_page(&headers); assert!(result.is_none()); @@ -528,7 +505,7 @@ mod test { HeaderValue::from_str("; rel=\"next\"").unwrap() ) .is_none()); - logger::init().unwrap(); + logger::try_init(); log::set_max_level(log::LevelFilter::Debug); let result = TestClient::try_next_page(&headers); assert!(result.is_none()); @@ -553,7 +530,7 @@ mod test { remaining: "remaining".to_string(), retry: "retry".to_string(), }; - logger::init().unwrap(); + logger::try_init(); log::set_max_level(log::LevelFilter::Debug); let mut server = Server::new_async().await; diff --git a/cpp-linter/src/run.rs b/cpp-linter/src/run.rs index d7fe857..7c29155 100644 --- a/cpp-linter/src/run.rs +++ b/cpp-linter/src/run.rs @@ -58,7 +58,7 @@ pub async fn run_main(args: Vec) -> Result<()> { return Ok(()); } - logger::init().unwrap(); + logger::try_init(); if cli.version == "NO-VERSION" { log::error!("The `--version` arg is used to specify which version of clang to use."); @@ -78,6 +78,7 @@ pub async fn run_main(args: Vec) -> Result<()> { LevelFilter::Info }); log::info!("Processing event {}", rest_api_client.event_name); + let is_pr = rest_api_client.event_name == "pull_request"; let mut file_filter = FileFilter::new(&cli.ignore, cli.extensions.clone()); file_filter.parse_submodules(); @@ -99,30 +100,31 @@ pub async fn run_main(args: Vec) -> Result<()> { } rest_api_client.start_log_group(String::from("Get list of specified source files")); - let files = if cli.lines_changed_only != LinesChangedOnly::Off || cli.files_changed_only { - // parse_diff(github_rest_api_payload) - rest_api_client - .get_list_of_changed_files(&file_filter) - .await? - } else { - // walk the folder and look for files with specified extensions according to ignore values. - let mut all_files = file_filter.list_source_files(".")?; - if rest_api_client.event_name == "pull_request" && (cli.tidy_review || cli.format_review) { - let changed_files = rest_api_client - .get_list_of_changed_files(&file_filter) - .await?; - for changed_file in changed_files { - for file in &mut all_files { - if changed_file.name == file.name { - file.diff_chunks = changed_file.diff_chunks.clone(); - file.added_lines = changed_file.added_lines.clone(); - file.added_ranges = changed_file.added_ranges.clone(); + let files = + if !matches!(cli.lines_changed_only, LinesChangedOnly::Off) || cli.files_changed_only { + // parse_diff(github_rest_api_payload) + rest_api_client + .get_list_of_changed_files(&file_filter, &cli.lines_changed_only) + .await? + } else { + // walk the folder and look for files with specified extensions according to ignore values. + let mut all_files = file_filter.list_source_files(".")?; + if is_pr && (cli.tidy_review || cli.format_review) { + let changed_files = rest_api_client + .get_list_of_changed_files(&file_filter, &LinesChangedOnly::Off) + .await?; + for changed_file in changed_files { + for file in &mut all_files { + if changed_file.name == file.name { + file.diff_chunks = changed_file.diff_chunks.clone(); + file.added_lines = changed_file.added_lines.clone(); + file.added_ranges = changed_file.added_ranges.clone(); + } } } } - } - all_files - }; + all_files + }; let mut arc_files = vec![]; log::info!("Giving attention to the following files:"); for file in files { @@ -132,6 +134,8 @@ pub async fn run_main(args: Vec) -> Result<()> { rest_api_client.end_log_group(); let mut clang_params = ClangParams::from(&cli); + clang_params.format_review &= is_pr; + clang_params.tidy_review &= is_pr; let user_inputs = FeedbackInput::from(&cli); let clang_versions = capture_clang_tools_output( &mut arc_files, @@ -145,12 +149,8 @@ pub async fn run_main(args: Vec) -> Result<()> { .post_feedback(&arc_files, user_inputs, clang_versions) .await?; rest_api_client.end_log_group(); - if env::var("PRE_COMMIT").is_ok_and(|v| v == "1") { - if checks_failed > 1 { - return Err(anyhow!("Some checks did not pass")); - } else { - return Ok(()); - } + if env::var("PRE_COMMIT").is_ok_and(|v| v == "1") && checks_failed > 1 { + return Err(anyhow!("Some checks did not pass")); } Ok(()) } @@ -191,6 +191,7 @@ mod test { "false".to_string(), "-v".to_string(), "debug".to_string(), + "-i=target|benches/libgit2".to_string(), ]) .await; assert!(result.is_ok()); @@ -217,6 +218,7 @@ mod test { "cpp-linter".to_string(), "-l".to_string(), "false".to_string(), + "-i=target|benches/libgit2".to_string(), ]) .await; assert!(result.is_err()); diff --git a/cpp-linter/tests/paginated_changed_files.rs b/cpp-linter/tests/paginated_changed_files.rs index 682e170..c2eefec 100644 --- a/cpp-linter/tests/paginated_changed_files.rs +++ b/cpp-linter/tests/paginated_changed_files.rs @@ -5,6 +5,7 @@ use mockito::Matcher; use tempfile::{NamedTempFile, TempDir}; use cpp_linter::{ + cli::LinesChangedOnly, common_fs::FileFilter, logger, rest_api::{github::GithubApiClient, RestApiClient}, @@ -74,7 +75,7 @@ async fn get_paginated_changes(lib_root: &Path, test_params: &TestParams) { let mut server = mock_server().await; env::set_var("GITHUB_API_URL", server.url()); env::set_current_dir(tmp.path()).unwrap(); - logger::init().unwrap(); + logger::try_init(); log::set_max_level(log::LevelFilter::Debug); let gh_client = GithubApiClient::new(); if test_params.fail_serde_event_payload || test_params.no_event_payload { @@ -138,7 +139,9 @@ async fn get_paginated_changes(lib_root: &Path, test_params: &TestParams) { } let file_filter = FileFilter::new(&[], vec!["cpp".to_string(), "hpp".to_string()]); - let files = client.get_list_of_changed_files(&file_filter).await; + let files = client + .get_list_of_changed_files(&file_filter, &LinesChangedOnly::Off) + .await; match files { Err(e) => { if !test_params.fail_serde_diff { diff --git a/cpp-linter/tests/paginated_changes/push_files_pg1.json b/cpp-linter/tests/paginated_changes/push_files_pg1.json index 8022a1e..b10268e 100644 --- a/cpp-linter/tests/paginated_changes/push_files_pg1.json +++ b/cpp-linter/tests/paginated_changes/push_files_pg1.json @@ -19,11 +19,10 @@ "status": "modified", "additions": 11, "deletions": 10, - "changes": 21, + "changes": 0, "blob_url": "https://github.com/cpp-linter/test-cpp-linter-action/blob/635a9c57bdcca07b99ddef52c2640337c50280b1/src%2Fdemo.cpp", "raw_url": "https://github.com/cpp-linter/test-cpp-linter-action/raw/635a9c57bdcca07b99ddef52c2640337c50280b1/src%2Fdemo.cpp", - "contents_url": "https://api.github.com/repos/cpp-linter/test-cpp-linter-action/contents/src%2Fdemo.cpp?ref=635a9c57bdcca07b99ddef52c2640337c50280b1", - "patch": "@@ -1,17 +1,18 @@\n /** This is a very ugly test code (doomed to fail linting) */\n #include \"demo.hpp\"\n-#include \n-#include \n+#include \n \n-// using size_t from cstddef\n-size_t dummyFunc(size_t i) { return i; }\n \n-int main()\n-{\n- for (;;)\n- break;\n+\n+\n+int main(){\n+\n+ for (;;) break;\n+\n \n printf(\"Hello world!\\n\");\n \n- return 0;\n-}\n+\n+\n+\n+ return 0;}" + "contents_url": "https://api.github.com/repos/cpp-linter/test-cpp-linter-action/contents/src%2Fdemo.cpp?ref=635a9c57bdcca07b99ddef52c2640337c50280b1" } ] } diff --git a/cspell.config.yml b/cspell.config.yml index 72c0cd0..465ff02 100644 --- a/cspell.config.yml +++ b/cspell.config.yml @@ -8,6 +8,7 @@ words: - bugprone - chrono - codecov + - codspeed - consts - cppcoreguidelines - cstdio @@ -31,6 +32,7 @@ words: - mkdocs - msvc - napi + - nextest - nonminimal - peekable - pkgs diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 986d4af..e829d14 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -16,3 +16,4 @@ pyo3 = "0.23.3" [lib] name = "cli_gen" crate-type = ["cdylib"] +bench = false From f998782bc0cdc242ddbe1429fe64ab57269a30a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 14:52:05 -0800 Subject: [PATCH 28/43] Bump the npm group across 1 directory with 3 updates (#96) Bumps the npm group with 3 updates in the / directory: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals). Updates `@eslint/js` from 9.16.0 to 9.18.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.18.0/packages/js) Updates `eslint` from 9.16.0 to 9.18.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.16.0...v9.18.0) Updates `globals` from 15.13.0 to 15.14.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.13.0...v15.14.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bindings/node/package.json | 6 ++-- yarn.lock | 59 ++++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/bindings/node/package.json b/bindings/node/package.json index 6fa0cb0..45fcc0c 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -9,11 +9,11 @@ }, "license": "MIT", "devDependencies": { - "@eslint/js": "^9.16.0", + "@eslint/js": "^9.18.0", "@napi-rs/cli": "^2.18.4", "ava": "^6.2.0", - "eslint": "^9.16.0", - "globals": "^15.13.0" + "eslint": "^9.18.0", + "globals": "^15.14.0" }, "ava": { "timeout": "3m" diff --git a/yarn.lock b/yarn.lock index 399a682..5fcce4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,10 +23,12 @@ debug "^4.3.1" minimatch "^3.1.2" -"@eslint/core@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd" - integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg== +"@eslint/core@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091" + integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw== + dependencies: + "@types/json-schema" "^7.0.15" "@eslint/eslintrc@^3.2.0": version "3.2.0" @@ -43,21 +45,22 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.16.0", "@eslint/js@^9.16.0": - version "9.16.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" - integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== +"@eslint/js@9.18.0", "@eslint/js@^9.18.0": + version "9.18.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.18.0.tgz#3356f85d18ed3627ab107790b53caf7e1e3d1e84" + integrity sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA== "@eslint/object-schema@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== -"@eslint/plugin-kit@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8" - integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA== +"@eslint/plugin-kit@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81" + integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A== dependencies: + "@eslint/core" "^0.10.0" levn "^0.4.1" "@humanfs/core@^0.19.1": @@ -484,10 +487,10 @@ convert-to-spaces@^2.0.1: resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz#61a6c98f8aa626c16b296b862a91412a33bceb6b" integrity sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ== -cross-spawn@^7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" - integrity sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug== +cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -582,18 +585,18 @@ eslint-visitor-keys@^4.2.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.16.0: - version "9.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" - integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== +eslint@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.18.0.tgz#c95b24de1183e865de19f607fda6518b54827850" + integrity sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.12.1" "@eslint/config-array" "^0.19.0" - "@eslint/core" "^0.9.0" + "@eslint/core" "^0.10.0" "@eslint/eslintrc" "^3.2.0" - "@eslint/js" "9.16.0" - "@eslint/plugin-kit" "^0.2.3" + "@eslint/js" "9.18.0" + "@eslint/plugin-kit" "^0.2.5" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/retry" "^0.4.1" @@ -601,7 +604,7 @@ eslint@^9.16.0: "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.5" + cross-spawn "^7.0.6" debug "^4.3.2" escape-string-regexp "^4.0.0" eslint-scope "^8.2.0" @@ -823,10 +826,10 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globals@^15.13.0: - version "15.13.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" - integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== +globals@^15.14.0: + version "15.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.14.0.tgz#b8fd3a8941ff3b4d38f3319d433b61bbb482e73f" + integrity sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig== globby@^14.0.2: version "14.0.2" From a1aad3f492bca5c06a79cfc6566e92d04cf7b94f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 15:18:10 -0800 Subject: [PATCH 29/43] Bump mkdocs-material from 9.5.49 to 9.5.50 in the pip group (#99) Bumps the pip group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-material` from 9.5.49 to 9.5.50 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.49...9.5.50) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index bb4b1cf..863a311 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ markdown-gfm-admonition==0.1.1 mkdocs==1.6.1 mkdocs-gen-files==0.5.0 mkdocs-include-markdown-plugin==7.1.2 -mkdocs-material==9.5.49 +mkdocs-material==9.5.50 pyyaml==6.0.2 From 05f8b950cf1364718d2bb221d87be47dcec17c7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:16:15 -0800 Subject: [PATCH 30/43] Bump the cargo group across 1 directory with 16 updates (#98) * Bump the cargo group across 1 directory with 16 updates Bumps the cargo group with 15 updates in the / directory: | Package | From | To | | --- | --- | --- | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.94` | `1.0.95` | | [clap](https://github.com/clap-rs/clap) | `4.5.23` | `4.5.27` | | [colored](https://github.com/mackwic/colored) | `2.1.0` | `3.0.0` | | [fast-glob](https://github.com/shulaoda/fast-glob) | `0.4.0` | `0.4.3` | | [git2](https://github.com/rust-lang/git2-rs) | `0.19.0` | `0.20.0` | | [log](https://github.com/rust-lang/log) | `0.4.22` | `0.4.25` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.9` | `0.12.12` | | [semver](https://github.com/dtolnay/semver) | `1.0.23` | `1.0.25` | | [serde](https://github.com/serde-rs/serde) | `1.0.216` | `1.0.217` | | [serde_json](https://github.com/serde-rs/json) | `1.0.133` | `1.0.137` | | [tokio](https://github.com/tokio-rs/tokio) | `1.42.0` | `1.43.0` | | [which](https://github.com/harryfei/which-rs) | `7.0.0` | `7.0.1` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.14.0` | `3.15.0` | | [pyo3](https://github.com/pyo3/pyo3) | `0.23.3` | `0.23.4` | | [napi-build](https://github.com/napi-rs/napi-rs) | `2.1.3` | `2.1.4` | Signed-off-by: dependabot[bot] * ran `cargo update` --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brendan <2bndy5@gmail.com> --- Cargo.lock | 866 +++++++++++++++++++++++-------------- bindings/node/Cargo.toml | 4 +- bindings/python/Cargo.toml | 4 +- cpp-linter/Cargo.toml | 26 +- docs/Cargo.toml | 2 +- 5 files changed, 554 insertions(+), 348 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8acf807..adf2088 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -49,9 +49,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -64,43 +64,50 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert-json-diff" @@ -136,7 +143,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -147,9 +154,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bumpalo" @@ -165,9 +172,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cast" @@ -177,9 +184,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.22" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "jobserver", "libc", @@ -203,7 +210,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -235,18 +242,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" dependencies = [ "anstream", "anstyle", @@ -274,7 +281,7 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "450a0e9df9df1c154156f4344f99d8f6f6e69d0fc4de96ef6e2e68b2ec3bce97" dependencies = [ - "colored", + "colored 2.2.0", "libc", "serde_json", ] @@ -286,7 +293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eb1a6cb9c20e177fde58cdef97c1c7c9264eb1424fe45c4fccedc2fb078a569" dependencies = [ "codspeed", - "colored", + "colored 2.2.0", "criterion", "futures", "tokio", @@ -294,18 +301,27 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "colored" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +dependencies = [ + "windows-sys 0.59.0", ] [[package]] @@ -341,7 +357,7 @@ dependencies = [ "chrono", "clap", "codspeed-criterion-compat", - "colored", + "colored 3.0.0", "fast-glob", "futures", "git2", @@ -454,14 +470,25 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "ctor" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", "syn", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "either" version = "1.13.0" @@ -470,13 +497,19 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + [[package]] name = "equivalent" version = "1.0.1" @@ -485,25 +518,28 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fast-glob" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb10ed0f8a3dca52477be37ac0fb8f9d1fd4cd8d311b4484bdd45c1c56e0c9ec" +checksum = "0eca69ef247d19faa15ac0156968637440824e5ff22baa5ee0cd35b2f7ea6a0f" +dependencies = [ + "arrayvec", +] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fnv" @@ -637,15 +673,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ "bitflags", "libc", @@ -658,9 +694,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -687,9 +723,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -697,32 +733,17 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -754,9 +775,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -766,9 +787,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -787,9 +808,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", @@ -820,9 +841,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -860,21 +881,150 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", @@ -888,9 +1038,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "ipnet" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is-terminal" @@ -898,7 +1048,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -920,9 +1070,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -935,10 +1085,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -979,15 +1130,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.164" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.18.0+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" dependencies = [ "cc", "libc", @@ -999,12 +1150,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1023,9 +1174,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "libc", @@ -1035,9 +1186,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1051,9 +1208,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" @@ -1078,20 +1235,19 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1105,7 +1261,7 @@ checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2" dependencies = [ "assert-json-diff", "bytes", - "colored", + "colored 2.2.0", "futures-util", "http", "http-body", @@ -1137,9 +1293,9 @@ dependencies = [ [[package]] name = "napi-build" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c0f5d67ee408a4685b61f5ab7e58605c8ae3f2b4189f0127d804ff13d5560a" +checksum = "db836caddef23662b94e16bf1f26c40eceb09d6aee5d5b06a7ac199320b69b19" [[package]] name = "napi-derive" @@ -1207,21 +1363,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -1263,9 +1416,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.2+3.3.2" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] @@ -1303,7 +1456,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -1314,9 +1467,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1360,9 +1513,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "ppv-lite86" @@ -1375,18 +1528,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15" +checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "cfg-if", "indoc", @@ -1402,9 +1555,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b" +checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" dependencies = [ "once_cell", "target-lexicon", @@ -1412,9 +1565,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1547a7f9966f6f1a0f0227564a9945fe36b90da5a93b3933fc3dc03fae372d" +checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" dependencies = [ "libc", "pyo3-build-config", @@ -1422,9 +1575,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb6da8ec6fa5cedd1626c886fc8749bdcbb09424a86461eb8cdf096b7c33257" +checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1434,9 +1587,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a385202ff5a92791168b1136afae5059d3ac118457bb7bc304c197c2d33e7d" +checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" dependencies = [ "heck", "proc-macro2", @@ -1447,9 +1600,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1506,9 +1659,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags", ] @@ -1527,9 +1680,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1544,9 +1697,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64", "bytes", @@ -1577,6 +1730,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tower", "tower-service", "url", "wasm-bindgen", @@ -1608,22 +1762,22 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "once_cell", "rustls-pki-types", @@ -1634,19 +1788,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -1659,6 +1812,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" @@ -1676,9 +1835,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -1704,9 +1863,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -1714,15 +1873,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -1741,9 +1900,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -1752,9 +1911,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" dependencies = [ "itoa", "memchr", @@ -1782,9 +1941,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "similar" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" [[package]] name = "slab" @@ -1803,9 +1962,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1817,6 +1976,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -1831,9 +1996,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.87" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -1842,13 +2007,24 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "system-configuration" version = "0.6.1" @@ -1878,12 +2054,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -1891,18 +2068,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -1910,35 +2087,30 @@ dependencies = [ ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "serde", - "serde_json", + "displaydoc", + "zerovec", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinytemplate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "tinyvec_macros", + "serde", + "serde_json", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -1953,9 +2125,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -1974,12 +2146,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -1996,9 +2167,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -2007,6 +2178,27 @@ dependencies = [ "tokio", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" version = "0.3.3" @@ -2015,9 +2207,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", @@ -2025,9 +2217,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -2038,26 +2230,11 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" @@ -2079,15 +2256,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2127,24 +2316,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2153,21 +2342,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2175,9 +2365,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -2188,15 +2378,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -2204,12 +2397,12 @@ dependencies = [ [[package]] name = "which" -version = "7.0.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" +checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028" dependencies = [ "either", - "home", + "env_home", "rustix", "winsafe", ] @@ -2229,7 +2422,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2240,7 +2433,7 @@ checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2249,7 +2442,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2259,16 +2452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -2277,7 +2461,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2286,22 +2470,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -2310,46 +2479,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2362,48 +2513,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2416,11 +2543,47 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xml-rs" -version = "0.8.22" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] [[package]] name = "zerocopy" @@ -2443,8 +2606,51 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index d80c6ff..912a9ad 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -20,10 +20,10 @@ bench = false napi = { version = "2.16.13", default-features = false, features = ["napi4", "async"] } napi-derive = "2.16.13" cpp-linter = { path = "../../cpp-linter" } -anyhow = "1.0.94" +anyhow = "1.0.95" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] [build-dependencies] -napi-build = "2.0.1" +napi-build = "2.1.4" diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index d15775b..a9f0cd9 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -17,9 +17,9 @@ crate-type = ["cdylib"] bench = false [dependencies] -pyo3 = { version = "0.23.3", features = ["extension-module"] } +pyo3 = { version = "0.23.4", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } -tokio = "1.42.0" +tokio = "1.43.0" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 9ac777e..4aa3fd8 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -14,32 +14,32 @@ license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.94" +anyhow = "1.0.95" chrono = "0.4.39" -clap = "4.5.23" -colored = "2.1.0" -fast-glob = "0.4.0" +clap = "4.5.27" +colored = "3.0.0" +fast-glob = "0.4.3" futures = "0.3.31" -git2 = "0.19.0" +git2 = "0.20.0" lenient_semver = "0.4.2" -log = { version = "0.4.22", features = ["std"] } +log = { version = "0.4.25", features = ["std"] } openssl = { version = "0.10", features = ["vendored"], optional = true } openssl-probe = { version = "0.1", optional = true } regex = "1.11.1" -reqwest = "0.12.9" -semver = "1.0.23" -serde = { version = "1.0.216", features = ["derive"] } +reqwest = "0.12.12" +semver = "1.0.25" +serde = { version = "1.0.217", features = ["derive"] } serde-xml-rs = "0.6.0" -serde_json = "1.0.133" -tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread"]} +serde_json = "1.0.137" +tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" tokio-stream = "0.1.17" -which = "7.0.0" +which = "7.0.1" [dev-dependencies] criterion = { version = "2.7.2", package = "codspeed-criterion-compat", features=["async_tokio"] } mockito = "1.6.1" -tempfile = "3.14.0" +tempfile = "3.15.0" [features] openssl-vendored = ["dep:openssl", "dep:openssl-probe"] diff --git a/docs/Cargo.toml b/docs/Cargo.toml index e829d14..0c81671 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.23.3" +pyo3 = "0.23.4" [lib] name = "cli_gen" From 9d782b56068823ffab860fbb167587522958c81f Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 22 Jan 2025 02:23:23 -0800 Subject: [PATCH 31/43] refactor: switch to `quick_xml` library (#101) * use `quick_xml` * deserialize only what is needed from XML. The `cols`, `length`, and `value` fields were never used and are now ignored when parsing XML * read file contents only once when translating byte offset to line * improve error handling when parsing XML --- Cargo.lock | 50 ++---- cpp-linter/Cargo.toml | 2 +- cpp-linter/src/clang_tools/clang_format.rs | 159 ++++++------------ cpp-linter/src/clang_tools/clang_tidy.rs | 11 +- cpp-linter/src/clang_tools/mod.rs | 28 ++- cpp-linter/src/common_fs/file_filter.rs | 2 +- cpp-linter/src/common_fs/mod.rs | 50 +++--- cpp-linter/src/rest_api/github/mod.rs | 9 +- .../src/rest_api/github/specific_api.rs | 2 +- 9 files changed, 115 insertions(+), 198 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index adf2088..ba733f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -366,11 +366,11 @@ dependencies = [ "mockito", "openssl", "openssl-probe", + "quick-xml", "regex", "reqwest", "semver", "serde", - "serde-xml-rs", "serde_json", "tempfile", "tokio", @@ -1598,6 +1598,16 @@ dependencies = [ "syn", ] +[[package]] +name = "quick-xml" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quote" version = "1.0.38" @@ -1886,18 +1896,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-xml-rs" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" -dependencies = [ - "log", - "serde", - "thiserror", - "xml-rs", -] - [[package]] name = "serde_derive" version = "1.0.217" @@ -2066,26 +2064,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tinystr" version = "0.7.6" @@ -2555,12 +2533,6 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -[[package]] -name = "xml-rs" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" - [[package]] name = "yoke" version = "0.7.5" diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 4aa3fd8..450a955 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -25,11 +25,11 @@ lenient_semver = "0.4.2" log = { version = "0.4.25", features = ["std"] } openssl = { version = "0.10", features = ["vendored"], optional = true } openssl-probe = { version = "0.1", optional = true } +quick-xml = {version = "0.37.2", features = ["serialize"]} regex = "1.11.1" reqwest = "0.12.12" semver = "1.0.25" serde = { version = "1.0.217", features = ["derive"] } -serde-xml-rs = "0.6.0" serde_json = "1.0.137" tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" diff --git a/cpp-linter/src/clang_tools/clang_format.rs b/cpp-linter/src/clang_tools/clang_format.rs index ba0b1d9..40689d6 100644 --- a/cpp-linter/src/clang_tools/clang_format.rs +++ b/cpp-linter/src/clang_tools/clang_format.rs @@ -2,29 +2,26 @@ //! output. use std::{ + fs, process::Command, sync::{Arc, Mutex, MutexGuard}, }; use anyhow::{Context, Result}; use log::Level; -// non-std crates use serde::Deserialize; -use serde_xml_rs::de::Deserializer; // project-specific crates/modules use super::MakeSuggestions; use crate::{ cli::ClangParams, - common_fs::{get_line_cols_from_offset, FileObj}, + common_fs::{get_line_count_from_offset, FileObj}, }; -/// A Structure used to deserialize clang-format's XML output. -#[derive(Debug, Deserialize, PartialEq, Clone)] -#[serde(rename = "replacements")] +#[derive(Debug, Clone, Deserialize, PartialEq, Eq)] pub struct FormatAdvice { /// A list of [`Replacement`]s that clang-tidy wants to make. - #[serde(rename = "$value")] + #[serde(rename(deserialize = "replacement"))] pub replacements: Vec, pub patched: Option>, @@ -41,43 +38,18 @@ impl MakeSuggestions for FormatAdvice { } /// A single replacement that clang-format wants to make. -#[derive(Debug, Deserialize, PartialEq)] +#[derive(Debug, PartialEq, Eq, Default, Clone, Copy, Deserialize)] pub struct Replacement { /// The byte offset where the replacement will start. - pub offset: usize, - - /// The amount of bytes that will be removed. - pub length: usize, - - /// The bytes (UTF-8 encoded) that will be added at the [`Replacement::offset`] position. - #[serde(rename = "$value")] - pub value: Option, + #[serde(rename = "@offset")] + pub offset: u32, /// The line number described by the [`Replacement::offset`]. /// /// This value is not provided by the XML output, but we calculate it after /// deserialization. #[serde(default)] - pub line: usize, - - /// The column number on the line described by the [`Replacement::offset`]. - /// - /// This value is not provided by the XML output, but we calculate it after - /// deserialization. - #[serde(default)] - pub cols: usize, -} - -impl Clone for Replacement { - fn clone(&self) -> Self { - Replacement { - offset: self.offset, - length: self.length, - value: self.value.clone(), - line: self.line, - cols: self.cols, - } - } + pub line: u32, } /// Get a string that summarizes the given `--style` @@ -122,8 +94,9 @@ pub fn run_clang_format( } let file_name = file.name.to_string_lossy().to_string(); cmd.arg(file.name.to_path_buf().as_os_str()); - let mut patched = None; - if clang_params.format_review { + let patched = if !clang_params.format_review { + None + } else { logs.push(( Level::Info, format!( @@ -140,12 +113,12 @@ pub fn run_clang_format( .join(" ") ), )); - patched = Some( + Some( cmd.output() .with_context(|| format!("Failed to get fixes from clang-format: {file_name}"))? .stdout, - ); - } + ) + }; cmd.arg("--output-replacements-xml"); logs.push(( log::Level::Info, @@ -170,41 +143,40 @@ pub fn run_clang_format( ), )); } - if output.stdout.is_empty() { - return Ok(logs); - } - let xml = String::from_utf8(output.stdout) - .with_context(|| format!("stdout from clang-format was not UTF-8 encoded: {file_name}"))? - .lines() - .collect::>() - .join(""); - let config = serde_xml_rs::ParserConfig::new() - .trim_whitespace(false) - .whitespace_to_characters(true) - .ignore_root_level_whitespace(true); - let event_reader = serde_xml_rs::EventReader::new_with_config(xml.as_bytes(), config); - let mut format_advice = FormatAdvice::deserialize(&mut Deserializer::new(event_reader)) - .unwrap_or(FormatAdvice { + let mut format_advice = if !output.stdout.is_empty() { + let xml = String::from_utf8(output.stdout).with_context(|| { + format!("XML output from clang-format was not UTF-8 encoded: {file_name}") + })?; + quick_xml::de::from_str::(&xml).with_context(|| { + format!("Failed to parse XML output from clang-format for {file_name}") + })? + } else { + FormatAdvice { replacements: vec![], patched: None, - }); + } + }; format_advice.patched = patched; if !format_advice.replacements.is_empty() { + let original_contents = fs::read(&file.name).with_context(|| { + format!( + "Failed to read file's original content before translating byte offsets: {file_name}", + ) + })?; // get line and column numbers from format_advice.offset let mut filtered_replacements = Vec::new(); for replacement in &mut format_advice.replacements { - let (line_number, columns) = get_line_cols_from_offset(&file.name, replacement.offset); + let line_number = get_line_count_from_offset(&original_contents, replacement.offset); replacement.line = line_number; - replacement.cols = columns; for range in &ranges { - if range.contains(&line_number.try_into().unwrap_or(0)) { - filtered_replacements.push(replacement.clone()); + if range.contains(&line_number) { + filtered_replacements.push(*replacement); break; } } if ranges.is_empty() { // lines_changed_only is disabled - filtered_replacements.push(replacement.clone()); + filtered_replacements.push(*replacement); } } format_advice.replacements = filtered_replacements; @@ -216,7 +188,13 @@ pub fn run_clang_format( #[cfg(test)] mod tests { use super::{summarize_style, FormatAdvice, Replacement}; - use serde::Deserialize; + + #[test] + fn parse_blank_xml() { + let xml = String::new(); + let result = quick_xml::de::from_str::(&xml); + assert!(result.is_err()); + } #[test] fn parse_xml() { @@ -226,51 +204,24 @@ mod tests { -"#; - //since whitespace is part of the elements' body, we need to remove the LFs first - let xml = xml_raw.lines().collect::>().join(""); +"# + .as_bytes() + .to_vec(); let expected = FormatAdvice { - replacements: vec![ - Replacement { - offset: 113, - length: 5, - value: Some(String::from("\n ")), - line: 0, - cols: 0, - }, - Replacement { - offset: 147, - length: 0, - value: Some(String::from(" ")), - line: 0, - cols: 0, - }, - Replacement { - offset: 161, - length: 0, - value: None, - line: 0, - cols: 0, - }, - Replacement { - offset: 165, - length: 19, - value: Some(String::from("\n\n")), - line: 0, - cols: 0, - }, - ], + replacements: [113, 147, 161, 165] + .iter() + .map(|offset| Replacement { + offset: *offset, + ..Default::default() + }) + .collect(), patched: None, }; - let config = serde_xml_rs::ParserConfig::new() - .trim_whitespace(false) - .whitespace_to_characters(true) - .ignore_root_level_whitespace(true); - let event_reader = serde_xml_rs::EventReader::new_with_config(xml.as_bytes(), config); - let document = - FormatAdvice::deserialize(&mut serde_xml_rs::de::Deserializer::new(event_reader)) - .unwrap(); + + let xml = String::from_utf8(xml_raw).unwrap(); + + let document = quick_xml::de::from_str::(&xml).unwrap(); assert_eq!(expected, document); } diff --git a/cpp-linter/src/clang_tools/clang_tidy.rs b/cpp-linter/src/clang_tools/clang_tidy.rs index fd39b75..0d364af 100644 --- a/cpp-linter/src/clang_tools/clang_tidy.rs +++ b/cpp-linter/src/clang_tools/clang_tidy.rs @@ -276,16 +276,17 @@ pub fn run_clang_tidy( cmd.args(["--line-filter", filter.as_str()]); } } - let mut original_content = None; - if clang_params.tidy_review { + let original_content = if !clang_params.tidy_review { + None + } else { cmd.arg("--fix-errors"); - original_content = Some(fs::read_to_string(&file.name).with_context(|| { + Some(fs::read_to_string(&file.name).with_context(|| { format!( "Failed to cache file's original content before applying clang-tidy changes: {}", file_name.clone() ) - })?); - } + })?) + }; if !clang_params.style.is_empty() { cmd.args(["--format-style", clang_params.style.as_str()]); } diff --git a/cpp-linter/src/clang_tools/mod.rs b/cpp-linter/src/clang_tools/mod.rs index 29d813c..f89078e 100644 --- a/cpp-linter/src/clang_tools/mod.rs +++ b/cpp-linter/src/clang_tools/mod.rs @@ -258,20 +258,18 @@ pub struct ReviewComments { impl ReviewComments { pub fn summarize(&self, clang_versions: &ClangVersions) -> String { let mut body = format!("{COMMENT_MARKER}## Cpp-linter Review\n"); - for t in 0u8..=1 { + for t in 0_usize..=1 { let mut total = 0; let (tool_name, tool_version) = if t == 0 { ("clang-format", clang_versions.format_version.as_ref()) } else { ("clang-tidy", clang_versions.tidy_version.as_ref()) }; - - let tool_total = if let Some(total) = self.tool_total[t as usize] { - total - } else { - // review was not requested from this tool or the tool was not used at all + if tool_version.is_none() { + // this tool was not used at all continue; - }; + } + let tool_total = self.tool_total[t].unwrap_or_default(); // If the tool's version is unknown, then we don't need to output this line. // NOTE: If the tool was invoked at all, then the tool's version shall be known. @@ -295,11 +293,11 @@ impl ReviewComments { .as_str(), ); } - if !self.full_patch[t as usize].is_empty() { + if !self.full_patch[t].is_empty() { body.push_str( format!( "\n
Click here for the full {tool_name} patch\n\n```diff\n{}```\n\n
\n", - self.full_patch[t as usize] + self.full_patch[t] ).as_str() ); } else { @@ -370,8 +368,7 @@ pub trait MakeSuggestions { patch: &mut Patch, summary_only: bool, ) -> Result<()> { - let tool_name = self.get_tool_name(); - let is_tidy_tool = tool_name == "clang-tidy"; + let is_tidy_tool = (&self.get_tool_name() == "clang-tidy") as usize; let hunks_total = patch.num_hunks(); let mut hunks_in_patch = 0u32; let file_name = file_obj @@ -384,13 +381,13 @@ pub trait MakeSuggestions { .to_buf() .with_context(|| "Failed to convert patch to byte array")? .to_vec(); - review_comments.full_patch[is_tidy_tool as usize].push_str( + review_comments.full_patch[is_tidy_tool].push_str( String::from_utf8(patch_buf.to_owned()) .with_context(|| format!("Failed to convert patch to string: {file_name}"))? .as_str(), ); - review_comments.tool_total[is_tidy_tool as usize].get_or_insert(0); if summary_only { + review_comments.tool_total[is_tidy_tool].get_or_insert(0); return Ok(()); } for hunk_id in 0..hunks_total { @@ -447,9 +444,8 @@ pub trait MakeSuggestions { review_comments.comments.push(comment); } } - review_comments.tool_total[is_tidy_tool as usize] = Some( - review_comments.tool_total[is_tidy_tool as usize].unwrap_or_default() + hunks_in_patch, - ); + review_comments.tool_total[is_tidy_tool] = + Some(review_comments.tool_total[is_tidy_tool].unwrap_or_default() + hunks_in_patch); Ok(()) } } diff --git a/cpp-linter/src/common_fs/file_filter.rs b/cpp-linter/src/common_fs/file_filter.rs index a8ba786..82697e0 100644 --- a/cpp-linter/src/common_fs/file_filter.rs +++ b/cpp-linter/src/common_fs/file_filter.rs @@ -111,7 +111,7 @@ impl FileFilter { || (pat.is_dir() && file_name.starts_with(pat)) { log::debug!( - "file {file_name:?} is in {}ignored with domain {pattern:?}.", + "file {file_name:?} is {}ignored with domain {pattern:?}.", if is_ignored { "" } else { "not " } ); return true; diff --git a/cpp-linter/src/common_fs/mod.rs b/cpp-linter/src/common_fs/mod.rs index 00bf62b..c07854b 100644 --- a/cpp-linter/src/common_fs/mod.rs +++ b/cpp-linter/src/common_fs/mod.rs @@ -2,7 +2,6 @@ use std::fmt::Debug; use std::fs; -use std::io::Read; use std::path::{Component, Path}; use std::{ops::RangeInclusive, path::PathBuf}; @@ -220,24 +219,16 @@ impl FileObj { } } -/// Gets the line and column number from a given `offset` (of bytes) for given -/// `file_path`. +/// Gets the line number for a given `offset` (of bytes) from the given +/// buffer `contents`. /// -/// This computes the line and column numbers from a buffer of bytes read from the -/// `file_path`. In non-UTF-8 encoded files, this does not guarantee that a word -/// boundary exists at the returned column number. However, the `offset` given to this -/// function is expected to originate from diagnostic information provided by -/// clang-format or clang-tidy. -pub fn get_line_cols_from_offset(file_path: &PathBuf, offset: usize) -> (usize, usize) { - let mut file_buf = vec![0; offset]; - fs::File::open(file_path) - .unwrap() - .read_exact(&mut file_buf) - .unwrap(); - let lines = file_buf.split(|byte| byte == &b'\n'); - let line_count = lines.clone().count(); - let column_count = lines.last().unwrap_or(&[]).len() + 1; // +1 because not a 0 based count - (line_count, column_count) +/// The `offset` given to this function is expected to originate from +/// diagnostic information provided by clang-format. Any `offset` out of +/// bounds is clamped to the given `contents` buffer's length. +pub fn get_line_count_from_offset(contents: &[u8], offset: u32) -> u32 { + let offset = (offset as usize).min(contents.len()); + let lines = contents[0..offset].split(|byte| byte == &b'\n'); + lines.count() as u32 } /// This was copied from [cargo source code](https://github.com/rust-lang/cargo/blob/fede83ccf973457de319ba6fa0e36ead454d2e20/src/cargo/util/paths.rs#L61). @@ -272,10 +263,10 @@ pub fn normalize_path(path: &Path) -> PathBuf { #[cfg(test)] mod test { - use std::env::current_dir; use std::path::PathBuf; + use std::{env::current_dir, fs}; - use super::{get_line_cols_from_offset, normalize_path, FileObj}; + use super::{get_line_count_from_offset, normalize_path, FileObj}; use crate::cli::LinesChangedOnly; // *********************** tests for normalized paths @@ -317,12 +308,25 @@ mod test { #[test] fn translate_byte_offset() { - let (lines, cols) = get_line_cols_from_offset(&PathBuf::from("tests/demo/demo.cpp"), 144); - println!("lines: {lines}, cols: {cols}"); + let contents = fs::read(PathBuf::from("tests/demo/demo.cpp")).unwrap(); + let lines = get_line_count_from_offset(&contents, 144); assert_eq!(lines, 13); - assert_eq!(cols, 5); } + #[test] + fn get_line_count_edge_cases() { + // Empty content + assert_eq!(get_line_count_from_offset(&[], 0), 1); + + // No newlines + assert_eq!(get_line_count_from_offset(b"abc", 3), 1); + + // Consecutive newlines + assert_eq!(get_line_count_from_offset(b"a\n\nb", 3), 3); + + // Offset beyond content length + assert_eq!(get_line_count_from_offset(b"a\nb\n", 10), 3); + } // *********************** tests for FileObj::get_ranges() #[test] diff --git a/cpp-linter/src/rest_api/github/mod.rs b/cpp-linter/src/rest_api/github/mod.rs index 05b5a61..f44a588 100644 --- a/cpp-linter/src/rest_api/github/mod.rs +++ b/cpp-linter/src/rest_api/github/mod.rs @@ -314,15 +314,8 @@ mod test { notes, patched: None, }); - let replacements = vec![Replacement { - offset: 0, - length: 0, - value: Some(String::new()), - line: 1, - cols: 1, - }]; file.format_advice = Some(FormatAdvice { - replacements, + replacements: vec![Replacement { offset: 0, line: 1 }], patched: None, }); files.push(Arc::new(Mutex::new(file))); diff --git a/cpp-linter/src/rest_api/github/specific_api.rs b/cpp-linter/src/rest_api/github/specific_api.rs index aa86d5f..a9f789e 100644 --- a/cpp-linter/src/rest_api/github/specific_api.rs +++ b/cpp-linter/src/rest_api/github/specific_api.rs @@ -169,7 +169,7 @@ impl GithubApiClient { let file = file.lock().unwrap(); if let Some(format_advice) = &file.format_advice { // assemble a list of line numbers - let mut lines: Vec = Vec::new(); + let mut lines = Vec::new(); for replacement in &format_advice.replacements { if !lines.contains(&replacement.line) { lines.push(replacement.line); From 8f7e4134cf9e259e800ed3d18b7be157ce85b929 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:30:32 -0800 Subject: [PATCH 32/43] Bump openssl from 0.10.68 to 0.10.70 (#105) Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.70. - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70) --- updated-dependencies: - dependency-name: openssl dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba733f9..9745458 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1384,9 +1384,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ "bitflags", "cfg-if", @@ -1425,9 +1425,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", From a10b6b96edb798da45c5268fa7b97e4c93f59ab1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 04:08:18 -0800 Subject: [PATCH 33/43] Bump the cargo group across 1 directory with 14 updates (#116) Bumps the cargo group with 14 updates in the / directory: | Package | From | To | | --- | --- | --- | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.95` | `1.0.97` | | [chrono](https://github.com/chronotope/chrono) | `0.4.39` | `0.4.40` | | [clap](https://github.com/clap-rs/clap) | `4.5.27` | `4.5.31` | | [fast-glob](https://github.com/oxc-project/fast-glob) | `0.4.3` | `0.4.5` | | [log](https://github.com/rust-lang/log) | `0.4.25` | `0.4.26` | | [openssl](https://github.com/sfackler/rust-openssl) | `0.10.68` | `0.10.71` | | [openssl-probe](https://github.com/alexcrichton/openssl-probe) | `0.1.5` | `0.1.6` | | [serde](https://github.com/serde-rs/serde) | `1.0.217` | `1.0.218` | | [serde_json](https://github.com/serde-rs/json) | `1.0.137` | `1.0.140` | | [which](https://github.com/harryfei/which-rs) | `7.0.1` | `7.0.2` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.15.0` | `3.17.1` | | [pyo3](https://github.com/pyo3/pyo3) | `0.23.4` | `0.23.5` | | [napi](https://github.com/napi-rs/napi-rs) | `2.16.13` | `2.16.16` | | [napi-build](https://github.com/napi-rs/napi-rs) | `2.1.4` | `2.1.5` | Updates `anyhow` from 1.0.95 to 1.0.97 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.95...1.0.97) Updates `chrono` from 0.4.39 to 0.4.40 - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.39...v0.4.40) Updates `clap` from 4.5.27 to 4.5.31 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.27...v4.5.31) Updates `fast-glob` from 0.4.3 to 0.4.5 - [Release notes](https://github.com/oxc-project/fast-glob/releases) - [Changelog](https://github.com/oxc-project/fast-glob/blob/main/CHANGELOG.md) - [Commits](https://github.com/oxc-project/fast-glob/commits/v0.4.5) Updates `log` from 0.4.25 to 0.4.26 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.25...0.4.26) Updates `openssl` from 0.10.68 to 0.10.71 - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.71) Updates `openssl-probe` from 0.1.5 to 0.1.6 - [Commits](https://github.com/alexcrichton/openssl-probe/compare/0.1.5...0.1.6) Updates `serde` from 1.0.217 to 1.0.218 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.217...v1.0.218) Updates `serde_json` from 1.0.137 to 1.0.140 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.137...v1.0.140) Updates `which` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/harryfei/which-rs/releases) - [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/harryfei/which-rs/compare/7.0.1...7.0.2) Updates `tempfile` from 3.15.0 to 3.17.1 - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.15.0...v3.17.1) Updates `pyo3` from 0.23.4 to 0.23.5 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.23.4...v0.23.5) Updates `napi` from 2.16.13 to 2.16.16 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi@2.16.13...napi@2.16.16) Updates `napi-build` from 2.1.4 to 2.1.5 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-build@2.1.4...napi-build@2.1.5) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: fast-glob dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: openssl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: openssl-probe dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: which dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: pyo3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: napi dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: napi-build dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 132 +++++++++++++++++++++++-------------- bindings/node/Cargo.toml | 6 +- bindings/python/Cargo.toml | 2 +- cpp-linter/Cargo.toml | 18 ++--- docs/Cargo.toml | 2 +- 5 files changed, 98 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9745458..404612b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,9 +99,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "arrayvec" @@ -201,16 +201,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-link", ] [[package]] @@ -242,18 +242,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.27" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", @@ -528,9 +528,9 @@ dependencies = [ [[package]] name = "fast-glob" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eca69ef247d19faa15ac0156968637440824e5ff22baa5ee0cd35b2f7ea6a0f" +checksum = "39ea3f6bbcf4dbe2076b372186fc7aeecd5f6f84754582e56ee7db262b15a6f0" dependencies = [ "arrayvec", ] @@ -668,7 +668,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", ] [[package]] @@ -1208,9 +1220,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "memchr" @@ -1249,7 +1261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -1279,9 +1291,9 @@ dependencies = [ [[package]] name = "napi" -version = "2.16.13" +version = "2.16.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214f07a80874bb96a8433b3cdfc84980d56c7b02e1a0d7ba4ba0db5cef785e2b" +checksum = "839ae2ee5e62c6348669c50098b187c08115bd3cced658c9c0bf945fca0fec83" dependencies = [ "bitflags", "ctor", @@ -1293,9 +1305,9 @@ dependencies = [ [[package]] name = "napi-build" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db836caddef23662b94e16bf1f26c40eceb09d6aee5d5b06a7ac199320b69b19" +checksum = "40685973218af4aa4b42486652692c294c44b5a67e4b2202df721c9063f2e51c" [[package]] name = "napi-derive" @@ -1384,9 +1396,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.70" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags", "cfg-if", @@ -1410,9 +1422,9 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" @@ -1425,9 +1437,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.105" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -1537,9 +1549,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" +checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" dependencies = [ "cfg-if", "indoc", @@ -1555,9 +1567,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" +checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" dependencies = [ "once_cell", "target-lexicon", @@ -1565,9 +1577,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" +checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" dependencies = [ "libc", "pyo3-build-config", @@ -1575,9 +1587,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" +checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1587,9 +1599,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" +checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" dependencies = [ "heck", "proc-macro2", @@ -1644,7 +1656,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -1757,7 +1769,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -1889,18 +1901,18 @@ checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", @@ -1909,9 +1921,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -2052,13 +2064,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.15.0" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -2292,6 +2304,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -2375,9 +2396,9 @@ dependencies = [ [[package]] name = "which" -version = "7.0.1" +version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028" +checksum = "2774c861e1f072b3aadc02f8ba886c26ad6321567ecc294c935434cad06f1283" dependencies = [ "either", "env_home", @@ -2403,6 +2424,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + [[package]] name = "windows-registry" version = "0.2.0" @@ -2521,6 +2548,15 @@ version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags", +] + [[package]] name = "write16" version = "1.0.0" diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index 912a9ad..fcc1d28 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -17,13 +17,13 @@ bench = false [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix -napi = { version = "2.16.13", default-features = false, features = ["napi4", "async"] } +napi = { version = "2.16.16", default-features = false, features = ["napi4", "async"] } napi-derive = "2.16.13" cpp-linter = { path = "../../cpp-linter" } -anyhow = "1.0.95" +anyhow = "1.0.97" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] [build-dependencies] -napi-build = "2.1.4" +napi-build = "2.1.5" diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index a9f0cd9..cd6c88b 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -17,7 +17,7 @@ crate-type = ["cdylib"] bench = false [dependencies] -pyo3 = { version = "0.23.4", features = ["extension-module"] } +pyo3 = { version = "0.23.5", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } tokio = "1.43.0" diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 450a955..6f3b1f2 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -14,32 +14,32 @@ license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.95" -chrono = "0.4.39" -clap = "4.5.27" +anyhow = "1.0.97" +chrono = "0.4.40" +clap = "4.5.31" colored = "3.0.0" -fast-glob = "0.4.3" +fast-glob = "0.4.5" futures = "0.3.31" git2 = "0.20.0" lenient_semver = "0.4.2" -log = { version = "0.4.25", features = ["std"] } +log = { version = "0.4.26", features = ["std"] } openssl = { version = "0.10", features = ["vendored"], optional = true } openssl-probe = { version = "0.1", optional = true } quick-xml = {version = "0.37.2", features = ["serialize"]} regex = "1.11.1" reqwest = "0.12.12" semver = "1.0.25" -serde = { version = "1.0.217", features = ["derive"] } -serde_json = "1.0.137" +serde = { version = "1.0.218", features = ["derive"] } +serde_json = "1.0.140" tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" tokio-stream = "0.1.17" -which = "7.0.1" +which = "7.0.2" [dev-dependencies] criterion = { version = "2.7.2", package = "codspeed-criterion-compat", features=["async_tokio"] } mockito = "1.6.1" -tempfile = "3.15.0" +tempfile = "3.17.1" [features] openssl-vendored = ["dep:openssl", "dep:openssl-probe"] diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 0c81671..783da25 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.23.4" +pyo3 = "0.23.5" [lib] name = "cli_gen" From fe05a78b8480cc0f3840274762dd8f94c6bed901 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 13:54:46 -0800 Subject: [PATCH 34/43] Bump ring from 0.17.8 to 0.17.13 (#119) Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13. - [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md) - [Commits](https://github.com/briansmith/ring/commits) --- updated-dependencies: - dependency-name: ring dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 404612b..9a10e93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1763,15 +1763,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -1980,12 +1979,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.0" From ae35567fe5746104b6fa798ffa69e04a25b1fd46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:16:11 -0700 Subject: [PATCH 35/43] Bump the cargo group with 7 updates (#120) Bumps the cargo group with 7 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.31` | `4.5.32` | | [semver](https://github.com/dtolnay/semver) | `1.0.25` | `1.0.26` | | [serde](https://github.com/serde-rs/serde) | `1.0.218` | `1.0.219` | | [tokio](https://github.com/tokio-rs/tokio) | `1.43.0` | `1.44.0` | | [mockito](https://github.com/lipanski/mockito) | `1.6.1` | `1.7.0` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.17.1` | `3.18.0` | | [pyo3](https://github.com/pyo3/pyo3) | `0.23.5` | `0.24.0` | Updates `clap` from 4.5.31 to 4.5.32 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.5.31...clap_complete-v4.5.32) Updates `semver` from 1.0.25 to 1.0.26 - [Release notes](https://github.com/dtolnay/semver/releases) - [Commits](https://github.com/dtolnay/semver/compare/1.0.25...1.0.26) Updates `serde` from 1.0.218 to 1.0.219 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.218...v1.0.219) Updates `tokio` from 1.43.0 to 1.44.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.44.0) Updates `mockito` from 1.6.1 to 1.7.0 - [Release notes](https://github.com/lipanski/mockito/releases) - [Commits](https://github.com/lipanski/mockito/compare/1.6.1...1.7.0) Updates `tempfile` from 3.17.1 to 3.18.0 - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.17.1...v3.18.0) Updates `pyo3` from 0.23.5 to 0.24.0 - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.23.5...v0.24.0) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: mockito dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: pyo3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 123 ++++++++++++++++++++++++------------- bindings/python/Cargo.toml | 4 +- cpp-linter/Cargo.toml | 12 ++-- docs/Cargo.toml | 2 +- 4 files changed, 90 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a10e93..177ffa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -242,18 +242,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.31" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstream", "anstyle", @@ -1202,6 +1202,12 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" +[[package]] +name = "linux-raw-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" + [[package]] name = "litemap" version = "0.7.4" @@ -1267,13 +1273,13 @@ dependencies = [ [[package]] name = "mockito" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2" +checksum = "7760e0e418d9b7e5777c0374009ca4c93861b9066f18cb334a20ce50ab63aa48" dependencies = [ "assert-json-diff", "bytes", - "colored 2.2.0", + "colored 3.0.0", "futures-util", "http", "http-body", @@ -1535,7 +1541,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -1549,9 +1555,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" +checksum = "7f1c6c3591120564d64db2261bec5f910ae454f01def849b9c22835a84695e86" dependencies = [ "cfg-if", "indoc", @@ -1567,9 +1573,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" +checksum = "e9b6c2b34cf71427ea37c7001aefbaeb85886a074795e35f161f5aecc7620a7a" dependencies = [ "once_cell", "target-lexicon", @@ -1577,9 +1583,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" +checksum = "5507651906a46432cdda02cd02dd0319f6064f1374c9147c45b978621d2c3a9c" dependencies = [ "libc", "pyo3-build-config", @@ -1587,9 +1593,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" +checksum = "b0d394b5b4fd8d97d48336bb0dd2aebabad39f1d294edd6bcd2cccf2eefe6f42" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1599,9 +1605,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.5" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" +checksum = "fd72da09cfa943b1080f621f024d2ef7e2773df7badd51aa30a2be1f8caa7c8e" dependencies = [ "heck", "proc-macro2", @@ -1631,20 +1637,20 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ - "libc", "rand_chacha", "rand_core", + "zerocopy 0.8.23", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -1652,11 +1658,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.1", ] [[package]] @@ -1790,7 +1796,20 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.9.2", "windows-sys 0.59.0", ] @@ -1894,24 +1913,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -2051,21 +2070,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.16" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[package]] name = "tempfile" -version = "3.17.1" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" +checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" dependencies = [ "cfg-if", "fastrand", "getrandom 0.3.1", "once_cell", - "rustix", + "rustix 1.0.2", "windows-sys 0.59.0", ] @@ -2091,9 +2110,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.43.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" dependencies = [ "backtrace", "bytes", @@ -2395,7 +2414,7 @@ checksum = "2774c861e1f072b3aadc02f8ba886c26ad6321567ecc294c935434cad06f1283" dependencies = [ "either", "env_home", - "rustix", + "rustix 0.38.43", "winsafe", ] @@ -2593,7 +2612,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", ] [[package]] @@ -2607,6 +2635,17 @@ dependencies = [ "syn", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zerofrom" version = "0.1.5" diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index cd6c88b..8b3c124 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -17,9 +17,9 @@ crate-type = ["cdylib"] bench = false [dependencies] -pyo3 = { version = "0.23.5", features = ["extension-module"] } +pyo3 = { version = "0.24.0", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } -tokio = "1.43.0" +tokio = "1.44.0" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 6f3b1f2..a143dae 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -16,7 +16,7 @@ license.workspace = true [dependencies] anyhow = "1.0.97" chrono = "0.4.40" -clap = "4.5.31" +clap = "4.5.32" colored = "3.0.0" fast-glob = "0.4.5" futures = "0.3.31" @@ -28,18 +28,18 @@ openssl-probe = { version = "0.1", optional = true } quick-xml = {version = "0.37.2", features = ["serialize"]} regex = "1.11.1" reqwest = "0.12.12" -semver = "1.0.25" -serde = { version = "1.0.218", features = ["derive"] } +semver = "1.0.26" +serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" -tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"]} +tokio = { version = "1.44.0", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" tokio-stream = "0.1.17" which = "7.0.2" [dev-dependencies] criterion = { version = "2.7.2", package = "codspeed-criterion-compat", features=["async_tokio"] } -mockito = "1.6.1" -tempfile = "3.17.1" +mockito = "1.7.0" +tempfile = "3.18.0" [features] openssl-vendored = ["dep:openssl", "dep:openssl-probe"] diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 783da25..42d8d6d 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.23.5" +pyo3 = "0.24.0" [lib] name = "cli_gen" From 33f23135787649fffd1573d6d13e82f0e73d2bd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 17:01:19 -0700 Subject: [PATCH 36/43] Bump the pip group across 1 directory with 2 updates (#117) Bumps the pip group with 2 updates in the / directory: [mkdocs-include-markdown-plugin](https://github.com/mondeja/mkdocs-include-markdown-plugin) and [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-include-markdown-plugin` from 7.1.2 to 7.1.4 - [Release notes](https://github.com/mondeja/mkdocs-include-markdown-plugin/releases) - [Commits](https://github.com/mondeja/mkdocs-include-markdown-plugin/compare/v7.1.2...v7.1.4) Updates `mkdocs-material` from 9.5.50 to 9.6.7 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.50...9.6.7) --- updated-dependencies: - dependency-name: mkdocs-include-markdown-plugin dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-minor dependency-group: pip ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 863a311..4b3ae9a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ markdown-gfm-admonition==0.1.1 mkdocs==1.6.1 mkdocs-gen-files==0.5.0 -mkdocs-include-markdown-plugin==7.1.2 -mkdocs-material==9.5.50 +mkdocs-include-markdown-plugin==7.1.5 +mkdocs-material==9.6.9 pyyaml==6.0.2 From 674bd23261ec28155dcce5481f9007790668ca74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:45:45 -0700 Subject: [PATCH 37/43] Bump pyo3 from 0.24.0 to 0.24.1 (#125) Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.24.0 to 0.24.1. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/v0.24.1/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.24.0...v0.24.1) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 20 ++++++++++---------- bindings/python/Cargo.toml | 2 +- docs/Cargo.toml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 177ffa2..c6aaa63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1555,9 +1555,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1c6c3591120564d64db2261bec5f910ae454f01def849b9c22835a84695e86" +checksum = "17da310086b068fbdcefbba30aeb3721d5bb9af8db4987d6735b2183ca567229" dependencies = [ "cfg-if", "indoc", @@ -1573,9 +1573,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b6c2b34cf71427ea37c7001aefbaeb85886a074795e35f161f5aecc7620a7a" +checksum = "e27165889bd793000a098bb966adc4300c312497ea25cf7a690a9f0ac5aa5fc1" dependencies = [ "once_cell", "target-lexicon", @@ -1583,9 +1583,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5507651906a46432cdda02cd02dd0319f6064f1374c9147c45b978621d2c3a9c" +checksum = "05280526e1dbf6b420062f3ef228b78c0c54ba94e157f5cb724a609d0f2faabc" dependencies = [ "libc", "pyo3-build-config", @@ -1593,9 +1593,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d394b5b4fd8d97d48336bb0dd2aebabad39f1d294edd6bcd2cccf2eefe6f42" +checksum = "5c3ce5686aa4d3f63359a5100c62a127c9f15e8398e5fdeb5deef1fed5cd5f44" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1605,9 +1605,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd72da09cfa943b1080f621f024d2ef7e2773df7badd51aa30a2be1f8caa7c8e" +checksum = "f4cf6faa0cbfb0ed08e89beb8103ae9724eb4750e3a78084ba4017cbe94f3855" dependencies = [ "heck", "proc-macro2", diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 8b3c124..c6c110c 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -17,7 +17,7 @@ crate-type = ["cdylib"] bench = false [dependencies] -pyo3 = { version = "0.24.0", features = ["extension-module"] } +pyo3 = { version = "0.24.1", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } tokio = "1.44.0" diff --git a/docs/Cargo.toml b/docs/Cargo.toml index 42d8d6d..ab481d7 100644 --- a/docs/Cargo.toml +++ b/docs/Cargo.toml @@ -11,7 +11,7 @@ license.workspace = true [dependencies] cpp-linter = { path = "../cpp-linter" } -pyo3 = "0.24.0" +pyo3 = "0.24.1" [lib] name = "cli_gen" From a2e0758af6bdd700d3359ec45e03c3ce23a5cbe9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 17:10:42 -0700 Subject: [PATCH 38/43] Bump openssl from 0.10.71 to 0.10.72 (#127) Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.71 to 0.10.72. - [Release notes](https://github.com/sfackler/rust-openssl/releases) - [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72) --- updated-dependencies: - dependency-name: openssl dependency-version: 0.10.72 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6aaa63..9388185 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1402,9 +1402,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags", "cfg-if", @@ -1443,9 +1443,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" dependencies = [ "cc", "libc", From 4b17e5eba5cc4a9f4386c8f2f33e45f287ff8f75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:44:41 -0700 Subject: [PATCH 39/43] Bump pypa/gh-action-pypi-publish in the actions group (#103) Bumps the actions group with 1 update: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish). Updates `pypa/gh-action-pypi-publish` from 1.12.3 to 1.12.4 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/67339c736fd9354cd4f8cb0b744f2b82a74b5c70...76f52bc884231f62b9a034ebfe128415bbaabdfc) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/python-packaging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-packaging.yml b/.github/workflows/python-packaging.yml index 2cdf30c..ee3b33a 100644 --- a/.github/workflows/python-packaging.yml +++ b/.github/workflows/python-packaging.yml @@ -185,7 +185,7 @@ jobs: path: dist merge-multiple: true - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc with: attestations: true skip-existing: true From 7e61a23f0f6e3088d9f3dbd81e503ee43c3a702a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 17:30:39 -0700 Subject: [PATCH 40/43] Bump the npm group across 1 directory with 3 updates (#118) Bumps the npm group with 3 updates in the / directory: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint) and [globals](https://github.com/sindresorhus/globals). Updates `@eslint/js` from 9.18.0 to 9.21.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.21.0/packages/js) Updates `eslint` from 9.18.0 to 9.21.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.21.0) Updates `globals` from 15.14.0 to 16.0.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.14.0...v16.0.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- bindings/node/package.json | 6 +- yarn.lock | 111 +++++++++++++++++++++---------------- 2 files changed, 65 insertions(+), 52 deletions(-) diff --git a/bindings/node/package.json b/bindings/node/package.json index 45fcc0c..e68304f 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -9,11 +9,11 @@ }, "license": "MIT", "devDependencies": { - "@eslint/js": "^9.18.0", + "@eslint/js": "^9.24.0", "@napi-rs/cli": "^2.18.4", "ava": "^6.2.0", - "eslint": "^9.18.0", - "globals": "^15.14.0" + "eslint": "^9.24.0", + "globals": "^16.0.0" }, "ava": { "timeout": "3m" diff --git a/yarn.lock b/yarn.lock index 5fcce4e..bb8d438 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,26 +14,38 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/config-array@^0.19.0": - version "0.19.0" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519" - integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ== +"@eslint/config-array@^0.20.0": + version "0.20.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.20.0.tgz#7a1232e82376712d3340012a2f561a2764d1988f" + integrity sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ== dependencies: - "@eslint/object-schema" "^2.1.4" + "@eslint/object-schema" "^2.1.6" debug "^4.3.1" minimatch "^3.1.2" -"@eslint/core@^0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091" - integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw== +"@eslint/config-helpers@^0.2.0": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.2.1.tgz#26042c028d1beee5ce2235a7929b91c52651646d" + integrity sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw== + +"@eslint/core@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.12.0.tgz#5f960c3d57728be9f6c65bd84aa6aa613078798e" + integrity sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg== dependencies: "@types/json-schema" "^7.0.15" -"@eslint/eslintrc@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" - integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== +"@eslint/core@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.13.0.tgz#bf02f209846d3bf996f9e8009db62df2739b458c" + integrity sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.1.tgz#e55f7f1dd400600dd066dbba349c4c0bac916964" + integrity sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -45,22 +57,22 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.18.0", "@eslint/js@^9.18.0": - version "9.18.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.18.0.tgz#3356f85d18ed3627ab107790b53caf7e1e3d1e84" - integrity sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA== +"@eslint/js@9.24.0", "@eslint/js@^9.24.0": + version "9.24.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.24.0.tgz#685277980bb7bf84ecc8e4e133ccdda7545a691e" + integrity sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA== -"@eslint/object-schema@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" - integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== +"@eslint/object-schema@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f" + integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== -"@eslint/plugin-kit@^0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81" - integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A== +"@eslint/plugin-kit@^0.2.7": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz#47488d8f8171b5d4613e833313f3ce708e3525f8" + integrity sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA== dependencies: - "@eslint/core" "^0.10.0" + "@eslint/core" "^0.13.0" levn "^0.4.1" "@humanfs/core@^0.19.1": @@ -86,10 +98,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== -"@humanwhocodes/retry@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" - integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== +"@humanwhocodes/retry@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.2.tgz#1860473de7dfa1546767448f333db80cb0ff2161" + integrity sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ== "@mapbox/node-pre-gyp@^1.0.11": version "1.0.11" @@ -567,10 +579,10 @@ escape-string-regexp@^5.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -eslint-scope@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" - integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== +eslint-scope@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.3.0.tgz#10cd3a918ffdd722f5f3f7b5b83db9b23c87340d" + integrity sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -585,21 +597,22 @@ eslint-visitor-keys@^4.2.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.18.0.tgz#c95b24de1183e865de19f607fda6518b54827850" - integrity sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA== +eslint@^9.24.0: + version "9.24.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.24.0.tgz#9a7f2e6cb2de81c405ab244b02f4584c79dc6bee" + integrity sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.12.1" - "@eslint/config-array" "^0.19.0" - "@eslint/core" "^0.10.0" - "@eslint/eslintrc" "^3.2.0" - "@eslint/js" "9.18.0" - "@eslint/plugin-kit" "^0.2.5" + "@eslint/config-array" "^0.20.0" + "@eslint/config-helpers" "^0.2.0" + "@eslint/core" "^0.12.0" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.24.0" + "@eslint/plugin-kit" "^0.2.7" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.4.1" + "@humanwhocodes/retry" "^0.4.2" "@types/estree" "^1.0.6" "@types/json-schema" "^7.0.15" ajv "^6.12.4" @@ -607,7 +620,7 @@ eslint@^9.18.0: cross-spawn "^7.0.6" debug "^4.3.2" escape-string-regexp "^4.0.0" - eslint-scope "^8.2.0" + eslint-scope "^8.3.0" eslint-visitor-keys "^4.2.0" espree "^10.3.0" esquery "^1.5.0" @@ -826,10 +839,10 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globals@^15.14.0: - version "15.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-15.14.0.tgz#b8fd3a8941ff3b4d38f3319d433b61bbb482e73f" - integrity sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig== +globals@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-16.0.0.tgz#3d7684652c5c4fbd086ec82f9448214da49382d8" + integrity sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A== globby@^14.0.2: version "14.0.2" From 6b3ddb1647608069227dfc473373110c86a3d102 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 17:31:00 -0700 Subject: [PATCH 41/43] Bump mkdocs-material from 9.6.9 to 9.6.10 in the pip group (#123) Bumps the pip group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-material` from 9.6.9 to 9.6.10 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.9...9.6.10) --- updated-dependencies: - dependency-name: mkdocs-material dependency-version: 9.6.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pip ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 4b3ae9a..45b1e63 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ markdown-gfm-admonition==0.1.1 mkdocs==1.6.1 mkdocs-gen-files==0.5.0 mkdocs-include-markdown-plugin==7.1.5 -mkdocs-material==9.6.9 +mkdocs-material==9.6.11 pyyaml==6.0.2 From 57cd33a6adc882a738d268847e3c09dd8c071d3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:31:18 -0700 Subject: [PATCH 42/43] Bump tokio from 1.44.0 to 1.44.2 (#128) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.0 to 1.44.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.0...tokio-1.44.2) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.44.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- bindings/python/Cargo.toml | 2 +- cpp-linter/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9388185..931f0c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2110,9 +2110,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.44.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index c6c110c..576ad9c 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -19,7 +19,7 @@ bench = false [dependencies] pyo3 = { version = "0.24.1", features = ["extension-module"] } cpp-linter = { path = "../../cpp-linter" } -tokio = "1.44.0" +tokio = "1.44.2" [features] openssl-vendored = ["cpp-linter/openssl-vendored"] diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index a143dae..8ea15a5 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -31,7 +31,7 @@ reqwest = "0.12.12" semver = "1.0.26" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" -tokio = { version = "1.44.0", features = ["macros", "rt-multi-thread"]} +tokio = { version = "1.44.2", features = ["macros", "rt-multi-thread"]} tokio-macros = "2.4.0" tokio-stream = "0.1.17" which = "7.0.2" From dfa4767d931de4b8bb8a561249a8d2505acb2117 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 05:43:59 -0700 Subject: [PATCH 43/43] Bump the cargo group across 1 directory with 8 updates (#129) Bumps the cargo group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.32` | `4.5.35` | | [git2](https://github.com/rust-lang/git2-rs) | `0.20.0` | `0.20.1` | | [log](https://github.com/rust-lang/log) | `0.4.26` | `0.4.27` | | [quick-xml](https://github.com/tafia/quick-xml) | `0.37.2` | `0.37.4` | | [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.12` | `0.12.15` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.18.0` | `3.19.1` | | [napi](https://github.com/napi-rs/napi-rs) | `2.16.16` | `2.16.17` | | [napi-build](https://github.com/napi-rs/napi-rs) | `2.1.5` | `2.1.6` | Updates `clap` from 4.5.32 to 4.5.35 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.32...clap_complete-v4.5.35) Updates `git2` from 0.20.0 to 0.20.1 - [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.20.0...git2-0.20.1) Updates `log` from 0.4.26 to 0.4.27 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27) Updates `quick-xml` from 0.37.2 to 0.37.4 - [Release notes](https://github.com/tafia/quick-xml/releases) - [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md) - [Commits](https://github.com/tafia/quick-xml/compare/v0.37.2...v0.37.4) Updates `reqwest` from 0.12.12 to 0.12.15 - [Release notes](https://github.com/seanmonstar/reqwest/releases) - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md) - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.12...v0.12.15) Updates `tempfile` from 3.18.0 to 3.19.1 - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.18.0...v3.19.1) Updates `napi` from 2.16.16 to 2.16.17 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi@2.16.16...napi@2.16.17) Updates `napi-build` from 2.1.5 to 2.1.6 - [Release notes](https://github.com/napi-rs/napi-rs/releases) - [Commits](https://github.com/napi-rs/napi-rs/compare/napi-build@2.1.5...napi-build@2.1.6) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.35 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: git2 dependency-version: 0.20.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: log dependency-version: 0.4.27 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: quick-xml dependency-version: 0.37.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: reqwest dependency-version: 0.12.15 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: tempfile dependency-version: 3.19.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: cargo - dependency-name: napi dependency-version: 2.16.17 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo - dependency-name: napi-build dependency-version: 2.1.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: cargo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 154 +++++++++++++++++++++++++++------------ bindings/node/Cargo.toml | 4 +- cpp-linter/Cargo.toml | 12 +-- 3 files changed, 116 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 931f0c9..9cc5d85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,7 +143,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -242,18 +242,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.32" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.32" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" dependencies = [ "anstream", "anstyle", @@ -680,7 +680,7 @@ dependencies = [ "cfg-if", "libc", "wasi 0.13.3+wasi-0.2.2", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -691,9 +691,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "git2" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" +checksum = "5220b8ba44c68a9a7f7a7659e864dd73692e417ef0211bea133c7b74e031eeb9" dependencies = [ "bitflags", "libc", @@ -1148,9 +1148,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" -version = "0.18.0+1.9.0" +version = "0.18.1+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" +checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" dependencies = [ "cc", "libc", @@ -1167,7 +1167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1226,9 +1226,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" @@ -1297,9 +1297,9 @@ dependencies = [ [[package]] name = "napi" -version = "2.16.16" +version = "2.16.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839ae2ee5e62c6348669c50098b187c08115bd3cced658c9c0bf945fca0fec83" +checksum = "55740c4ae1d8696773c78fdafd5d0e5fe9bc9f1b071c7ba493ba5c413a9184f3" dependencies = [ "bitflags", "ctor", @@ -1311,9 +1311,9 @@ dependencies = [ [[package]] name = "napi-build" -version = "2.1.5" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40685973218af4aa4b42486652692c294c44b5a67e4b2202df721c9063f2e51c" +checksum = "e28acfa557c083f6e254a786e01ba253fc56f18ee000afcd4f79af735f73a6da" [[package]] name = "napi-derive" @@ -1474,7 +1474,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1618,9 +1618,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.37.2" +version = "0.37.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +checksum = "a4ce8c88de324ff838700f36fb6ab86c96df0e3c4ab6ef3a9b2044465cce1369" dependencies = [ "memchr", "serde", @@ -1725,9 +1725,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ "base64", "bytes", @@ -2076,11 +2076,10 @@ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" [[package]] name = "tempfile" -version = "3.18.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand", "getrandom 0.3.1", "once_cell", @@ -2433,7 +2432,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2444,32 +2443,31 @@ checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets", + "windows-link", ] [[package]] @@ -2478,7 +2476,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2487,7 +2485,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -2496,14 +2494,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -2512,48 +2526,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winsafe" version = "0.0.19" diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index fcc1d28..ec3da3d 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -17,7 +17,7 @@ bench = false [dependencies] # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix -napi = { version = "2.16.16", default-features = false, features = ["napi4", "async"] } +napi = { version = "2.16.17", default-features = false, features = ["napi4", "async"] } napi-derive = "2.16.13" cpp-linter = { path = "../../cpp-linter" } anyhow = "1.0.97" @@ -26,4 +26,4 @@ anyhow = "1.0.97" openssl-vendored = ["cpp-linter/openssl-vendored"] [build-dependencies] -napi-build = "2.1.5" +napi-build = "2.1.6" diff --git a/cpp-linter/Cargo.toml b/cpp-linter/Cargo.toml index 8ea15a5..56ae81a 100644 --- a/cpp-linter/Cargo.toml +++ b/cpp-linter/Cargo.toml @@ -16,18 +16,18 @@ license.workspace = true [dependencies] anyhow = "1.0.97" chrono = "0.4.40" -clap = "4.5.32" +clap = "4.5.35" colored = "3.0.0" fast-glob = "0.4.5" futures = "0.3.31" -git2 = "0.20.0" +git2 = "0.20.1" lenient_semver = "0.4.2" -log = { version = "0.4.26", features = ["std"] } +log = { version = "0.4.27", features = ["std"] } openssl = { version = "0.10", features = ["vendored"], optional = true } openssl-probe = { version = "0.1", optional = true } -quick-xml = {version = "0.37.2", features = ["serialize"]} +quick-xml = {version = "0.37.4", features = ["serialize"]} regex = "1.11.1" -reqwest = "0.12.12" +reqwest = "0.12.15" semver = "1.0.26" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" @@ -39,7 +39,7 @@ which = "7.0.2" [dev-dependencies] criterion = { version = "2.7.2", package = "codspeed-criterion-compat", features=["async_tokio"] } mockito = "1.7.0" -tempfile = "3.18.0" +tempfile = "3.19.1" [features] openssl-vendored = ["dep:openssl", "dep:openssl-probe"]