Aman Agrawal
a1fadc28ba
lint: Make `custom_rules.py` pass all lint checks.
...
The functions here weren't checked by all linters when they were in
`custom_check.py`. Hence, modified to pass all lint checks.
2019-05-29 16:53:59 -07:00
Aman Agrawal
90c3578a88
lint: Move `custom_check_file` from `custom_check.py` to `custom_rules.py`.
2019-05-29 16:53:59 -07:00
Aman Agrawal
42efb60665
lint: Extract general funcs from custom_check.py to zulint/custom_rules.py.
2019-05-29 16:53:59 -07:00
Aman Agrawal
337060de01
lint: Move runnable code form `pyflakes.py` to `zulint/linters`.
...
Extract runnable code from `linter_lib/pyflakes.py` and move it to
`zulint/linters`. This keeps zulip specific pyflakes config separate
form zulint.
2019-05-29 16:53:59 -07:00
Rohitt Vashishtha
eb44b7d69d
linter: Do not lint scripts parsed with tail (like dev-motd).
2019-05-27 12:40:02 -07:00
Anders Kaseorg
ee8ff4df66
tools: Remove unused imports.
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-02 17:10:31 -08:00
Tim Abbott
2558f101af
docs: Add documentation for `if False` mypy pattern in scripts.
...
This should help make it clear what's going on with these scripts.
2018-12-17 11:12:53 -08:00
Tim Abbott
209df75ffa
lint: Enforce use of Python 2 style typing in zulint.
...
This is intended to be extracted as an external project that supports
Python 2+3.
2018-12-17 11:00:08 -08:00
Tim Abbott
6b69cc0b39
lint: Run mypy as part of main linter.
...
To support this, we add a pass_targets option to the main linter
library, because with current mypy, it's generally counterproductive
to pass the list of files in (can produce spurious errors; isn't
faster).
2018-12-16 21:52:53 -08:00
Tim Abbott
458c17868f
zulint: Move pycodestyle runner code to library.
...
This way, only the Zulip project's specific configuration ends up
living in pep8.py.
2018-08-04 19:54:18 -07:00
Tim Abbott
3b53ddf779
zulint: Stop importing color codes from zulip_tools.py.
...
This is I think the final dependency that zulint/ has on the rest of
the project.
2018-08-04 19:53:53 -07:00
Tim Abbott
c0beeebc3e
zulint: Move printer.py module to tools/zulint.
...
At this point, tools/linter_lib is intended to be the directory of
Zulip-specific code.
2018-08-04 19:53:53 -07:00
Tim Abbott
55ba434ecb
zulint: Extract LinterConfig class to zulint.
2018-08-04 19:53:53 -07:00
Tim Abbott
f74bb8a9b2
zulint: Extract run_parallel and do_lint.
2018-08-04 19:53:53 -07:00
Tim Abbott
acf8ec492d
zulint: Extract common linter argument parsing logic.
...
The remaining code is Zulip-specific business logic.
2018-08-04 19:53:53 -07:00
Tim Abbott
1fcc2a6ea4
zulint: Move lister.py to tools/zulint.
...
This is preparatory refactoring work for being able to extract the
linter as an external project called "zulint".
2018-08-04 19:53:53 -07:00