Closed 2bndy5 closed 1 month ago
The changes involve the addition of a new dependency, colored
, to the README.md
and Cargo.toml
files, along with updates to the logging system within the cpp-linter
project. The logging mechanism has been enhanced by integrating the RestApiClient
, replacing existing logger calls with new methods for managing log groups. Additionally, modifications to the GithubApiClient
and TestClient
include new methods for logging, and the run_main
function has been adjusted to utilize the new logging structure. Overall, these changes improve the logging capabilities and dependency management.
File | Change Summary |
---|---|
README.md | Added new dependency colored licensed under MPL-2.0. |
cpp-linter/Cargo.toml | Added dependency colored = "2.1.0" . Updated log dependency to log = { version = "0.4.22", features = ["std"] } . |
cpp-linter/src/clang_tools/mod.rs | Integrated RestApiClient into logging; updated capture_clang_tools_output function signature. |
cpp-linter/src/logger.rs | Added SimpleLogger struct; updated logging methods to use colored crate; removed start_log_group and end_log_group from public API. |
cpp-linter/src/rest_api/github/mod.rs | Added start_log_group and end_log_group methods to RestApiClient implementation in GithubApiClient . |
cpp-linter/src/rest_api/mod.rs | Added start_log_group and end_log_group methods to RestApiClient ; updated TestClient for logging. |
cpp-linter/src/run.rs | Updated run_main function to use RestApiClient for logging operations. |
sequenceDiagram
participant User
participant RunMain
participant RestApiClient
participant GithubApiClient
User->>RunMain: Start process
RunMain->>RestApiClient: start_log_group("Get list of specified source files")
RestApiClient->>GithubApiClient: start_log_group("Fetching files")
GithubApiClient-->>RestApiClient: Log files fetched
RestApiClient->>RunMain: end_log_group()
RunMain->>RestApiClient: start_log_group("Posting feedback")
RestApiClient->>GithubApiClient: post_feedback()
GithubApiClient-->>RestApiClient: Log feedback posted
RestApiClient->>RunMain: end_log_group()
RunMain-->>User: Process completed
🐇 "With colors bright and logs so neat,
The changes hop, a joyful feat!
A client new to guide the way,
In every log, a bright display!
From files to feedback, all in sync,
Let's celebrate with a happy wink!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.48%. Comparing base (
da09e54
) to head (7062177
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Uses a new dependency
colored
to get cross-platform compatible for terminal colors. Supports an environment variableCPP_LINTER_COLOR
that (if set to1
,on
, ortrue
) will force color output when it is automatically disabled (seecolored
features which follows standards).I also moved the log grouping functions into the
rest_api
module. Technically, the log grouping commands we currently use are specific to GitHub. Other Git servers (like GitLab) implement these differently.Summary by CodeRabbit
Release Notes
New Features
colored
, enhancing log message visibility with color coding.start_log_group
andend_log_group
to improve log organization within the API client.Bug Fixes
GithubApiClient
for better feedback management.Documentation
README.md
to reflect the addition of the newcolored
dependency and its license information.Chores