Commit Graph

15 Commits

Author SHA1 Message Date
m-e-l-u-h-a-n 911c5f19f1 tools: Rename force argument to skip-provision-check
This commit renames --force argument used with various tests to
--skip-provision-check. As a consequence of this name change all other
files that set --force option for the test commands have been updated.

This change is done in order to provide more clarity for using this
option for runnning tests.

This commit addresses issue #17455.
2021-03-03 09:17:49 -08:00
Anders Kaseorg dfaea9df65 shfmt: Reformat shell scripts with shfmt.
https://github.com/mvdan/sh

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-15 15:16:00 -07:00
Aman Agrawal 6b73926e93 lint: Add --skip arg to replace --no-gitlint/mypy.
Use --skip=gitlint,mypy instead of --no-gitlint/mypy.
2019-06-18 11:32:04 -07:00
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00
Anders Kaseorg 49ae9c1e44 pre-commit: Fix shellcheck warnings.
In tools/pre-commit line 18:
if [ -z "$VIRTUAL_ENV" ] && `which vagrant > /dev/null` && [ -e .vagrant ]; then
                            ^-- SC2092: Remove backticks to avoid executing output.
                            ^-- SC2006: Use $(..) instead of legacy `..`.
                             ^-- SC2230: which is non-standard. Use builtin 'command -v' instead.

In tools/pre-commit line 23:
    ./tools/lint --no-gitlint --force $changed_files || true
                                      ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-10-18 15:26:21 -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
Joshua Pan 64984f5bf4 Rename tools/lint-all to tools/lint.
Fixes #4574.
2017-04-21 14:57:47 -07:00
Tommy Ip ec8e47192a lint: Add checks for commit messages using gitlint.
Fixes #1131.
2017-04-21 13:45:12 -07:00
Elliott Jin ac488fd45f tools: Don't lint in pre-commit hook if no files changed. 2017-03-19 14:13:38 -07:00
Tim Abbott d98c19ca98 lint: Include pep8 checks in pre-commit hook. 2017-02-07 13:22:01 -08:00
Tim Abbott 25c6b9f586 pre-commit: Call lint-all with --force. 2016-11-26 12:30:16 -08:00
Christie Koehler 7f48b3c137 tools: Update pre-commit hook so it works with vagrant dev setup.
Details:

Previously this hook required that you either be inside the vagrant
Zulip dev virtual machine when you ran git commit or that you had setup
your Zulip dev environment manually.

Now the script runs the linter via vagrant ssh if the following
conditions are met:

- VIRTUAL_ENV is not set
- vagrant is installed and a .vagrant directory exists in the repo

Otherwise the linter is run as it was before.

[tweaked to fix a few style things by tabbott]
2016-08-25 15:19:40 -07:00
Steve Howell 2423c9bc15 Speed up ./tools/pre-commit by checking only staged files.
(imported from commit 2669635c94c41890bfe712f609b640b013a61782)
2013-12-02 16:14:06 -05:00
Steve Howell d897d0ad57 Fix pre-commit to call lint-all, not check-all
(imported from commit 8450e79c2d9538c7bfd3cebe597a2869f8800eea)
2013-08-09 14:23:36 -04:00
Tim Abbott 1ab3918338 Add pre-commit and post-commit hooks for use on dev systems.
As well as a little script to automatically configure them.

(imported from commit c2e7f990f5f2091b5bebdd1b3dad402457943c95)
2013-05-30 10:29:44 -04:00