Skip to content

Commit

Permalink
fix some
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Oct 2, 2024
1 parent 4d8cf7d commit 2df4930
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions _typos.tom
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[default.extend-words]
laf = "laf"
ist = "ist"
testng = "testng"
afe = "afe"

[files]
extend-exclude = ["go.mod", "go.sum", "./tests/**"]
extend-exclude = ["go.mod", "go.sum", "tests/**"]
4 changes: 2 additions & 2 deletions commands/audit/sca/java/mvn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions commands/audit/sca/nuget/nuget.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion commands/audit/scarunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion commands/git/countcontributors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2df4930

Please sign in to comment.