File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ OptionParser.new do |opts|
23
23
"Grep pattern to filter files. If provided, will filter the files changed on your branch further." )
24
24
end . parse! ( into : options )
25
25
26
- if options [ :baseline ]
27
- CodeclimateDiff ::Runner . generate_baseline
28
- elsif options [ :"new-only" ]
29
- CodeclimateDiff ::Runner . run_diff_on_branch ( options [ :pattern ] , always_analyze_all_files : options [ :all ] , show_preexisting : false )
26
+ if options [ :"new-only" ]
27
+ CodeclimateDiff ::Runner . run_diff_on_branch ( options [ :pattern ] , always_analyze_all_files : options [ :all ] ,
28
+ show_preexisting : false )
30
29
else
31
- CodeclimateDiff ::Runner . run_diff_on_branch ( options [ :pattern ] , always_analyze_all_files : options [ :all ] , show_preexisting : true )
30
+ CodeclimateDiff ::Runner . run_diff_on_branch ( options [ :pattern ] , always_analyze_all_files : options [ :all ] ,
31
+ show_preexisting : true )
32
32
end
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ def self.setup_baseline_for_branch
95
95
system ( "git worktree add ../temp-codeclimate #{ main_branch } " )
96
96
97
97
Dir . chdir ( "../temp-codeclimate" ) do
98
- # Execute shell command in the '../temp-codeclimate' directory
99
98
generate_baseline
100
99
101
100
puts "Copying the baseline to #{ project_repo } ..."
@@ -107,8 +106,7 @@ def self.setup_baseline_for_branch
107
106
end
108
107
109
108
def self . run_diff_on_branch ( pattern , always_analyze_all_files : false , show_preexisting : true )
110
- # CodeclimateWrapper.new.pull_latest_image
111
- setup_baseline_for_branch
109
+ setup_baseline_for_branch unless File . exist? ( "codeclimate_diff_baseline.json" )
112
110
113
111
changed_filenames = calculate_changed_filenames ( pattern )
114
112
You can’t perform that action at this time.
0 commit comments