@@ -92,14 +92,6 @@ func getEnvGoSemVer() string {
92
92
return "v" + goVersion [2 :]
93
93
}
94
94
95
- func tryBuild (buildFile , cmd string , args ... string ) bool {
96
- if util .FileExists (buildFile ) {
97
- log .Printf ("%s found, running %s\n " , buildFile , cmd )
98
- return util .RunCmd (exec .Command (cmd , args ... ))
99
- }
100
- return false
101
- }
102
-
103
95
// Returns the import path of the package being built, or "" if it cannot be determined.
104
96
func getImportPath () (importpath string ) {
105
97
importpath = os .Getenv ("LGTM_INDEX_IMPORT_PATH" )
@@ -129,7 +121,7 @@ func getImportPath() (importpath string) {
129
121
// determined.
130
122
func getImportPathFromRepoURL (repourl string ) string {
131
123
// check for scp-like URL as in "[email protected] :github/codeql-go.git"
132
- shorturl := regexp .MustCompile (" ^([^@]+@)?([^:]+):([^/].*?)(\\ .git)?$" )
124
+ shorturl := regexp .MustCompile (` ^([^@]+@)?([^:]+):([^/].*?)(\.git)?$` )
133
125
m := shorturl .FindStringSubmatch (repourl )
134
126
if m != nil {
135
127
return m [2 ] + "/" + m [3 ]
@@ -153,7 +145,7 @@ func getImportPathFromRepoURL(repourl string) string {
153
145
host := u .Hostname ()
154
146
path := u .Path
155
147
// strip off leading slashes and trailing `.git` if present
156
- path = regexp .MustCompile (" ^/+|\\ .git$" ).ReplaceAllString (path , "" )
148
+ path = regexp .MustCompile (` ^/+|\.git$` ).ReplaceAllString (path , "" )
157
149
return host + "/" + path
158
150
}
159
151
0 commit comments