mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Rename the go module to github.com/github/codeql-go
This commit is contained in:
@@ -94,7 +94,7 @@ func getImportPath() (importpath string) {
|
||||
}
|
||||
|
||||
func getImportPathFromRepoURL(repourl string) string {
|
||||
// check for scp-like URL as in "git@github.com:Semmle/go.git"
|
||||
// check for scp-like URL as in "git@github.com:github/codeql-go.git"
|
||||
shorturl := regexp.MustCompile("^([^@]+@)?([^:]+):([^/].*?)(\\.git)?$")
|
||||
m := shorturl.FindStringSubmatch(repourl)
|
||||
if m != nil {
|
||||
|
||||
@@ -4,11 +4,11 @@ import "testing"
|
||||
|
||||
func TestGetImportPathFromRepoURL(t *testing.T) {
|
||||
tests := map[string]string{
|
||||
"git@github.com:Semmle/go.git": "github.com/Semmle/go",
|
||||
"git@github.com:Semmle/go": "github.com/Semmle/go",
|
||||
"https://github.com/Semmle/go.git": "github.com/Semmle/go",
|
||||
"https://github.com:12345/Semmle/go": "github.com/Semmle/go",
|
||||
"gitolite@some.url:some/repo": "some.url/some/repo",
|
||||
"git@github.com:github/codeql-go.git": "github.com/github/codeql-go",
|
||||
"git@github.com:github/codeql-go": "github.com/github/codeql-go",
|
||||
"https://github.com/github/codeql-go.git": "github.com/github/codeql-go",
|
||||
"https://github.com:12345/github/codeql-go": "github.com/github/codeql-go",
|
||||
"gitolite@some.url:some/repo": "some.url/some/repo",
|
||||
}
|
||||
for input, expected := range tests {
|
||||
actual := getImportPathFromRepoURL(input)
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/Semmle/go/extractor/dbscheme"
|
||||
"github.com/github/codeql-go/extractor/dbscheme"
|
||||
|
||||
"github.com/Semmle/go/extractor"
|
||||
"github.com/github/codeql-go/extractor"
|
||||
)
|
||||
|
||||
func usage() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/Semmle/go/extractor/trap"
|
||||
"github.com/github/codeql-go/extractor/trap"
|
||||
)
|
||||
|
||||
// A Type represents a database type
|
||||
|
||||
@@ -17,9 +17,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/Semmle/go/extractor/dbscheme"
|
||||
"github.com/Semmle/go/extractor/srcarchive"
|
||||
"github.com/Semmle/go/extractor/trap"
|
||||
"github.com/github/codeql-go/extractor/dbscheme"
|
||||
"github.com/github/codeql-go/extractor/srcarchive"
|
||||
"github.com/github/codeql-go/extractor/trap"
|
||||
"golang.org/x/tools/go/packages"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/Semmle/go/extractor/srcarchive"
|
||||
"github.com/github/codeql-go/extractor/srcarchive"
|
||||
"golang.org/x/tools/go/packages"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user