File: nocov_complex.rb

package info (click to toggle)
ruby-simplecov 0.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,500 kB
  • sloc: ruby: 5,550; makefile: 10
file content (27 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# So much skippping
# rubocop:disable Metrics/MethodLength
module NoCovComplex
  def self.call(arg)
    # :nocov:
    if arg == 42
      0
    # :nocov:
    else
      puts "yolo"
    end

    arg += 1 if arg.odd?

    # :nocov:
    arg -= 1 while arg > 40

    case arg
    when 1..20
      :nope
    # :nocov:
    when 30..40
      :yas
    end
  end
end
# rubocop:enable Metrics/MethodLength