<commit_before># rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
module Fastlane
  module Actions
    module SharedValues
      FL_OCLINT_REPORT_PATH = :FL_OCLINT_REPORT_PATH
    end

    class OclintAction < Action
      def self.run(params)
        compile_commands = params[:compile_commands]
        raise "Could not find json compilation database at path '#{compile_commands}'".red unless File.exist?(compile_commands)
<commit_msg>Add check for oclint installation<commit_after># rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
module Fastlane
  module Actions
    module SharedValues
      FL_OCLINT_REPORT_PATH = :FL_OCLINT_REPORT_PATH
    end

    class OclintAction < Action
      def self.run(params)
        if `which oclint`.to_s.length == 0 and !Helper.test?
          raise "You have to install oclint. Fore more details: ".red + "http://docs.oclint.org/en/stable/intro/installation.html".yellow
        end

        compile_commands = params[:compile_commands]
        raise "Could not find json compilation database at path '#{compile_commands}'".red unless File.exist?(compile_commands)

{'fraction_non_alphanumeric': 0.0773109243697479, 'fraction_numerical': 0.0008403361344537816, 'mean_word_length': 4.025316455696203, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4203220', 'n_tokens_mistral': 359, 'n_tokens_neox': 346, 'n_words': 88}