mirror of
https://github.com/git/git.git
synced 2024-10-30 22:07:53 +01:00
add DEVELOPER makefile knob to check for acknowledged warnings
We assume Git developers have a reasonably modern compiler and recommend them to enable the DEVELOPER makefile knob to ensure their patches are clear of all compiler warnings the Git core project cares about. Enable the DEVELOPER makefile knob in the Travis-CI build. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
48c39e98c6
commit
658df95a4a
3 changed files with 18 additions and 1 deletions
|
@ -21,12 +21,12 @@ addons:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
- DEVELOPER=1
|
||||||
- P4_VERSION="15.2"
|
- P4_VERSION="15.2"
|
||||||
- GIT_LFS_VERSION="1.1.0"
|
- GIT_LFS_VERSION="1.1.0"
|
||||||
- DEFAULT_TEST_TARGET=prove
|
- DEFAULT_TEST_TARGET=prove
|
||||||
- GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
|
- GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
|
||||||
- GIT_TEST_OPTS="--verbose --tee"
|
- GIT_TEST_OPTS="--verbose --tee"
|
||||||
- CFLAGS="-g -O2 -Wall -Werror"
|
|
||||||
- GIT_TEST_CLONE_2GB=YesPlease
|
- GIT_TEST_CLONE_2GB=YesPlease
|
||||||
# t9810 occasionally fails on Travis CI OS X
|
# t9810 occasionally fails on Travis CI OS X
|
||||||
# t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
|
# t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
|
||||||
|
|
|
@ -171,6 +171,11 @@ For C programs:
|
||||||
|
|
||||||
- We try to keep to at most 80 characters per line.
|
- We try to keep to at most 80 characters per line.
|
||||||
|
|
||||||
|
- As a Git developer we assume you have a reasonably modern compiler
|
||||||
|
and we recommend you to enable the DEVELOPER makefile knob to
|
||||||
|
ensure your patch is clear of all compiler warnings we care about,
|
||||||
|
by e.g. "echo DEVELOPER=1 >>config.mak".
|
||||||
|
|
||||||
- We try to support a wide range of C compilers to compile Git with,
|
- We try to support a wide range of C compilers to compile Git with,
|
||||||
including old ones. That means that you should not use C99
|
including old ones. That means that you should not use C99
|
||||||
initializers, even if a lot of compilers grok it.
|
initializers, even if a lot of compilers grok it.
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -380,6 +380,18 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||||
ALL_LDFLAGS = $(LDFLAGS)
|
ALL_LDFLAGS = $(LDFLAGS)
|
||||||
STRIP ?= strip
|
STRIP ?= strip
|
||||||
|
|
||||||
|
ifdef DEVELOPER
|
||||||
|
CFLAGS += -Werror \
|
||||||
|
-Wdeclaration-after-statement \
|
||||||
|
-Wno-format-zero-length \
|
||||||
|
-Wold-style-definition \
|
||||||
|
-Woverflow \
|
||||||
|
-Wpointer-arith \
|
||||||
|
-Wstrict-prototypes \
|
||||||
|
-Wunused \
|
||||||
|
-Wvla
|
||||||
|
endif
|
||||||
|
|
||||||
# Create as necessary, replace existing, make ranlib unneeded.
|
# Create as necessary, replace existing, make ranlib unneeded.
|
||||||
ARFLAGS = rcs
|
ARFLAGS = rcs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue