This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs. This does not
affect the compiled output, and is only done for consistency.
Issue #2638
Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
Under Windows, the default encoding isn't UTF-8, so we are getting
encoding errors when trying to read files. This adds a helper to
explicitly set the encoding to UTF-8 in Python3. This doesn't really
affect Python2 since it reads the file as byte strings.
We can't use 'locale.setlocale' to fix this since (at least on my
machine) we can't set the encoding to be UTF-8 on Windows.
Fixes#2206
Change-Id: I76e35cc9ae638b433ca61c7bda6478e989bc755a
This adds extra conformance checks:
- A ban on @expose, which we already got rid of in 775d7552
- A ban on unresolved types, which did not generate any failures
- A ban on global variables
- A more comprehensive ban on console logging
None of these caught any real bugs in the existing code base.
In one test suite (MediaSourceEngine unit tests), the compiler was
unable to determine the type of one of the mocks, leading it to
suspect that it could possibly violate the new ban on console.error.
The goog.define('GIT_VERSION', ...) line in player.js was seen
(correctly) as a global variable. This has been fixed and simplified
as a result.
The only custom conformance checks we are not using are "BanNullDeref"
(too many false negatives) and "BanThrowOfNonErrorTypes" (for which
we have our own, more restrictive version).
Since we have now tried all custom conformance rules provided by the
compiler today, this closes the associated issue.
Closes#1130.
Change-Id: Iad9040d0f5ee397c7d46b1d64bc5bebf2def57bc
Rather than using the -debug suffix for uncompiled builds, use
-uncompiled. This also changes the version for debug compiled builds
to use the -debug suffix.
Change-Id: I3c0c1c3b849d5f817c4d7f7bcfd7f967a00d1aaf
Rather than using print, use the logging module. This allows embedding
environments to setup logging how they want. This also ensures the logs
are flushed properly.
The prints for check.py, checkversion.py, stats.py, and for the --help
flag will still be printed to stdout since that would be the expected
output location.
Change-Id: I26e1bc866803c42981628c7e62261d13c7b3ff2b
/usr/bin/env python is preferable, since it allows us to support
executable scripts on systems where python is installed in places
other than /usr/bin.
Incidentally, this was the only thing I needed to do to confirm
full build support on Windows, so I'm dropping a TODO about Windows
support for the extern generator.
Change-Id: Ice93174428e0d8015d0a7787f07a17e8ac808dc7