Commit 7a779981 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'cs-remove-flog-flay' into 'master'

Remove Flog

This MR removes the flog gem and its associated rake task as we use the ABC Metrics Rubocop to accomplish the same thing. There's not really any reason to have it anymore.

The rest of this MR is kept for posterity and is no longer relevant.

-------

After a few months of flog/flay failing silently - and now a week of them failing loudly - I think it's safe to say we don't care enough about flog/flay for them to be worth keeping.

If you'd like to keep them around, speak now or forever hold your peace :)

See also #17858.

See merge request !6554
parents 53da820b e3f12e97
...@@ -209,9 +209,6 @@ rubocop: *exec ...@@ -209,9 +209,6 @@ rubocop: *exec
rake haml_lint: *exec rake haml_lint: *exec
rake scss_lint: *exec rake scss_lint: *exec
rake brakeman: *exec rake brakeman: *exec
rake flog:
<<: *exec
allow_failure: yes
rake flay: rake flay:
<<: *exec <<: *exec
allow_failure: yes allow_failure: yes
......
...@@ -300,7 +300,6 @@ group :development, :test do ...@@ -300,7 +300,6 @@ group :development, :test do
gem 'scss_lint', '~> 0.47.0', require: false gem 'scss_lint', '~> 0.47.0', require: false
gem 'haml_lint', '~> 0.18.2', require: false gem 'haml_lint', '~> 0.18.2', require: false
gem 'simplecov', '0.12.0', require: false gem 'simplecov', '0.12.0', require: false
gem 'flog', '~> 4.3.2', require: false
gem 'flay', '~> 2.6.1', require: false gem 'flay', '~> 2.6.1', require: false
gem 'bundler-audit', '~> 0.5.0', require: false gem 'bundler-audit', '~> 0.5.0', require: false
......
...@@ -209,9 +209,6 @@ GEM ...@@ -209,9 +209,6 @@ GEM
flay (2.6.1) flay (2.6.1)
ruby_parser (~> 3.0) ruby_parser (~> 3.0)
sexp_processor (~> 4.0) sexp_processor (~> 4.0)
flog (4.3.2)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.4)
flowdock (0.7.1) flowdock (0.7.1)
httparty (~> 0.7) httparty (~> 0.7)
multi_json multi_json
...@@ -845,7 +842,6 @@ DEPENDENCIES ...@@ -845,7 +842,6 @@ DEPENDENCIES
factory_girl_rails (~> 4.6.0) factory_girl_rails (~> 4.6.0)
ffaker (~> 2.0.0) ffaker (~> 2.0.0)
flay (~> 2.6.1) flay (~> 2.6.1)
flog (~> 4.3.2)
fog-aws (~> 0.9) fog-aws (~> 0.9)
fog-azure (~> 0.0) fog-azure (~> 0.0)
fog-core (~> 1.40) fog-core (~> 1.40)
......
desc 'Code complexity analyze via flog'
task :flog do
output = %x(bundle exec flog -m app/ lib/gitlab)
exit_code = 0
minimum_score = 70
output = output.lines
# Skip total complexity score
output.shift
# Skip some trash info
output.shift
output.each do |line|
score, method = line.split(" ")
score = score.to_i
if score > minimum_score
exit_code = 1
puts "High complexity in #{method}. Score: #{score}"
end
end
exit exit_code
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment