check-py3-compat: manually format and print warnings
The warnings mechanism may print to stderr on Python 3. Independent buffering
of stdout and stderr can lead to warnings output not being printed properly.
This commit traps warnings when executing individual files and prints
warnings to stdout so output is deterministic.
Differential Revision: https://phab.mercurial-scm.org/D5845
{
// Enforcing
"eqeqeq" : true, // true: Require triple equals (===) for comparison
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
"nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
// Environments
"browser" : true // Web Browser (window, document, etc)
}