@@ -224,8 +224,15 @@ func configFileTemplate(tools []domain.Tool) string {
224224 sb .WriteString (fmt .Sprintf (" - %s@%s\n " , runtime , runtimeVersions [runtime ]))
225225 }
226226 } else {
227- // If no tools were specified (local mode), include all tools in sorted order
228- for toolName := range defaultVersions {
227+ // In local mode with no tools specified, include only the necessary runtimes
228+ supportedTools , err := plugins .GetSupportedTools ()
229+ if err != nil {
230+ log .Printf ("Warning: failed to get supported tools: %v" , err )
231+ return sb .String ()
232+ }
233+
234+ // Get runtimes needed by supported tools
235+ for toolName := range supportedTools {
229236 if runtime , ok := runtimeDependencies [toolName ]; ok {
230237 if toolName == "dartanalyzer" {
231238 neededRuntimes ["dart" ] = true
@@ -540,8 +547,6 @@ func buildDefaultConfigurationFiles(toolsConfigDir string) error {
540547 if err := createPMDConfigFile (patternsConfig , toolsConfigDir ); err != nil {
541548 return fmt .Errorf ("failed to create default PMD configuration: %w" , err )
542549 }
543- case domain .PMD7 , domain .ESLint9 :
544- continue
545550 case domain .PyLint :
546551 if err := createPylintConfigFile (patternsConfig , toolsConfigDir ); err != nil {
547552 return fmt .Errorf ("failed to create default Pylint configuration: %w" , err )
@@ -558,6 +563,8 @@ func buildDefaultConfigurationFiles(toolsConfigDir string) error {
558563 if err := createLizardConfigFile (toolsConfigDir , patternsConfig ); err != nil {
559564 return fmt .Errorf ("failed to create default Lizard configuration: %w" , err )
560565 }
566+ case domain .PMD7 , domain .ESLint9 :
567+ continue
561568 }
562569 }
563570 return nil
0 commit comments