Ignoring temporary files created by editor (flycheck in emacs)

I’m trying to get Hugo to ignore the temporary files created by flycheck (a syntax checker - I use it with http://proselint.com so I’d rather not just turn it off). While editing a file in /content these files are created and I’d like to prevent them triggering a rebuild:

Change detected, rebuilding site
2018-03-24 15:01:25.094 +0000
Source changed "/Users/jamie/work/test.com/content/flycheck__index.md": REMOVE
Total in 24 ms

I’ve tried lots of variations on the following in my config.toml:

ignoreFiles = [ ".*flycheck__.*" ]

But nothing seems to work and I still see the files popping up in my terminal log. Am I misunderstanding what ignoreFiles does and it only prevents the file being processed but still triggers a rebuild? Or maybe I’m just making some silly regex mistake?

Try it like this

ignoreFiles = [ 'flycheck__' ]

Thanks for the suggestion - don’t think I’d tried that, unfortunately I still get:

Change detected, rebuilding site
2018-03-24 17:41:14.448 +0000
Source changed "/Users/jamie/work/test.com/content/support/flycheck_2017-10-24-find-project-by-project-number.md": CREATE
Total in 21 ms

I use this yaml-record and it works. Try adding an extension, if that does not help then I do not know.

ignoreFiles:
  - 'nav\.txt'
  - '\.zip'
  - '\.7z'
  - '\.tiff?'
  - '_rjtemp_mkfile\.htm'

Perhaps Hugo can not ignore the files of the markdown. Try adding an entry for the zip archive and check whether Hugo ignores it.

Can you trace to the function creating those files, and then change the directory where those files get created?