Mercurial > hg
view tests/test-check-pylint.t @ 35156:9f44d44626a0
hgweb: use strict equals, remove non-breaking space in followlines.js
The first hunk had a non-breaking space character just before "{", it's not an
error or anything, but let's fix it while we're at it. (This corresponds to
"nonbsp" option of jshint).
Hunks 2 and 3 change "==" (equals operator) to "===" (strict equals operator).
The difference between them is that the latter doesn't do any type coercions.
It's handy to compare string '1' to number 1 sometimes, but most of the time
using "==" is inadvertent and can be replaced by an explicit type conversion.
(This corresponds to "eqeqeq" option of jshint).
Most of this file already uses strict equals operator, and in the code affected
type coercion is not needed, because tagName and selectableTag are both strings
and endId and startId are both numbers.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 22 Nov 2017 20:32:07 +0800 |
parents | 41401f502c83 |
children | 882998f08c3c |
line wrap: on
line source
#require test-repo pylint hg10 Run pylint for known rules we care about. ----------------------------------------- There should be no recorded failures; fix the codebase before introducing a new check. Current checks: - W0102: no mutable default argument $ touch $TESTTMP/fakerc $ pylint --rcfile=$TESTTMP/fakerc --disable=all \ > --enable=W0102 --reports=no \ > --ignore=thirdparty \ > mercurial hgdemandimport hgext hgext3rd (?) ------------------------------------ (?) Your code has been rated at 10.00/10 (?) (?)