Skip to content
Snippets Groups Projects
Verified Commit 6748dd2f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Allow flog failure for now

parent 58429d9b
No related branches found
No related tags found
1 merge request!1783Add method complexity check to CI
Pipeline #
Loading
@@ -80,3 +80,4 @@ flog:
Loading
@@ -80,3 +80,4 @@ flog:
tags: tags:
- ruby - ruby
- mysql - mysql
allow_failure: true
Loading
@@ -2,6 +2,7 @@ desc 'Code complexity analyze via flog'
Loading
@@ -2,6 +2,7 @@ desc 'Code complexity analyze via flog'
task :flog do task :flog do
output = %x(bundle exec flog -m app/ lib/gitlab) output = %x(bundle exec flog -m app/ lib/gitlab)
exit_code = 0 exit_code = 0
minimum_score = 70
output = output.lines output = output.lines
   
# Skip total complexity score # Skip total complexity score
Loading
@@ -14,7 +15,7 @@ task :flog do
Loading
@@ -14,7 +15,7 @@ task :flog do
score, method = line.split(" ") score, method = line.split(" ")
score = score.to_i score = score.to_i
   
if score > 40 if score > minimum_score
exit_code = 1 exit_code = 1
puts "High complexity in #{method}. Score: #{score}" puts "High complexity in #{method}. Score: #{score}"
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment