Commit Graph

34 Commits

Author SHA1 Message Date
Tim Abbott b1d98c1d0f lint: Only run find_add_class when JS files change. 2017-08-27 13:51:06 -07:00
Tim Abbott 79ae262463 lint: Only run check-urls after python files change. 2017-08-27 13:51:06 -07:00
Robert Hönig c5da0ada31 linter: Replace --pep8 with new --frontend/--backend options.
Adds the --frontend and --backend options to replace
--pep8.

Significantly modified by tabbott to use a cleaner framework.
2017-08-27 13:50:53 -07:00
Robert Hönig 2186d53cf5 linter: Migrate lint from optparse to argparse. 2017-08-27 13:18:55 -07:00
Greg Price a099e698e2 py3: Switch almost all shebang lines to use `python3`.
This causes `upgrade-zulip-from-git`, as well as a no-option run of
`tools/build-release-tarball`, to produce a Zulip install running
Python 3, rather than Python 2.  In particular this means that the
virtualenv we create, in which all application code runs, is Python 3.

One shebang line, on `zulip-ec2-configure-interfaces`, explicitly
keeps Python 2, and at least one external ops script, `wal-e`, also
still runs on Python 2.  See discussion on the respective previous
commits that made those explicit.  There may also be some other
third-party scripts we use, outside of this source tree and running
outside our virtualenv, that still run on Python 2.
2017-08-16 17:54:43 -07:00
neiljp (Neil Pilgrim) f96f71e439 mypy: assert Popen.stdout based on API, in tools/lint. 2017-08-03 11:09:50 -07:00
Tommy Ip 61e24cfbea tools: Remove unused `bright_red_output` context manager.
This context manager is no longer in use since the linter visual
updates.
2017-07-05 23:31:09 -07:00
Tommy Ip 766abaa1a3 linter: Update external_linter visual output. 2017-07-05 23:31:08 -07:00
Steve Howell a606628b16 Extract tools/linter_lib/pep8.py 2017-06-05 09:20:21 -07:00
Steve Howell 9fab41aebb Extract tools/linter_lib/pyflakes.py 2017-06-05 09:20:21 -07:00
Steve Howell 29affda956 Extract tools/linter_lib/exclude.py 2017-06-05 09:20:21 -07:00
Steve Howell 40a2ffad98 Extract tools/linter_lib/custom_check.py.
As part of extracting this, we exempt the library from all custom
checks on itself.  This is expedient, since a lot of our
custom checks are naive about whether things are in strings, and
it is also a pain to configure individual rules.
2017-06-05 09:20:21 -07:00
Steve Howell 8ee50f019b lint: Add "nolint" handling for custom checks. 2017-06-05 09:20:21 -07:00
Aditya Bansal acefc67f2f lint: Start enforcing PEP-E261 by default in our linters.
In this commit we start to check for violations to PEP-E261 in our
codebase by default in our linters. Also we have introduced a
ignore list which has around 20 files still in violation to
PEP-E261 which we intend to clear up soon.
2017-06-04 09:18:23 -07:00
Aditya Bansal a9e6106d54 pep8: Add compliance with rule E261 lint. 2017-06-04 09:18:22 -07:00
Tim Abbott ba74d74dca lint: Fix incorrectly placed docstring. 2017-06-03 16:02:24 -07:00
Yago González 9602f73d05 lint: Add validation for the Swagger file. 2017-06-03 15:48:04 -07:00
Yago González 99b004942f lint: Explain the purpose of target_langs.
Tweaked by tabbott to be a longer docstring.
2017-06-03 15:48:00 -07:00
Eeshan Garg 829491fde7 webhooks/papertrail: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 5d868b1612 webhooks/helloworld: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg ccd079b425 webhooks/solano: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Umair Khan bf2bc8d44b lint: Allow empty string in alt arg. 2017-06-01 22:07:43 -07:00
Rohitt Vashishtha db9918f3d6 bots: Move contrib_bots to api/bots*.
This will make it convenient to include these bots in Zulip API
releases on pypi.

Fix #5009.
2017-06-01 12:31:54 -07:00
Pweaver (Paul Weaver) bbb3aad611 Add typescript support to asset compilation. 2017-05-28 17:28:28 -07:00
Umair Khan 7f43ec05f2 lint: Add rule to check alt arg for translation. 2017-05-26 15:28:46 -07:00
Eeshan Garg e9b3b56105 webhooks/appfollow: Use parametric Markdown macros. 2017-05-24 17:00:19 -07:00
Eklavya Sharma b805e0ca10 mypy: Assert non-Noneness.
Convince mypy that an object cannot be None by using an assert.
2017-05-23 21:56:50 -07:00
Eeshan Garg ed8c6943f2 webhooks/airbrake: Use Markdown macros for documentation. 2017-05-22 18:19:14 -07:00
Aditya Bansal cd7fda993a pep8: Add compliance with rule E261 to lint. 2017-05-18 03:00:32 +05:30
Eeshan Garg 21e0db03e1 webhooks/appfollow: Migrate docs to Markdown. 2017-05-15 20:14:23 -07:00
Eeshan Garg 0b5711aa7e webhooks/airbrake: Migrate docs to Markdown. 2017-05-15 20:14:23 -07:00
Rishi Gupta 21a2c7b9d9 email: Remove translation tags from email templates.
The only thing being translated in any email was the title of the Zulip
header image in the html file, probably because not doing so breaks a linter
rule.

he name "Zulip" doesn't make sense to translate anyway.
2017-05-03 23:25:33 -07:00
Tim Abbott ec90f0c342 Disable gitlint commit message linter for now.
We've found a couple major issues that we need to fix:
* TRAVIS_COMMIT_RANGE being computed incorrectly in some cases (?!)
* The imperative linter could use some work.
2017-04-28 12:26:26 -07:00
Joshua Pan 64984f5bf4 Rename tools/lint-all to tools/lint.
Fixes #4574.
2017-04-21 14:57:47 -07:00