nunit: Add .editorconfig to set file encodings so that people don't have to think about it

These days we want every file to be UTF-8 with no byte order mark. It’s universally understood and compatible, unlike the ANSI encoding Visual Studio will use by default. This is a typical problem any time you copy and paste special characters from the clipboard into VS. It results in tests running fine locally and blowing up in Travis (see https://github.com/nunit/nunit/pull/2294#issuecomment-315223398).

Obviously, this is not something we want people to have to even think about if we can possibly avoid it. So many things have native .editorconfig support that it is worthwhile to start one just to override the charset of every file on save.

(EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. http://editorconfig.org/)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

Now that VS 15.3 is out, how long should we wait before assuming that most people are off 15.0 through 15.2 which will still cause BOM grief?

Probably more than a week if the number of yellow update flags I see on my devs’ computers is any indication 🙁

@jnm2 Maybe edit your issue description to tell those who read it what .editorconfig is and give a link?

@rprouse I was hoping someone would say that (besides me). I’m a huge fan of .editorconfig enforcement.