def run_swiftlint(files, lint_all_files, options, additional_swiftlint_args)
      if lint_all_files
        result = swiftlint.lint(options, additional_swiftlint_args)
        if result == ''
          {}
        else
          JSON.parse(result).flatten
        end
      else
        files
          .map { |file| options.merge(path: file) }
          .map { |full_options| swiftlint.lint(full_options, additional_swiftlint_args) }
          .reject { |s| s == '' }
          .map { |s| JSON.parse(s).flatten }
          .flatten
      end
    end
def run_swiftlint(files, lint_all_files, options, additional_swiftlint_args)
      if lint_all_files
        result = swiftlint.lint(options, additional_swiftlint_args)
        if result == ''
          {}
        else
          JSON.parse(result).flatten
        end
      else
        files
          .map { |file| options.merge(path: file) }
          .map { |full_options| swiftlint.lint(full_options, additional_swiftlint_args) }
          .reject { |s| s == '' }
          .map { |s| JSON.parse(s).flatten }
          .flatten
      end
    end
Run swiftlint on each file and aggregate collect the issues

 @return [Array] swiftlint issues