-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunPlugins.go
46 lines (41 loc) · 2.51 KB
/
runPlugins.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import (
"code-analyser/pluginClient/loadPLugins"
decisionmakerPB "code-analyser/protos/pb"
"code-analyser/protos/pb/pluginDetails"
"code-analyser/runners"
"context"
)
// LoadGlobalPlugins executed all plugins related to globalFiles files (like docker-compose.yaml,DockerFile MakeFile etc)
func LoadGlobalPlugins(ctx context.Context, globalDetection *decisionmakerPB.GlobalDetections, globalPlugin *loadPLugins.GlobalPlugin, path string) {
//globalDetection.DockerFile, globalDetection.DockerComposeFile = runners.ExecuteDockerAndComposePlugin(ctx, path, globalPlugin.DockerFile)
//
//globalDetection.ProcFile = runners.ExecuteProcFileDetectionPlugin(ctx, path, globalPlugin.ProcFile)
//
//globalDetection.Makefile = runners.ExecuteMakeFileDetectionPlugin(ctx, path, globalPlugin.MakeFile)
}
//LoadLanguagePlugins it runs all detectors of dependencies ex. orm,framework etc ....
func LoadLanguagePlugins(ctx context.Context, languageSpecificDetections *decisionmakerPB.LanguageSpecificDetections, allDependencies map[string]map[string]runners.DependencyDetail, pluginDetails *pluginDetails.LanguagePlugins, runtimeVersion string, projectRootPath string) {
//pluginInput := &pb.Input{
// RuntimeVersion: runtimeVersion,
// RootPath: projectRootPath,
//}
//
//languageSpecificDetections.Commands = runners.ExecuteCommandsDetectionPlugin(ctx, projectRootPath, pluginDetails.CommandsPluginPath)
//
//languageSpecificDetections.Orm = runners.ExecuteOrmPlugins(ctx, allDependencies[runners.ORM], runtimeVersion, projectRootPath)
//
//languageSpecificDetections.Db = runners.ExecuteDbPlugins(ctx, allDependencies[runners.DB], runtimeVersion, projectRootPath)
//
//languageSpecificDetections.Framework = runners.ExecuteFrameworkPlugins(ctx, allDependencies[runners.Framework], runtimeVersion, projectRootPath)
//
//languageSpecificDetections.Env = runners.ExecuteEnvsDetectionPlugin(ctx, pluginDetails.EnvPluginPath, runtimeVersion, projectRootPath)
//
//languageSpecificDetections.StaticAssets = runners.ExecuteStaticAssetsPlugin(ctx, pluginInput, pluginDetails.StaticAssetsPluginPath)
//
//languageSpecificDetections.Libraries = runners.ExecuteLibraryPlugins(ctx, allDependencies[runners.Library], runtimeVersion, projectRootPath)
//
//languageSpecificDetections.BuildDirectory = runners.ExecuteBuildDirectoryPlugin(ctx, pluginInput, pluginDetails.BuildDirectoryPluginPath)
//
//languageSpecificDetections.TestCases = runners.ExecuteTestCommandDetectionPlugin(ctx, pluginInput, pluginDetails.TestCasesCommandPluginPath)
}