clang-tidy parser and executor #26

Merged
张泊明518370910136 merged 26 commits from clang-tidy into master 2024-05-18 02:50:13 +08:00
2 changed files with 0 additions and 6 deletions
Showing only changes of commit 5c42a5f055 - Show all commits

View File

@ -110,7 +110,6 @@ func group_messages(messages []ClangMessage) []ClangMessage {
}
func convert_paths_to_relative(messages *[]ClangMessage) {
// currentDir, _ := os.Getwd()
currentDir := "/w"
for i := range *messages {
(*messages)[i].filepath, _ = filepath.Rel(currentDir, (*messages)[i].filepath)

View File

@ -15,17 +15,12 @@ func get_score(json_messages []json_message, conf Conf) int {
fullmark := conf.Score
for _, json_message := range json_messages {
keyword := json_message.Check_name
flag := false
for _, match := range conf.Matches {
if Contains(match.Keyword, keyword) {
fullmark -= match.Score
flag = true
break
}
}
if !flag {
fullmark -= 1
}
}
return fullmark
}