docs: Increase highlighting of our linters in documentation.

This commit is contained in:
Tim Abbott 2018-11-29 14:09:03 -08:00
parent 4f022d3428
commit 30e5b5fe55
3 changed files with 24 additions and 15 deletions

View File

@ -69,10 +69,11 @@ to help.
if you run into any troubles.
* Read the
[Zulip guide to Git](https://zulip.readthedocs.io/en/latest/git/index.html)
and do the Git tutorial (coming soon) if you are unfamiliar with Git,
getting help in
[#git help](https://chat.zulip.org/#narrow/stream/44-git-help) if you run
into any troubles.
and do the Git tutorial (coming soon) if you are unfamiliar with
Git, getting help in
[#git help](https://chat.zulip.org/#narrow/stream/44-git-help) if
you run into any troubles. Be sure to check out the
[extremely useful Zulip-specific tools page](https://zulip.readthedocs.io/en/latest/git/zulip-tools.html).
* Sign the
[Dropbox Contributor License Agreement](https://opensource.dropbox.com/cla/).

View File

@ -5,12 +5,14 @@ time when working with Git on the Zulip project.
## Set up git repo script
In the `tools` directory of [zulip/zulip][github-zulip-zulip] you'll
find a bash script `setup-git-repo`. This script installs the Zulip
pre-commit hook. This hook will run each time you `git commit` to
automatically run Zulip's linters on just the files that the commit
modifies. The hook passes no matter the result of the linter, but you
should still pay attention to any notices or warnings it displays.
**Extremely useful**. In the `tools` directory of
[zulip/zulip][github-zulip-zulip] you'll find a bash script
`setup-git-repo`. This script installs a pre-commit hook, which will
run each time you `git commit` to automatically run
[Zulip's linter suite](../testing/linters.html) on just the files that
the commit modifies (which is really fast!). The hook passes no matter
the result of the linter, but you should still pay attention to any
notices or warnings it displays.
It's simple to use. Make sure you're in the clone of zulip and run the following:

View File

@ -31,18 +31,24 @@ and exempting legacy files from lint checks.
## Running the linters
If you run `./tools/test-all`, it will automatically run the linters (with
one small exception: it does not run mypy against scripts).
You can also run them individually:
If you run `./tools/test-all`, it will automatically run the linters.
You can also run them individually or pass specific files:
./tools/lint
./tools/lint static/js/compose.js
./tools/lint static/js/
./tools/run-mypy
./tools/run-mypy --scripts-only
Finally, you can rely on our Travis CI setup to run linters for you, but
it is good practice to run lint checks locally.
**Important:** We provide a
[Git pre-commit hook](http://localhost:9991/docs/git/zulip-tools.html#set-up-git-repo-script)
that can automatically run `tools/lint` on just the files that
changed (in a few 100ms) whenever you make a commit. This can save
you a lot of time, by automatically detecting linter errors as you
make them.
**Note:** The linters only check files that git tracks. Remember to `git add`
new files before running lint checks.