File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
package engine
2
2
3
3
import (
4
- "crypto/md5"
5
- "encoding/hex"
6
4
"path/filepath"
7
5
"regexp"
8
6
"strings"
@@ -21,20 +19,18 @@ func ToolNormalizer(tool string) string {
21
19
if strings .HasSuffix (tool , system .Suffix ) {
22
20
tool = strings .TrimSuffix (tool , filepath .Ext (tool ))
23
21
}
22
+ tool = strings .TrimPrefix (tool , "sys." )
24
23
25
24
if validToolName .MatchString (tool ) {
26
25
return tool
27
26
}
28
27
29
- name := invalidChars .ReplaceAllString (tool , "- " )
28
+ name := invalidChars .ReplaceAllString (tool , "_ " )
30
29
if len (name ) > 55 {
31
30
name = name [:55 ]
32
31
}
33
32
34
- hash := md5 .Sum ([]byte (tool ))
35
- hexed := hex .EncodeToString (hash [:])
36
-
37
- return name + "-" + hexed [:8 ]
33
+ return name
38
34
}
39
35
40
36
func PickToolName (toolName string , existing map [string ]struct {}) string {
You can’t perform that action at this time.
0 commit comments