def find_swift_files(dir_selected, files = nil, excluded_paths = [], included_paths = [])
      # Needs to be escaped before comparsion with escaped file paths
      dir_selected = Shellwords.escape(dir_selected)

      # Assign files to lint
      files = if files.nil?
                (git.modified_files - git.deleted_files) + git.added_files
              else
                Dir.glob(files)
              end
      # Filter files to lint
      files.
        # Ensure only swift files are selected
        select { |file| file.end_with?('.swift') }.
        # Make sure we don't fail when paths have spaces
        map { |file| Shellwords.escape(File.expand_path(file)) }.
        # Remove dups
        uniq.
        # Ensure only files in the selected directory
        select { |file| file.start_with?(dir_selected) }.
        # Reject files excluded on configuration
        reject { |file| file_exists?(excluded_paths, file) }.
        # Accept files included on configuration
        select do |file|
        next true if included_paths.empty?
        file_exists?(included_paths, file)
      end
    end
def find_swift_files(dir_selected, files = nil, excluded_paths = [], included_paths = [])
      # Needs to be escaped before comparsion with escaped file paths
      dir_selected = Shellwords.escape(dir_selected)

      # Assign files to lint
      files = if files.nil?
                (git.modified_files - git.deleted_files) + git.added_files
              else
                Dir.glob(files)
              end
      # Filter files to lint
      files.
        # Ensure only swift files are selected
        select { |file| file.end_with?('.swift') }.
        # Make sure we don't fail when paths have spaces
        map { |file| Shellwords.escape(File.expand_path(file)) }.
        # Remove dups
        uniq.
        # Ensure only files in the selected directory
        select { |file| file.start_with?(dir_selected) }.
        # Reject files excluded on configuration
        reject { |file| file_exists?(excluded_paths, file) }.
        # Accept files included on configuration
        select do |file|
        next true if included_paths.empty?
        file_exists?(included_paths, file)
      end
    end
Find swift files from the files glob
 If files are not provided it will use git modifield and added files

 @return [Array] swift files