Skip to content

Commit

Permalink
add regex for windows path in clang tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ErezAmihud authored and psastras committed Jul 30, 2023
1 parent a1c58fb commit 10fb98d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde-sarif/src/converters/clang_tidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn parse_clang_tidy_line(
line: Result<String, std::io::Error>,
) -> Option<ClangTidyResult> {
let re = Regex::new(
r#"^(?P<file>[\w/\.\- ]+):(?P<line>\d+):(?P<column>\d+):\s+(?P<level>error|warning|info|note):\s+(?P<message>.+)(?:\s+(?P<rules>\[[\w\-,\.]+\]))?$"#,
r#"^(?P<file>([a-zA-Z]:|)[\w/\.\- \\]+):(?P<line>\d+):(?P<column>\d+):\s+(?P<level>error|warning|info|note):\s+(?P<message>.+)(?:\s+(?P<rules>\[[\w\-,\.]+\]))?$"#,
).unwrap();
let line = line.unwrap();
let caps = re.captures(&line);
Expand Down

0 comments on commit 10fb98d

Please sign in to comment.