Patchwork D866: tests: disable lints on mercurial/thirdparty

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2017, 11:34 a.m.
Message ID <7d331266819225d4cfa1be9a9b22a9ee@localhost.localdomain>
Download mbox | patch
Permalink /patch/24322/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2017, 11:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG41401f502c83: tests: disable lints on mercurial/thirdparty (authored by sid0, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D866?vs=2230&id=2250

REVISION DETAIL
  https://phab.mercurial-scm.org/D866

AFFECTED FILES
  contrib/import-checker.py
  tests/test-check-code.t
  tests/test-check-module-imports.t
  tests/test-check-pylint.t

CHANGE DETAILS




To: sid0, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/tests/test-check-pylint.t b/tests/test-check-pylint.t
--- a/tests/test-check-pylint.t
+++ b/tests/test-check-pylint.t
@@ -12,6 +12,7 @@ 
   $ touch $TESTTMP/fakerc
   $ pylint --rcfile=$TESTTMP/fakerc --disable=all \
   >   --enable=W0102 --reports=no \
+  >   --ignore=thirdparty \
   >   mercurial hgdemandimport hgext hgext3rd
    (?)
   ------------------------------------ (?)
diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t
--- a/tests/test-check-module-imports.t
+++ b/tests/test-check-module-imports.t
@@ -25,6 +25,7 @@ 
   > -X doc/gendoc.py \
   > -X doc/hgmanpage.py \
   > -X i18n/posplit \
+  > -X mercurial/thirdparty \
   > -X tests/hypothesishelpers.py \
   > -X tests/test-commit-interactive.t \
   > -X tests/test-contrib-check-code.t \
diff --git a/tests/test-check-code.t b/tests/test-check-code.t
--- a/tests/test-check-code.t
+++ b/tests/test-check-code.t
@@ -7,9 +7,11 @@ 
 New errors are not allowed. Warnings are strongly discouraged.
 (The writing "no-che?k-code" is for not skipping this file when checking.)
 
-  $ testrepohg locate -X contrib/python-zstandard \
-  > -X hgext/fsmonitor/pywatchman |
-  > sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false
+  $ testrepohg locate \
+  > -X contrib/python-zstandard \
+  > -X hgext/fsmonitor/pywatchman \
+  > -X mercurial/thirdparty \
+  > | sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false
   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)
diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -35,6 +35,8 @@ 
     'mercurial.pure.mpatch',
     'mercurial.pure.osutil',
     'mercurial.pure.parsers',
+    # third-party imports should be directly imported
+    'mercurial.thirdparty',
 )
 
 # Whitelist of symbols that can be directly imported.