Skip to content

Commit

Permalink
changing functions names
Browse files Browse the repository at this point in the history
  • Loading branch information
eranturgeman committed Sep 5, 2023
1 parent 415c52d commit 0632083
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions build/utils/dotnet/solution/solution.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func Load(path, slnFile string, log utils.Log) (Solution, error) {
return solution, err
}
// Find all potential dependencies sources: packages.config and project.assets.json files.
err = solution.findDependenciesSources(slnProjects)
err = solution.setDependenciesSources(slnProjects)
if err != nil {
return solution, err
}
Expand Down Expand Up @@ -311,13 +311,13 @@ func removeQuotes(value string) string {
return strings.Trim(strings.TrimSpace(value), "\"")
}

// findDependenciesSourcesInProjectsDir Find potential dependencies sources: packages.config and project.assets.json files.
// setDependenciesSourcesFromProjectsDir Find potential dependencies sources: packages.config and project.assets.json files.
// For each project:
// 1. Check if the project is located under the solutions' directory (which was scanned before)
// 2. If it doesn't -find all potential dependencies sources for the relevant projects:
// - 'project.assets.json' files are located in 'obj' directory in project's root.
// - 'packages.config' files are located in the project root/ in solutions root in a directory named after project's name.
func (solution *solution) findDependenciesSourcesInProjectsDir(slnProjects []project.Project) error {
func (solution *solution) setDependenciesSourcesFromProjectsDir(slnProjects []project.Project) error {
// Walk and search for dependencies sources files in project's directories.
for _, project := range slnProjects {
// Before running this function we already looked for dependencies sources in solutions directory.
Expand All @@ -335,7 +335,7 @@ func (solution *solution) findDependenciesSourcesInProjectsDir(slnProjects []pro
}

// Find all potential dependencies sources: packages.config and project.assets.json files.
func (solution *solution) findDependenciesSourcesInSolutionsDir() error {
func (solution *solution) setDependenciesSourcesFromSolutionsDir() error {
err := gofrog.Walk(solution.path, func(path string, f os.FileInfo, err error) error {
return solution.addPathToDependenciesSourcesIfNeeded(path)
}, true)
Expand All @@ -355,10 +355,10 @@ func (solution *solution) addPathToDependenciesSourcesIfNeeded(path string) erro
}

// Find all potential dependencies sources: packages.config and project.assets.json files in solution/project root.
func (solution *solution) findDependenciesSources(slnProjects []project.Project) error {
err := solution.findDependenciesSourcesInSolutionsDir()
func (solution *solution) setDependenciesSources(slnProjects []project.Project) error {
err := solution.setDependenciesSourcesFromSolutionsDir()
if err != nil {
return err
}
return solution.findDependenciesSourcesInProjectsDir(slnProjects)
return solution.setDependenciesSourcesFromProjectsDir(slnProjects)
}

0 comments on commit 0632083

Please sign in to comment.