Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: filip-debricked <[email protected]>
  • Loading branch information
ProgHaj and filip-debricked committed Nov 22, 2024
1 parent 0bba7ed commit 1d82877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/cmd/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var callgraphGenerateTimeout int
var callgraphUploadTimeout int
var commitAuthor string
var commitName string
var generateCommitNameBool bool
var generateCommitName bool
var debug bool
var exclusions = file.Exclusions()
var inclusions = file.Exclusions()
Expand Down Expand Up @@ -69,7 +69,7 @@ const (
TagCommitAsReleaseFlag = "tag-commit-as-release"
TagCommitAsReleaseEnv = "TAG_COMMIT_AS_RELEASE"
ExperimentalFlag = "experimental"
GenerateCommitName = "generate-commit-name"
GenerateCommitNameFlag = "generate-commit-name"
)

var scanCmdError error
Expand All @@ -90,7 +90,7 @@ If the given path contains a git repository all flags but "integration" will be

cmd.Flags().StringVarP(&repositoryName, RepositoryFlag, "r", "", "repository name")
cmd.Flags().StringVarP(&commitName, CommitFlag, "c", "", "commit hash")
cmd.Flags().BoolVar(&generateCommitNameBool, GenerateCommitName, false, "auto-generate a commit name if no commit hash is found (in -c or env)")
cmd.Flags().BoolVar(&generateCommitName, GenerateCommitNameFlag, false, "auto-generate a commit name if no commit hash is found (in -c or env)")
cmd.Flags().StringVarP(&branchName, BranchFlag, "b", "", "branch name")
cmd.Flags().StringVarP(&commitAuthor, CommitAuthorFlag, "a", "", "commit author")
cmd.Flags().StringVarP(&repositoryUrl, RepositoryUrlFlag, "u", "", "repository URL")
Expand Down Expand Up @@ -242,7 +242,7 @@ func RunE(s *scan.IScanner) func(_ *cobra.Command, args []string) error {
VersionHint: viper.GetBool(VersionHintFlag),
RepositoryName: viper.GetString(RepositoryFlag),
CommitName: viper.GetString(CommitFlag),
GenerateCommitName: viper.GetBool(GenerateCommitName),
GenerateCommitName: viper.GetBool(GenerateCommitNameFlag),
BranchName: viper.GetString(BranchFlag),
CommitAuthor: viper.GetString(CommitAuthorFlag),
RepositoryUrl: viper.GetString(RepositoryUrlFlag),
Expand Down

0 comments on commit 1d82877

Please sign in to comment.