Skip to content

Commit e3f0345

Browse files
committed
hack: remove some tools
1 parent 5b319ed commit e3f0345

File tree

1 file changed

+39
-40
lines changed

1 file changed

+39
-40
lines changed

cmd/init.go

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ func configFileTemplate(tools []tools.Tool) string {
8484
// Default versions
8585
eslintVersion := "9.3.0"
8686
trivyVersion := "0.59.1" // Latest stable version
87-
pylintVersion := "3.3.6"
88-
pmdVersion := "6.55.0"
87+
// pylintVersion := "3.3.6"
88+
// pmdVersion := "6.55.0"
8989

9090
for _, tool := range tools {
9191
if tool.Uuid == "f8b29663-2cb2-498d-b923-a10c6a8c05cd" {
@@ -94,23 +94,22 @@ func configFileTemplate(tools []tools.Tool) string {
9494
if tool.Uuid == "2fd7fbe0-33f9-4ab3-ab73-e9b62404e2cb" {
9595
trivyVersion = tool.Version
9696
}
97-
if tool.Uuid == "31677b6d-4ae0-4f56-8041-606a8d7a8e61" {
98-
pylintVersion = tool.Version
99-
}
100-
if tool.Uuid == "9ed24812-b6ee-4a58-9004-0ed183c45b8f" {
101-
pmdVersion = tool.Version
102-
}
97+
// if tool.Uuid == "31677b6d-4ae0-4f56-8041-606a8d7a8e61" {
98+
// pylintVersion = tool.Version
99+
// }
100+
// if tool.Uuid == "9ed24812-b6ee-4a58-9004-0ed183c45b8f" {
101+
// pmdVersion = tool.Version
102+
// }
103103
}
104104

105+
//TODO: Don't merge this
106+
105107
return fmt.Sprintf(`runtimes:
106108
- node@22.2.0
107-
- python@3.11.11
108109
tools:
109110
- eslint@%s
110111
- trivy@%s
111-
- pylint@%s
112-
- pmd@%s
113-
`, eslintVersion, trivyVersion, pylintVersion, pmdVersion)
112+
`, eslintVersion, trivyVersion)
114113
}
115114

116115
func buildRepositoryConfigurationFiles(token string) error {
@@ -170,19 +169,19 @@ func buildRepositoryConfigurationFiles(token string) error {
170169
// ESLint configuration
171170
eslintApiConfiguration := extractESLintConfiguration(apiToolConfigurations)
172171
if eslintApiConfiguration != nil {
173-
eslintDomainConfiguration := convertAPIToolConfigurationToDomain(*eslintApiConfiguration)
174-
eslintConfigurationString := tools.CreateEslintConfig(eslintDomainConfiguration)
175-
176-
eslintConfigFile, err := os.Create("eslint.config.mjs")
177-
if err != nil {
178-
return fmt.Errorf("failed to create eslint config file: %v", err)
179-
}
180-
defer eslintConfigFile.Close()
181-
182-
_, err = eslintConfigFile.WriteString(eslintConfigurationString)
183-
if err != nil {
184-
return fmt.Errorf("failed to write eslint config: %v", err)
185-
}
172+
// eslintDomainConfiguration := convertAPIToolConfigurationToDomain(*eslintApiConfiguration)
173+
//eslintConfigurationString := tools.CreateEslintConfig(eslintDomainConfiguration)
174+
175+
// eslintConfigFile, err := os.Create("eslint.config.mjs")
176+
// if err != nil {
177+
// return fmt.Errorf("failed to create eslint config file: %v", err)
178+
// }
179+
// defer eslintConfigFile.Close()
180+
181+
// _, err = eslintConfigFile.WriteString(eslintConfigurationString)
182+
// if err != nil {
183+
// return fmt.Errorf("failed to write eslint config: %v", err)
184+
// }
186185
fmt.Println("ESLint configuration created based on Codacy settings")
187186
} else {
188187
err = createDefaultEslintConfigFile()
@@ -208,21 +207,21 @@ func buildRepositoryConfigurationFiles(token string) error {
208207
fmt.Println("Default Trivy configuration created")
209208
}
210209

211-
// PMD configuration
212-
pmdApiConfiguration := extractPMDConfiguration(apiToolConfigurations)
213-
if pmdApiConfiguration != nil {
214-
err = createPMDConfigFile(*pmdApiConfiguration)
215-
if err != nil {
216-
return fmt.Errorf("failed to create PMD config: %v", err)
217-
}
218-
fmt.Println("PMD configuration created based on Codacy settings")
219-
} else {
220-
err = createDefaultPMDConfigFile()
221-
if err != nil {
222-
return fmt.Errorf("failed to create default PMD config: %v", err)
223-
}
224-
fmt.Println("Default PMD configuration created")
225-
}
210+
// // PMD configuration
211+
// pmdApiConfiguration := extractPMDConfiguration(apiToolConfigurations)
212+
// if pmdApiConfiguration != nil {
213+
// err = createPMDConfigFile(*pmdApiConfiguration)
214+
// if err != nil {
215+
// return fmt.Errorf("failed to create PMD config: %v", err)
216+
// }
217+
// fmt.Println("PMD configuration created based on Codacy settings")
218+
// } else {
219+
// err = createDefaultPMDConfigFile()
220+
// if err != nil {
221+
// return fmt.Errorf("failed to create default PMD config: %v", err)
222+
// }
223+
// fmt.Println("Default PMD configuration created")
224+
// }
226225

227226
return nil
228227
}

0 commit comments

Comments
 (0)