Skip to content

Commit 15f6b63

Browse files
authored
fix: show used clang tools' version in logs (#336)
resolves #335 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added explicit version logging for clang-tidy and clang-format tools. Users can now see which specific versions of these tools are being used during linting and formatting operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent e82885a commit 15f6b63

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • cpp-linter/src/clang_tools

cpp-linter/src/clang_tools/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ pub async fn capture_clang_tools_output(
113113
let tool_info = version.eval_tool(&tool, false, None).await?.ok_or(anyhow!(
114114
"Failed to find {tool} or install a suitable version"
115115
))?;
116+
log::info!(
117+
"Using {tool} version {}.{}.{}",
118+
tool_info.version.major,
119+
tool_info.version.minor,
120+
tool_info.version.patch,
121+
);
116122
clang_versions.tidy_version = Some(tool_info.version);
117123
clang_params.clang_tidy_command = Some(tool_info.path);
118124
}
@@ -121,6 +127,12 @@ pub async fn capture_clang_tools_output(
121127
let tool_info = version.eval_tool(&tool, false, None).await?.ok_or(anyhow!(
122128
"Failed to find {tool} or install a suitable version"
123129
))?;
130+
log::info!(
131+
"Using {tool} version {}.{}.{}",
132+
tool_info.version.major,
133+
tool_info.version.minor,
134+
tool_info.version.patch,
135+
);
124136
clang_versions.format_version = Some(tool_info.version);
125137
clang_params.clang_format_command = Some(tool_info.path);
126138
}

0 commit comments

Comments
 (0)