From 2df4930dd100e13b09ae7f176f4b73f060de534b Mon Sep 17 00:00:00 2001 From: attiasas Date: Wed, 2 Oct 2024 11:56:29 +0300 Subject: [PATCH] fix some --- _typos.tom | 7 ++++--- commands/audit/sca/java/mvn.go | 4 ++-- commands/audit/sca/nuget/nuget.go | 4 ++-- commands/audit/scarunner.go | 2 +- commands/git/countcontributors.go | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/_typos.tom b/_typos.tom index b5ae28e1..60c94772 100644 --- a/_typos.tom +++ b/_typos.tom @@ -1,5 +1,6 @@ [default.extend-words] -laf = "laf" -ist = "ist" +testng = "testng" +afe = "afe" + [files] -extend-exclude = ["go.mod", "go.sum", "./tests/**"] \ No newline at end of file +extend-exclude = ["go.mod", "go.sum", "tests/**"] \ No newline at end of file diff --git a/commands/audit/sca/java/mvn.go b/commands/audit/sca/java/mvn.go index cda87097..1f56c3e4 100644 --- a/commands/audit/sca/java/mvn.go +++ b/commands/audit/sca/java/mvn.go @@ -89,7 +89,7 @@ func buildMavenDependencyTree(params *DepTreeParams) (dependencyTree []*xrayUtil } // Runs maven-dep-tree according to cmdName. Returns the plugin output along with a function pointer to revert the plugin side effects. -// If a non-nil clearMavenDepTreeRun pointer is returnes it means we had no error during the entire function execution +// If a non-nil clearMavenDepTreeRun pointer is returns it means we had no error during the entire function execution func (mdt *MavenDepTreeManager) RunMavenDepTree() (depTreeOutput string, clearMavenDepTreeRun func() error, err error) { // depTreeExecDir is a temp directory for all the files that are required for the maven-dep-tree run depTreeExecDir, clearMavenDepTreeRun, err := mdt.CreateTempDirWithSettingsXmlIfNeeded() @@ -254,7 +254,7 @@ func (mdt *MavenDepTreeManager) createSettingsXmlWithConfiguredArtifactory(setti } // Creates a temporary directory. -// If Artifactory resolution repo is provided, a settings.xml file with the provided server and repository will be created inside the temprary directory. +// If Artifactory resolution repo is provided, a settings.xml file with the provided server and repository will be created inside the temporarily directory. func (mdt *MavenDepTreeManager) CreateTempDirWithSettingsXmlIfNeeded() (tempDirPath string, clearMavenDepTreeRun func() error, err error) { tempDirPath, err = fileutils.CreateTempDir() if err != nil { diff --git a/commands/audit/sca/nuget/nuget.go b/commands/audit/sca/nuget/nuget.go index 125eb8d1..13c64f4f 100644 --- a/commands/audit/sca/nuget/nuget.go +++ b/commands/audit/sca/nuget/nuget.go @@ -102,7 +102,7 @@ func runDotnetRestoreAndLoadSolution(params utils.AuditParams, tmpWd, exclusionP // Determine if the project is a NuGet or .NET project toolName, err = getProjectToolName(tmpWd) if err != nil { - err = fmt.Errorf("failed while checking for the porject's tool type: %s", err.Error()) + err = fmt.Errorf("failed while checking for the project's tool type: %s", err.Error()) return } } @@ -187,7 +187,7 @@ func getProjectToolName(wd string) (toolName string, err error) { func getProjectConfigurationFilesPaths(wd string) (projectConfigFilesPaths []string, err error) { err = filepath.WalkDir(wd, func(path string, d fs.DirEntry, innerErr error) error { if innerErr != nil { - return fmt.Errorf("error has occured when trying to access or traverse the files system: %s", err.Error()) + return fmt.Errorf("error has occurred when trying to access or traverse the files system: %s", err.Error()) } if strings.HasSuffix(path, csprojFileSuffix) || strings.HasSuffix(path, packagesConfigFileName) { diff --git a/commands/audit/scarunner.go b/commands/audit/scarunner.go index 38054d23..a3cabfd7 100644 --- a/commands/audit/scarunner.go +++ b/commands/audit/scarunner.go @@ -66,7 +66,7 @@ func buildDepTreeAndRunScaScan(auditParallelRunner *utils.SecurityParallelRunner if err != nil { return } - log.Info(fmt.Sprintf("Preforming %d SCA scans:\n%s", len(scans), scanInfo)) + log.Info(fmt.Sprintf("Performing %d SCA scans:\n%s", len(scans), scanInfo)) defer func() { // Make sure to return to the original working directory, buildDependencyTree may change it diff --git a/commands/git/countcontributors.go b/commands/git/countcontributors.go index bc3e6aa0..fe286f37 100644 --- a/commands/git/countcontributors.go +++ b/commands/git/countcontributors.go @@ -278,7 +278,7 @@ func (cc *VcsCountContributors) getRepositoriesListToScan() ([]string, error) { return cc.getOwnersMatchingRepos(reposMap) } -// getOwnersMatchingRepos gets all projects and their repo map and look for thr specific owner. +// getOwnersMatchingRepos gets all projects and their repo map and look for the specific owner. func (cc *VcsCountContributors) getOwnersMatchingRepos(reposMap map[string][]string) ([]string, error) { repos := reposMap[cc.params.Owner] if len(repos) == 0 {