code: def _run_spellcheck_linter(matched_filenames, cache_dir, show_lint_files):
      
      from polysquarelinter import lint_spelling_only as lint
      from prospector.message import Message, Location
  
      for filename in matched_filenames:
          _debug_linter_status("spellcheck-linter", filename, show_lint_files)
  
      return_dict = dict()
  
      def _custom_reporter(error, file_path):
          line = error.line_offset + 1
          key = _Key(file_path, line, "file/spelling_error")
          loc = Location(file_path, None, None, line, 0)
          # suppress(protected-access)
          desc = lint._SPELLCHECK_MESSAGES[error.error_type].format(error.word)
          return_dict[key] = Message("spellcheck-linter",
                                     "file/spelling_error",
                                     loc,
                                     desc)
  
      # suppress(protected-access,unused-attribute)
      lint._report_spelling_error = _custom_reporter
      lint.main([
          "--spellcheck-cache=" + os.path.join(cache_dir, "spelling"),
          "--stamp-file-path=" + os.path.join(cache_dir,
                                              "jobstamps",
                                              "polysquarelinter"),
          "--technical-terms=" + os.path.join(cache_dir, "technical-terms"),
      ] + matched_filenames)
  
      return return_dict
docs: Run spellcheck-linter on matched_filenames.