Tim Abbott
7d3b451902
lint: Check for extremely long lines.
...
Currently, we check for lines longer than 180 characters; we can lower
this as we clean up or wrap longer strings.
2016-06-25 10:52:03 -07:00
Umair Khan
a70d5041d2
Don't allow literal strings in report_error.
2016-06-23 16:23:01 -07:00
Umair Khan
b7bb49c6f5
Don't allow literal string in report_success.
2016-06-23 16:23:01 -07:00
Tim Abbott
6b8e9c7254
Exclude static/locale from linters.
2016-06-21 17:17:34 -07:00
Tim Abbott
eb71173be3
lint: Fix warnings under confirmation/.
2016-06-20 08:19:54 -07:00
Tim Abbott
6d1d7471e6
Refactor out zproject/dev_settings.py.
2016-06-17 12:15:15 -07:00
Tim Abbott
d117ec8664
lint: Fix redundant stripping of strings.
2016-06-17 10:41:39 -07:00
Tim Abbott
267a71cf20
Run Python custom RE checks in parallel with non-python.
...
This saves about 1s (out of originally 3.3s) of time running all the
linters in my development environment.
2016-06-17 10:26:50 -07:00
John Hergenroeder
16a19226f6
Add linter check for redundant REQ whence argument.
2016-06-16 13:53:39 -07:00
Umair Khan
c1f5ac375c
Add linter checks for javascript strings and HTML placeholders.
...
Checks are added for:
- i18n.t
- placeholder
- compose_error
2016-06-13 09:05:27 -07:00
Tim Abbott
584887e588
lint: Require folding of } on same line in else if statements.
2016-06-09 14:05:34 -07:00
Tim Abbott
c35781d505
lint: Require folding of } on same line as else statements.
2016-06-09 14:02:49 -07:00
Tim Abbott
0c1b5006f7
lint: Check for space after if in javascript.
2016-06-09 13:47:12 -07:00
Tim Abbott
eba0d6339f
lint: Require space after // in JS comments.
2016-06-09 13:44:24 -07:00
Tim Abbott
a09b950097
lint-all: Check for relative URLs in JSON calls from JS.
2016-06-09 11:59:40 -07:00
Ernesto Vargas
ffb2f9e84b
lint/tests: Give nice error message for common import failures.
...
This should make users much more likely to be able to debug issues
where they ran Zulip outside the Vagrant environment or virtualenv.
[error messages tweaked by tabbott]
2016-06-06 13:39:26 -07:00
Tim Abbott
553ef81f92
Add lint rules for mypy type annotations.
2016-06-05 13:00:55 -07:00
Tim Abbott
03debdf82f
Fix malformed error message when creating invalid Realm Emoji.
...
Thanks to Greg McCoy for his help finding this bug.
2016-06-03 23:12:36 -07:00
Nathan Florea
5fe9076631
Remove some mutable default arguments.
...
These ones don't fix any bugs, because the mutable arg is never passed
outside of the callable or mutated. But it's good practice to not use
them in case those invariants are changed in the future.
2016-06-03 09:16:56 -07:00
Umair Khan
bd4e471706
Check json_error and JsonableError in linter.
...
Mainly the check is to ensure that all the strings that pass through
these two functions are captured by `makemessages`.
2016-05-31 07:40:42 -07:00
Umair Khan
4b28fcd2f3
Add option to linter to exclude lines from files.
2016-05-31 07:40:42 -07:00
Tim Abbott
41336f3782
lint-all: Check for use of '== None'.
2016-05-31 07:02:04 -07:00
Eklavya Sharma
1c04560def
Re-enable pyflakes in linter and remove python 3 pyflakes errors.
2016-05-25 19:25:13 +05:30
Eklavya Sharma
1a6257394c
Make tools/lint-all run on python 3.
...
Since pyflakes catches some extra errors in python 3, disable
pyflakes for now.
2016-05-25 19:23:13 +05:30
Eklavya Sharma
3185b7e750
Remove unneeded imports from tools/lint-all.
2016-05-25 19:12:09 +05:30
Tim Abbott
542af0d6b6
lint: Add option to print verbose timing output.
2016-05-04 14:22:52 -07:00
Tim Abbott
e2aeee0c35
lint: Add check for unnecessary whitespace between % and (.
2016-05-04 14:22:52 -07:00
Tim Abbott
72ee9f5137
lint: Check for unnecssary whitespace after ','s.
2016-05-04 14:17:27 -07:00
Tim Abbott
391a225595
lint: Check for missing space after comments.
2016-05-02 22:10:47 -07:00
Tim Abbott
302da832fa
lint: Enforce whitespace between : and value in dicts.
2016-04-27 22:23:40 -07:00
Tim Abbott
8a278cbe3a
Switch to using a Zulip version of @login_required.
...
Currently the code is the unmodified Django upstream implementation;
this commit is preparation for modifying it.
2016-04-21 14:59:39 -07:00
Tim Abbott
9c56027627
lint: Add CSS lint rule for whitespace after {.
2016-04-20 11:50:01 -07:00
Tim Abbott
a46b5d7bbe
Add lint check for missing whitespace after =.
2016-04-20 11:37:03 -07:00
Tim Abbott
a72385246e
Fix missing whitespace after '=' in python/js code.
2016-04-20 11:36:14 -07:00
Tim Abbott
a2b59b8b51
lint: Check whitespace rules for txt files.
2016-04-14 14:36:29 -07:00
Tim Abbott
39950b8f4f
lint: Check whitespace rules in markdown files too.
2016-04-14 14:30:29 -07:00
Tim Abbott
2b76f6223e
Make 'no newline at end of file' lint error more actionable.
...
There's a handy sed command to fix this, so we might as well document
it.
2016-04-14 10:55:06 -07:00
Tim Abbott
e71d8bb4b6
lint-all: Require newlines at end of JSON files.
2016-04-14 10:49:12 -07:00
Tim Abbott
9584ae1ab8
Add CSS linter for missing space after : in rules.
2016-04-08 21:04:43 -07:00
Tim Abbott
209e6ef7a1
Run trailing whitespace linter on bash files.
2016-04-08 11:52:11 -07:00
Tim Abbott
caba24b2af
Fix existing trailing whitespace in bash scripts.
2016-04-08 11:52:11 -07:00
Tim Abbott
4fa63c29ca
Run whitespace linters on html files.
2016-04-08 11:52:11 -07:00
Tim Abbott
d670e902a9
Run whitespace linters on handlebars templates.
2016-04-08 11:52:11 -07:00
Tim Abbott
c6d01ab76b
Run whitespace linters on CSS files.
2016-04-08 11:47:10 -07:00
Tim Abbott
1b84617771
Don't skip running python custom linters inside comments.
...
This fixes an issue where we weren't checking for trailing whitespace
in comments.
2016-04-08 11:47:10 -07:00
Tim Abbott
14b5e265c2
Remove unuseful suspicious code lint check.
2016-04-08 11:47:10 -07:00
Tim Abbott
efd14e7ad9
Revert "Exclude 'from typing import *' from linter."
...
This reverts commit d936bf61f9
.
We no longer need this since we've migrated to specifying the
dependencies in the typing module that we're actually using.
2016-04-07 14:12:18 -07:00
Tim Abbott
78e289f904
Exclude puppet-common tests from puppet linter.
2016-04-04 17:08:29 -07:00
Eklavya Sharma
81fdeae0ea
Remove '.'s from extensions in lister.py interface and lint-all.
...
In lint-all, change occurences of '.py', '.js', ... to 'py', 'js', ....
2016-04-01 15:27:16 -07:00
Eklavya Sharma
ad4c20a3e6
Migrate lint-all to lister.py for getting files.
...
This has the side effect of making lint-all check all shell scripts,
not just those under scripts/, tools/, and bin/.
[commit message expanded by tabbott]
2016-04-01 15:24:43 -07:00