Commit Graph

211 Commits

Author SHA1 Message Date
Tim Abbott 3f83ea3879 lint: Ban use of get_stream in most views files. 2017-01-29 20:26:59 -08:00
Tim Abbott de68dd2860 lint: Ban use of Stream.objects.* in zerver/views. 2017-01-29 20:26:59 -08:00
Tim Abbott bb86bba20d stream_exists_backend: Use access_stream_by_name. 2017-01-29 20:26:59 -08:00
Tim Abbott 0af34ee710 streams: Add zerver/lib/streams.py library for security checks.
The goal of this library is to make it a lot easier to prevent bugs
like CVE-2017-0881 by having all of our views logic for fetching a
stream go through a couple carefully tested code paths.
2017-01-29 20:26:58 -08:00
Yago González 87a7691bfc translations: Improve some strings. 2017-01-28 18:58:09 -08:00
Brock Whittaker 1dd8fb7966 Display realm emojis in the emoji picker container.
This displays the realm emojis in the emoji picker container in their
own divs styled similarly to the existing .emoji divs.
2017-01-27 15:39:22 -08:00
Tim Abbott 4e171ce787 lint: Clean up E126 PEP-8 rule. 2017-01-23 22:06:13 -08:00
Tim Abbott 31e7dcd86b lint: Tag remaining PEP-8 rules with explanations. 2017-01-23 21:43:33 -08:00
Tim Abbott 376aa3e404 lint: Clean up E702 PEP-8 rule. 2017-01-23 21:37:27 -08:00
Tim Abbott de99f48ce7 lint: Clean up E401 PEP-8 rule. 2017-01-23 21:36:39 -08:00
Tim Abbott d6e38e2a5c lint: Clean up E123 PEP-8 rule. 2017-01-23 21:34:26 -08:00
Tim Abbott 9cc83f87fc lint: Clean up E241 PEP-8 rule. 2017-01-23 21:21:14 -08:00
Tim Abbott fe4f7b1170 lint: Clean up E711 PEP-8 rule. 2017-01-23 21:11:49 -08:00
Tim Abbott 9640a9e864 lint: Clean up E712 PEP-8 rule. 2017-01-23 21:11:18 -08:00
Tim Abbott e385b93448 lint: Clean up E713 PEP-8 rule. 2017-01-23 21:08:52 -08:00
Tim Abbott a088cdaa04 lint: Clean up E714 PEP-8 rule. 2017-01-23 21:07:45 -08:00
Tim Abbott d96f392147 lint: Clean up E741 PEP-8 rule. 2017-01-23 21:07:04 -08:00
Tim Abbott e5daec46ec lint: Clean up E306 PEP-8 rule. 2017-01-23 21:05:08 -08:00
Tim Abbott e3e92903eb lint: Document why E305 is turned off. 2017-01-23 21:03:46 -08:00
Tim Abbott e9158dd520 lint: Clean up E121 PEP-8 rule. 2017-01-23 21:02:39 -08:00
Tim Abbott 6f0d2a9445 lint: Clean up E115 PEP-8 rule. 2017-01-23 20:55:37 -08:00
Feorlen 378ac3abf3 Lint yaml files using text file rules.
Fixes #3404
2017-01-23 20:53:20 -08:00
Tim Abbott df3d6aee5d lint: Clean up E114 PEP-8 lint rule. 2017-01-23 20:52:58 -08:00
Tim Abbott 22d1aa396b lint: Clean up W503 PEP-8 warning. 2017-01-23 20:50:04 -08:00
Tim Abbott bde2da7dfd lint: clean up PEP-8 W391 rule. 2017-01-23 20:39:02 -08:00
Zev Benjamin f4d3cc6545 Annotate ignored pep8 rules to explain why they're ignored 2017-01-23 20:19:58 -08:00
Robert Hönig bef93959d3 Restructure converter bot.
Apply the new layout for 'contrib_bots' bots to the converter bot
to make it an exemplary model for new bots.
2017-01-22 05:42:46 -08:00
Robert Hönig 4415d6085f Restructure contrib_bots bots to new layout.
In order to make the layout of all bots consistent, this commit
moves each bot into a folder with its name and modifies 'run.py'
so that only bots with such a structure can be executed. 'lib'
gets renamed to 'bots'.
2017-01-22 05:42:46 -08:00
Tim Abbott 1a536f381c lint: Fix some PEP-8 lint errors. 2017-01-19 16:42:50 -08:00
Tim Abbott d091691b3d lint: Require access_message to access Message objects. 2017-01-19 15:59:06 -08:00
Robert Hönig 789ae8648a Add wrapper and log file output for provisioning.
Before this commit, provisioning was done by executing provision.py,
which printed the log directly to stdout, making debugging harder.
This commit creates a wrapper bash script 'provision' in tools, which
calls 'zulip/scripts/tools/provision_vm.py' (the new location of
provision.py) and prints all the output to
'zulip/var/log/zulip/zulip_provision.log' via 'tee'.
Travis tests and docs have been modified accordingly.
2017-01-17 14:23:28 -08:00
Tim Abbott a64a1de023 lint: Be more permissive with Markdown links. 2017-01-12 16:42:51 -08:00
Tim Abbott 3f8d4193da lint: Fix % comprehensions being used without a tuple. 2017-01-09 11:45:11 -08:00
sinwar 3f350391ce docs: Ban the term realm from user documentation.
Fixes #3031.
2017-01-09 10:58:19 -08:00
Tim Abbott 3a64857a4c lint: Fix long lines not being treated as actual errors.
This led to Travis CI not reporting on line-too-long errors.
2017-01-08 22:48:27 -08:00
Tim Abbott b54f8b3b14 lint: Fix incorrect line length calculations in Python 2.
Previously, we would incorrectly be counting bytes in Python 2, which
meant lines with unicode characters in them appeared to the linter to
be far longer than they actually were.
2017-01-08 22:46:02 -08:00
Tim Abbott a39643da61 lint: Require space after likely ends of sentences in help. 2017-01-06 11:18:45 -08:00
Tim Abbott 1262db40ea lint: Check for invalid '!!! warning'. 2017-01-05 15:15:19 -08:00
Tim Abbott 8b839c96d4 lint: Check for long lines in all markdown files in general.
This has a few excludes for cases involving code blocks where it would
have been difficult to clean up.
2017-01-05 15:06:34 -08:00
Tim Abbott bc4a9ff722 lint: Enforce no lines longer than 120 characters in help docs.
This requires some somewhat messy changes to the all-streams macro.
2017-01-05 14:54:04 -08:00
Tim Abbott a0f3f3dfa0 lint: Forbid script tags in handlebars templates. 2016-12-30 12:43:56 -08:00
Tim Abbott 39f0ffdedd Move static/third/gemoji to static/generated/emoji.
Fixes #1153.
2016-12-27 20:16:23 -08:00
Tim Abbott 726e2649b4 lint: Run linters on settings.py files.
This finishes clearing unnecessarily excluded items from the global
tools/lint-all exclude list.  The remaining items are third-party code
or generated code that doesn't make sense to lint.

Fixes #822.
2016-12-27 19:53:44 -08:00
Tim Abbott d47ea7a608 lint: Add comments to EXCLUDED_FILES entries. 2016-12-27 19:48:43 -08:00
Tim Abbott f46d99ba85 lint: Remove zerver/migrations from main exclude list. 2016-12-27 19:45:33 -08:00
Tim Abbott ab89664d90 lint: Clean up main exclude list and move to pyflakes. 2016-12-27 19:45:33 -08:00
Tim Abbott 1c5e8cd47b lint: Check for spelling of organization and fix errors. 2016-12-27 17:25:01 -08:00
Sampriti Panda c0326d1938 Add lint rule to disallow python calls with versions (e.g: python2, python3)
Fixes #2435
2016-12-19 08:00:48 -08:00
Tim Abbott 81dbf8c80a lint: Enforce no external resources in CSS. 2016-12-15 22:02:10 -08:00
Umair Khan d85e85c9eb linter: Add rule to check title attribute for i18n.
Fixes #2698
2016-12-15 13:44:13 -08:00