From a9920ff65a3b3017806964cd324e3e990b916d5b Mon Sep 17 00:00:00 2001 From: Oscar Reimer Date: Wed, 11 Sep 2024 11:30:09 +0200 Subject: [PATCH] Enable fingerprint by default for all repos (#259) --- UPGRADE-2.0.md | 2 +- internal/cmd/scan/scan.go | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md index e512f573..4ec60516 100644 --- a/UPGRADE-2.0.md +++ b/UPGRADE-2.0.md @@ -2,7 +2,7 @@ ## Changed behaviours - Changes default strictness of resolve command to 1 (Exit with code 1 if all files failed to resolve, otherwise exit with code 0 instead of always exiting with code 0) -- File Fingerprint analysis is on by default for all repositories which starts with the letters "A-C". This range will be increased in future minor/patch releases. +- File Fingerprint analysis is on by default for all repositories which starts with the letters "A-C" (starting from v2.0.9 it is default for all repos). This range will be increased in future minor/patch releases. - Added inclusion option to commands to force include patterns which are by default ignored by the CLI - Refactored how exclusion works for fingerprinting to align it with the rest of the CLI, this includes a breaking change for windows where Unix path separators must be used in patterns. diff --git a/internal/cmd/scan/scan.go b/internal/cmd/scan/scan.go index 290c2f09..ec78eea4 100644 --- a/internal/cmd/scan/scan.go +++ b/internal/cmd/scan/scan.go @@ -68,15 +68,6 @@ If the given path contains a git repository all flags but "integration" will be PreRun: func(cmd *cobra.Command, _ []string) { _ = viper.BindPFlags(cmd.Flags()) }, - RunE: func(cmd *cobra.Command, args []string) error { - if len(viper.GetString(RepositoryFlag)) > 0 { - if strings.ToLower(viper.GetString(RepositoryFlag))[0] < 't' && !cmd.Flags().Changed(NoFingerprintFlag) { - viper.Set(NoFingerprintFlag, false) - } // Temporary addition for rolling release of fingerprinting enabled by default - } - - return RunE(&scanner)(cmd, args) - }, } cmd.Flags().StringVarP(&repositoryName, RepositoryFlag, "r", "", "repository name") cmd.Flags().StringVarP(&commitName, CommitFlag, "c", "", "commit hash")