clang-tidy parser and executor #26
|  | @ -110,7 +110,6 @@ func group_messages(messages []ClangMessage) []ClangMessage { | |||
| } | ||||
| 
 | ||||
| func convert_paths_to_relative(messages *[]ClangMessage) { | ||||
| 	// currentDir, _ := os.Getwd()
 | ||||
| 	currentDir := "/w" | ||||
| 
					
					zjc_he marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
| 	for i := range *messages { | ||||
| 		(*messages)[i].filepath, _ = filepath.Rel(currentDir, (*messages)[i].filepath) | ||||
|  |  | |||
|  | @ -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 | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
I think it should be part of the config file with default value
"/w". Since the work dir in the sandbox can also be changed, it should not be hardcoded.