def detekt(inline_mode: false)
      unless skip_gradle_task || gradlew_exists?
        fail("Could not find `gradlew` inside current directory")
        return
      end

      unless SEVERITY_LEVELS.include?(severity)
        fail("'#{severity}' is not a valid value for `severity` parameter.")
        return
      end

      system "./gradlew #{gradle_task || 'detektCheck'}" unless skip_gradle_task

      unless File.exist?(report_file)
        fail("Detekt report not found at `#{report_file}`. "\
          "Have you forgot to add `xmlReport true` to your `build.gradle` file?")
      end

      issues = read_issues_from_report
      filtered_issues = filter_issues_by_severity(issues)

      if inline_mode
        # Report with inline comment
        send_inline_comment(filtered_issues)
      else
        message = message_for_issues(filtered_issues)
        markdown("### Detekt found issues\n\n" + message) unless message.to_s.empty?
      end
    end
def detekt(inline_mode: false)
      unless skip_gradle_task || gradlew_exists?
        fail("Could not find `gradlew` inside current directory")
        return
      end

      unless SEVERITY_LEVELS.include?(severity)
        fail("'#{severity}' is not a valid value for `severity` parameter.")
        return
      end

      system "./gradlew #{gradle_task || 'detektCheck'}" unless skip_gradle_task

      unless File.exist?(report_file)
        fail("Detekt report not found at `#{report_file}`. "\
          "Have you forgot to add `xmlReport true` to your `build.gradle` file?")
      end

      issues = read_issues_from_report
      filtered_issues = filter_issues_by_severity(issues)

      if inline_mode
        # Report with inline comment
        send_inline_comment(filtered_issues)
      else
        message = message_for_issues(filtered_issues)
        markdown("### Detekt found issues\n\n" + message) unless message.to_s.empty?
      end
    end
Calls Detekt task of your gradle project.
 It fails if `gradlew` cannot be found inside current directory.
 It fails if `severity` level is not a valid option.
 It fails if `xmlReport` configuration is not set to `true` in your `build.gradle` file.
 @return [void]