Граф коммитов

43 Коммитов

Автор SHA1 Сообщение Дата
Alain Jobart 6bff9aed5b Updating comment. 2015-12-16 07:52:43 -08:00
Alain Jobart 43a0fda983 Now forcing gofmt -s format before commit. 2015-12-16 07:52:01 -08:00
Michael Berlin 0787d482b4 misc: Allow Git pre-commit hook to be run from any working directory.
I have an alias to the pre-commit script which I sometimes run manually
e.g. to go over all lint errors.

Before this fix, pre-commit could only be run from $VTTOP.
2015-12-07 18:41:07 -08:00
Sugu Sougoumarane 8084edfbf2 sqlparser: change JOIN syntax to match MySQL
Specified here: http://dev.mysql.com/doc/refman/5.7/en/join.html
2015-11-23 00:04:12 -08:00
Alain Jobart 11b9990b32 Removing unnecessary govet exception, and fixing paths
in the exception file to prove it works.
2015-11-11 09:57:45 -08:00
Anthony Yeh 6f5c906761 tools: Create separate pylint script.
This lets you run pylint manually, with the same flags that would be
used by the pre-commit hook.
2015-11-10 11:41:30 -08:00
Dean Yasuda b3423f99a0 Fix test/resharding.py typo. 2015-11-05 20:31:38 -08:00
Dean Yasuda b6a7a01efe Use pylint test-mode for fiels in test/.
Clean some obvious pylint errors in test dir.
2015-11-05 16:55:30 -08:00
Dean Yasuda ca109103dd Make pylint pre-commit hook less strict.
Ignore some google-specific warnings that don't apply.

When displaying errors, print path name on each error line instead of as
a header.

Clean up a couple of python files modified while testing.
2015-11-04 19:47:34 -08:00
Alain Jobart 33908c55d1 Excluding proto generated files from golint and pylint. 2015-11-03 08:26:45 -08:00
Dean Yasuda 5da2ccb004 Minor misc/git/hooks/pylint comment fixes. 2015-11-02 17:01:06 -08:00
Dean Yasuda 9ebb500e6d Add pylint pre-commit hook.
This uses /usr/bin/gpylint; systems without gpylint will
skip this check.
2015-11-02 15:51:39 -08:00
Michael Berlin 7cfa14ecd0 misc: Fail precommits if GOPATH is not set.
Some precommits (go vet, golint) require a working Go environment
because they not only look at the file under inspection itself, but they
also try to load the imported packages.

Unfortunately, they don't fail if they cannot load the imports. Instead,
you see subsequent errors due to the missing imports.

For example:

Go vet error: "composite literal uses unkeyed fields"

This occurs when we use a struct initializer
without keyed fields where the struct is defined in another Go package.
In that case, the tools cannot find out how many/which fields the struct
has and if it's actually okay to use unkeyed fields because we specify
all fields.
2015-10-23 17:45:54 -07:00
Alain Jobart bcb1647b49 Adding better error handling for grpc tablet client.
Still seems to break vtgatev2_test.py in grpc though.
2015-08-07 11:41:11 -07:00
Michael Berlin 16e920a949 golint precommit: Assume the shell is non-interactive when grabbing tty failed. 2015-08-05 15:41:00 -07:00
Michael Berlin 90a372642c Fix golint pre commit hook for non-interactive shell.
When running the precommit commands from Eclipse, such a shell is used.
2015-08-05 15:37:25 -07:00
Michael Berlin be3bd1a1b9 Revert "Fix golint pre commit hook for non-interactive shell." 2015-08-05 10:18:18 -07:00
Michael Berlin 2835eb0b43 Fix golint pre commit hook for non-interactive shell.
When running the precommit commands from Eclipse, such a shell is used.
2015-08-04 14:17:32 -07:00
Michael Berlin 4ba6565e1a golint git hook: In case of errors, add "s" (step) mode.
If selected, the user will step through each file with warnings. Between
files, the user has to press enter to make sure that we don't flood the
whole screen and it's easy to fix one file after the other.
2015-06-17 21:57:57 -07:00
Michael Berlin 3aff3976ca golint git hook: Print golint command on new line.
This way it's easier to copy and paste it with a triple mouse click.
2015-06-17 21:57:09 -07:00
Anthony Yeh 38cdee23e9 Remove unused createcl script. 2015-05-05 14:37:30 -07:00
Anthony Yeh 86071decf6 Ignore third_party and Godeps in git precommit hooks. 2015-01-28 15:42:47 -08:00
Anthony Yeh 675db2eb64 Print command to install golint if it's not found. 2014-12-19 13:48:58 -08:00
Anthony Yeh ec0815e2bb Add git pre-submit hook for golint.
Golint should never be required, as per the docs:

"""
The suggestions made by golint are exactly that: suggestions.
Golint is not perfect, and has both false positives and false negatives.
Do not treat its output as a gold standard. We will not be adding
pragmas or other knobs to suppress specific warnings, so do not expect or
require code to be completely "lint-free".
"""

This hook only shows the line count of the golint output for each file
modified in a commit. That way you don't get flooded just because you
changed one line in a file with a hundred pre-existing lint issues.

However, if we just print the warnings without stopping, you'll probably
never see them because your editor comes up to let you write a commit
message. So we try to steal back the keyboard and pause to let you know
you might want to look into the lint warnings. If the stealing ends up
being buggy, we'll have to think of something else.
2014-12-19 13:10:48 -08:00
Anthony Yeh 3ebfb30a5c Simplify instructions for contributing and deprecate createcl. 2014-10-17 19:56:20 -07:00
Anthony Yeh 889a1682ff Add "go vet" as a presubmit and use goimports instead of gofmt. 2014-08-06 12:07:50 -07:00
Alain Jobart 166937eb27 Code coverage helpers. 2014-04-30 13:43:22 -07:00
Alain Jobart 22f185e349 Abbreviated commit. 2013-08-20 11:53:22 -07:00
Alain Jobart e9cb8446bb Better commit log. 2013-08-20 11:46:51 -07:00
Alain Jobart d51ac1475c And really running upload.py. 2013-08-20 10:54:04 -07:00
Alain Jobart 574b8b6c75 Now generate appspot description from git log. 2013-08-20 10:53:16 -07:00
Alain Jobart 01694baf6b Allow the user to specify a --rev to upload.py. 2013-08-20 10:30:40 -07:00
Sugu Sougoumarane 4f0d49c53e keep createcl simple for now 2013-07-25 09:55:11 -07:00
Sugu Sougoumarane 7c0452dd98 fix typo 2013-07-24 21:50:14 -07:00
Sugu Sougoumarane dc1dbf2869 script for appspot code review 2013-07-24 21:40:12 -07:00
Alain Jobart d7dfb0dcc0 Fixing typo in this script. 2013-07-23 11:04:19 -07:00
Ryszard Szopa 4bf5d66fd2 Add hooks and PS1 for Go. 2013-07-19 17:12:06 -07:00
Alain Jobart 21a4f62c61 Removing mercurial references. 2013-07-19 10:53:25 -07:00
Mike Solomon cc0e706ad6 exclude non-hg files from the gofmt check 2013-05-08 15:38:00 -07:00
Sugu Sougoumarane f05f6684f3 Add missing hook to ensure linear tree. 2012-09-04 14:27:00 -07:00
Alain Jobart 03da62013a Adding a generic command-line SQl client.
Removing the script to run al unit tests, replacing it
with a Makefile rule.
And removing an unused methoed in a test.

LGTM by Sugu.
2012-08-20 15:22:23 -07:00
Alain Jobart a623825d9c Fixing vt/client2 to be a real and working database/sql/driver/Driver.
Also adding a script to run all the unit tests that work.

LGTM by Sugu.
2012-08-17 15:32:08 -07:00
Mike Solomon cf9a0b0433 add gofmt hook 2012-08-12 00:17:47 -07:00