Skip to content

Commit

Permalink
🚸 Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hybloid committed Aug 12, 2024
1 parent fcf9042 commit 176d941
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 53 deletions.
28 changes: 0 additions & 28 deletions cmd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,6 @@ func createProject(t *testing.T, name string) string {
return location
}

func createNativeProject(t *testing.T, name string) string {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
location := filepath.Join(home, ".qodana_scan_", name)
err = gitClone("https://github.com/hybloid/BadRulesProject", location)
if err != nil {
t.Fatal(err)
}
return location
}

func gitClone(repoURL, directory string) error {
if _, err := os.Stat(directory); !os.IsNotExist(err) {
err = os.RemoveAll(directory)
if err != nil {
return err
}
}
cmd := exec.Command("git", "clone", repoURL, directory)
err := cmd.Run()
if err != nil {
return err
}
return nil
}

// TestVersion verifies that the version command returns the correct version
func TestVersion(t *testing.T) {
b := bytes.NewBufferString("")
Expand Down
25 changes: 0 additions & 25 deletions core/ide.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,31 +280,6 @@ func toQodanaCode(baseProduct string) string {
}
}

func scriptToProductCode(scriptName string) string {
switch scriptName {
case idea:
return platform.QDJVM
case phpStorm:
return platform.QDPHP
case webStorm:
return platform.QDJS
case rider:
return platform.QDNET
case pyCharm:
return platform.QDPY
case rubyMine:
return platform.QDRUBY
case goLand:
return platform.QDGO
case rustRover:
return platform.QDRST
case clion:
return platform.QDCPP
default:
return "QD"
}
}

func findIde(dir string) string {
for _, element := range supportedIdes {
if _, err := os.Stat(filepath.Join(dir, fmt.Sprintf("%s%s", element, getScriptSuffix()))); err == nil {
Expand Down

0 comments on commit 176d941

Please sign in to comment.