Commit Graph

15 Commits

Author SHA1 Message Date
booto 712f44edd9 lint: remove superfluous logging
Make lint script be silent unless there's a problem. This line doesn't
work anyway, trying to redirect to fd 0.
2018-10-05 19:35:46 -04:00
riking c5ecb718ac Add Android code style enforcement to lint.sh
This requires buildbot changes: the path to the Android Studio
installation must be supplied in an environment variable.

Modified files are copied out to a temporary directory, Android Studio
is asked to format the files, and a git diff is performed.
2018-08-26 19:18:31 -07:00
spycrab d27e85e9d7 Tools: Bump lint.sh version 2018-04-12 10:49:55 +02:00
N.E.C f9b8365190 Tools: Check for git and clang-format version 3.8.* in lint.sh 2017-08-16 22:28:02 -07:00
Michael M 4c92d8c81e Tools/lint.sh: lint all of Source, not just Core 2017-08-13 19:04:56 -07:00
Michael Maltese 6939590598 Tools/lint.sh: turn on Bash 'strict mode'
Now fails if any commands fail. I noticed that on the buildbot, the
arguments to this script can be incorrect (somehow?) which can result in
no lint checks happening but the buildbot still passing.
2017-07-18 15:36:15 -07:00
Léo Lam 9c63544445 Tools: Allow diffing against arbitrary revisions
Instead of applying PRs as patches and leaving them as staged changes,
the lint builder now checks out the PR branch, so the lint script
must be able to call git diff with more than just --cached.
(The buildbot will call it with "master...".)
2017-06-05 02:19:08 +02:00
Sepalani 83489e2766 lint: Check for newline at EOF 2017-05-08 19:20:42 +01:00
Léo Lam 1fe31f6f19 Tools: Fix the lint script
It turns out that last fix was only partial, and it didn't fix the
issue completely as paths were fixed, but staged changes were not
in the list. This should fix it for real, this time. Sorry about that…

(git diff needs --cached to include staged changes, unlike git status.)
2016-08-11 21:11:17 +02:00
Léo Lam cbb77532c6 Tools: Fix lint by removing unneeded awk
git diff --name-only already took care of only returning the name, so
the awk is unneeded and makes it return only empty file names.

Facepalm, I know. Sorry for this oversight.

(Also fixes something that lint didn't catch because of this)
2016-08-02 22:00:41 +02:00
Léo Lam 671c0bc06f Tools: Don't run lint on deleted files
Generates a harmless "No such file or directory" otherwise when a file
is removed in a commit.
2016-07-26 00:51:10 +02:00
Pierre Bourdon 8a1bbaa563 lint: bash is hard, actually return errors 2016-06-24 14:27:35 +02:00
Pierre Bourdon 3af8f71472 linter: run clang-format and fail on diffs 2016-06-24 13:23:10 +02:00
Pierre Bourdon e1c65406dc linter: Stop checking for include ordering (inconsistent with clang-format) 2016-06-24 13:14:41 +02:00
Pierre Bourdon 15ad14a9dc Add linter script which will replace the ad-hoc commands ran by the linter Buildbot. 2015-10-31 18:43:37 +01:00