tests/test-check-code.t
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 01 Nov 2016 18:54:03 -0700
changeset 30253 b032a7b676c6
parent 29442 456609cbd840
child 30435 b86a448a2965
permissions -rw-r--r--
statprof: vendor statprof.py Vendored from https://bitbucket.org/facebook/hg-experimental changeset 73f9db47ae5a1a9fa29a98dfe92d557ad51234c3 without modification. This introduces a number of code style violations. The file already has the magic words to skip test-check-code.t. I'll make additional changes to clean up the test-check-py3-compat.t warnings and to change some behavior in the code that isn't suitable for general use. test-check-commit.t also complains about numerous things. But there's nothing we can do if we're importing as-is.

#require test-repo

  $ . "$TESTDIR/helpers-testrepo.sh"
  $ check_code="$TESTDIR"/../contrib/check-code.py
  $ cd "$TESTDIR"/..

New errors are not allowed. Warnings are strongly discouraged.
(The writing "no-che?k-code" is for not skipping this file when checking.)

  $ hg locate | sed 's-\\-/-g' |
  >   xargs "$check_code" --warnings --per-file=0 || false
  Skipping hgext/fsmonitor/pywatchman/__init__.py it has no-che?k-code (glob)
  Skipping hgext/fsmonitor/pywatchman/bser.c it has no-che?k-code (glob)
  Skipping hgext/fsmonitor/pywatchman/capabilities.py it has no-che?k-code (glob)
  Skipping hgext/fsmonitor/pywatchman/msc_stdint.h it has no-che?k-code (glob)
  Skipping hgext/fsmonitor/pywatchman/pybser.py it has no-che?k-code (glob)
  Skipping i18n/polib.py it has no-che?k-code (glob)
  Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
  Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
  Skipping mercurial/statprof.py it has no-che?k-code (glob)