I want to use the Mozilla Public License for my project. Now, the FAQ tells me that I should add the corresponding header to every relevant file in the repository.
That's what you can find out only after long court process.
Note that when one of the Linux kernel developers went to sue VMWare court declined to even hear him because he couldn't prove he holds copyright on that code.
That means that if you ever plan to go to court for real then not only copyright notice is mandatory, but all files have to include names of people (or companies) who own the copyright.
If you don't plan to go to court… then answer to your question would forever be unknown.
I don't think adding the header to the top of your file is particularly helpful in this day and age. For one, it's a bunch of redundant[1] text at the top of a file you'll need to skip every time you want to read the source code, and it feels unnecessary unless you plan to distribute individual files separately from the rest of your crate or allow different parts of the same project to be covered by different licenses.
Normally, just having a LICENSE file containing the terms of you license (typically copied from the MPL website) at the root of your repository is enough. When publishing a crate to crates.io, you'll also be forced to to update your Cargo.toml with the license people can use your crate under.
That's generally enough for most companies and developers I've interacted with, but of course different people will have different tolerances for risk.
as in, the information is already available elsewhere so why copy/paste it? ↩︎
There does not seem to be a "standard" way to say 'every source code file in this repository is affected by the license'... So I think to be safe I will put the header in each file.
I don't think this is strictly necessary, but better safe than sorry I guess
Given that the MPL itself explicitly discusses files as opposed to works, that's probably a good idea. You can add your own file to an otherwise MPL-covered work without the MPL applying to that new file, as I understand it.
They prefer that each file have such a header, but they recognize that this can be infeasible, and they also allow specifying licensing information for a whole repository in a slightly modified form of a format originally developed by Debian to record this information for the software they package: https://reuse.software/faq/#bulk-license.