pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/gitgitgadget/git/commit/8ca1b4472ce97ae1d120608f9f02a86fa33d4187

f82350aeda.css" /> contrib: move "coccinelle/" directory into "tools/" · gitgitgadget/git@8ca1b44 · GitHub
Skip to content

Commit 8ca1b44

Browse files
pks-tgitster
authored andcommitted
contrib: move "coccinelle/" directory into "tools/"
The Coccinelle tool is an ingrained part of our build infrastructure. It is executed by our CI to detect antipatterns and is used to detect misuses of certain interfaces. It's presence in "contrib/" is thus rather misleading. Promote the configuration into the new "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8872941 commit 8ca1b44

30 files changed

+26
-26
lines changed

Makefile

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,8 @@ SPATCH_TEST_FLAGS =
10051005
# COMPUTE_HEADER_DEPENDENCIES=no this will be unset too.
10061006
SPATCH_USE_O_DEPENDENCIES = YesPlease
10071007

1008-
# Set SPATCH_CONCAT_COCCI to concatenate the contrib/cocci/*.cocci
1009-
# files into a single contrib/cocci/ALL.cocci before running
1008+
# Set SPATCH_CONCAT_COCCI to concatenate the tools/coccinelle/*.cocci
1009+
# files into a single tools/coccinelle/ALL.cocci before running
10101010
# "coccicheck".
10111011
#
10121012
# Pros:
@@ -1025,7 +1025,7 @@ SPATCH_USE_O_DEPENDENCIES = YesPlease
10251025
# generate a specific patch, e.g. this will always use strbuf.cocci,
10261026
# not ALL.cocci:
10271027
#
1028-
# make contrib/coccinelle/strbuf.cocci.patch
1028+
# make tools/coccinelle/strbuf.cocci.patch
10291029
SPATCH_CONCAT_COCCI = YesPlease
10301030

10311031
# Rebuild 'coccicheck' if $(SPATCH), its flags etc. change
@@ -3457,15 +3457,15 @@ check:
34573457
exit 1; \
34583458
fi
34593459

3460-
COCCI_GEN_ALL = .build/contrib/coccinelle/ALL.cocci
3461-
COCCI_GLOB = $(wildcard contrib/coccinelle/*.cocci)
3460+
COCCI_GEN_ALL = .build/tools/coccinelle/ALL.cocci
3461+
COCCI_GLOB = $(wildcard tools/coccinelle/*.cocci)
34623462
COCCI_RULES_TRACKED = $(COCCI_GLOB:%=.build/%)
34633463
COCCI_RULES_TRACKED_NO_PENDING = $(filter-out %.pending.cocci,$(COCCI_RULES_TRACKED))
34643464
COCCI_RULES =
34653465
COCCI_RULES += $(COCCI_GEN_ALL)
34663466
COCCI_RULES += $(COCCI_RULES_TRACKED)
34673467
COCCI_NAMES =
3468-
COCCI_NAMES += $(COCCI_RULES:.build/contrib/coccinelle/%.cocci=%)
3468+
COCCI_NAMES += $(COCCI_RULES:.build/tools/coccinelle/%.cocci=%)
34693469

34703470
COCCICHECK_PENDING = $(filter %.pending.cocci,$(COCCI_RULES))
34713471
COCCICHECK = $(filter-out $(COCCICHECK_PENDING),$(COCCI_RULES))
@@ -3480,20 +3480,20 @@ COCCICHECK_PATCHES_PENDING_INTREE = $(COCCICHECK_PATCHES_PENDING:.build/%=%)
34803480
# on $(MAKECMDGOALS) that match these $(COCCI_RULES)
34813481
COCCI_RULES_GLOB =
34823482
COCCI_RULES_GLOB += cocci%
3483-
COCCI_RULES_GLOB += .build/contrib/coccinelle/%
3483+
COCCI_RULES_GLOB += .build/tools/coccinelle/%
34843484
COCCI_RULES_GLOB += $(COCCICHECK_PATCHES)
34853485
COCCI_RULES_GLOB += $(COCCICHEC_PATCHES_PENDING)
34863486
COCCI_RULES_GLOB += $(COCCICHECK_PATCHES_INTREE)
34873487
COCCI_RULES_GLOB += $(COCCICHECK_PATCHES_PENDING_INTREE)
34883488
COCCI_GOALS = $(filter $(COCCI_RULES_GLOB),$(MAKECMDGOALS))
34893489

3490-
COCCI_TEST_RES = $(wildcard contrib/coccinelle/tests/*.res)
3490+
COCCI_TEST_RES = $(wildcard tools/coccinelle/tests/*.res)
34913491

34923492
$(COCCI_RULES_TRACKED): .build/% : %
34933493
$(call mkdir_p_parent_template)
34943494
$(QUIET_CP)cp $< $@
34953495

3496-
.build/contrib/coccinelle/FOUND_H_SOURCES: $(FOUND_H_SOURCES)
3496+
.build/tools/coccinelle/FOUND_H_SOURCES: $(FOUND_H_SOURCES)
34973497
$(call mkdir_p_parent_template)
34983498
$(QUIET_GEN) >$@
34993499

@@ -3507,12 +3507,12 @@ endif
35073507
define cocci-rule
35083508

35093509
## Rule for .build/$(1).patch/$(2); Params:
3510-
# $(1) = e.g. ".build/contrib/coccinelle/free.cocci"
3510+
# $(1) = e.g. ".build/tools/coccinelle/free.cocci"
35113511
# $(2) = e.g. "grep.c"
35123512
# $(3) = e.g. "grep.o"
3513-
COCCI_$(1:.build/contrib/coccinelle/%.cocci=%) += $(1).d/$(2).patch
3513+
COCCI_$(1:.build/tools/coccinelle/%.cocci=%) += $(1).d/$(2).patch
35143514
$(1).d/$(2).patch: GIT-SPATCH-DEFINES
3515-
$(1).d/$(2).patch: $(if $(and $(SPATCH_USE_O_DEPENDENCIES),$(wildcard $(3))),$(3),.build/contrib/coccinelle/FOUND_H_SOURCES)
3515+
$(1).d/$(2).patch: $(if $(and $(SPATCH_USE_O_DEPENDENCIES),$(wildcard $(3))),$(3),.build/tools/coccinelle/FOUND_H_SOURCES)
35163516
$(1).d/$(2).patch: $(1)
35173517
$(1).d/$(2).patch: $(1).d/%.patch : %
35183518
$$(call mkdir_p_parent_template)
@@ -3538,13 +3538,13 @@ endif
35383538

35393539
define spatch-rule
35403540

3541-
.build/contrib/coccinelle/$(1).cocci.patch: $$(COCCI_$(1))
3541+
.build/tools/coccinelle/$(1).cocci.patch: $$(COCCI_$(1))
35423542
$$(QUIET_SPATCH_CAT)cat $$^ >$$@ && \
35433543
if test -s $$@; \
35443544
then \
35453545
echo ' ' SPATCH result: $$@; \
35463546
fi
3547-
contrib/coccinelle/$(1).cocci.patch: .build/contrib/coccinelle/$(1).cocci.patch
3547+
tools/coccinelle/$(1).cocci.patch: .build/tools/coccinelle/$(1).cocci.patch
35483548
$$(QUIET_CP)cp $$< $$@
35493549

35503550
endef
@@ -3558,9 +3558,9 @@ $(COCCI_TEST_RES_GEN): GIT-SPATCH-DEFINES
35583558
$(COCCI_TEST_RES_GEN): .build/%.res : %.c
35593559
$(COCCI_TEST_RES_GEN): .build/%.res : %.res
35603560
ifdef SPATCH_CONCAT_COCCI
3561-
$(COCCI_TEST_RES_GEN): .build/contrib/coccinelle/tests/%.res : $(COCCI_GEN_ALL)
3561+
$(COCCI_TEST_RES_GEN): .build/tools/coccinelle/tests/%.res : $(COCCI_GEN_ALL)
35623562
else
3563-
$(COCCI_TEST_RES_GEN): .build/contrib/coccinelle/tests/%.res : contrib/coccinelle/%.cocci
3563+
$(COCCI_TEST_RES_GEN): .build/tools/coccinelle/tests/%.res : tools/coccinelle/%.cocci
35643564
endif
35653565
$(call mkdir_p_parent_template)
35663566
$(QUIET_SPATCH_TEST)$(SPATCH) $(SPATCH_TEST_FLAGS) \
@@ -3576,14 +3576,14 @@ coccicheck-test: $(COCCI_TEST_RES_GEN)
35763576
coccicheck: coccicheck-test
35773577

35783578
ifdef SPATCH_CONCAT_COCCI
3579-
COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = contrib/coccinelle/ALL.cocci.patch
3579+
COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = tools/coccinelle/ALL.cocci.patch
35803580
else
35813581
COCCICHECK_PATCH_MUST_BE_EMPTY_FILES = $(COCCICHECK_PATCHES_INTREE)
35823582
endif
35833583
coccicheck: $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES)
35843584
! grep ^ $(COCCICHECK_PATCH_MUST_BE_EMPTY_FILES) /dev/null
35853585

3586-
# See contrib/coccinelle/README
3586+
# See tools/coccinelle/README
35873587
coccicheck-pending: coccicheck-test
35883588
coccicheck-pending: $(COCCICHECK_PATCHES_PENDING_INTREE)
35893589

@@ -3857,8 +3857,8 @@ profile-clean:
38573857

38583858
cocciclean:
38593859
$(RM) GIT-SPATCH-DEFINES
3860-
$(RM) -r .build/contrib/coccinelle
3861-
$(RM) contrib/coccinelle/*.cocci.patch
3860+
$(RM) -r .build/tools/coccinelle
3861+
$(RM) tools/coccinelle/*.cocci.patch
38623862

38633863
clean: profile-clean coverage-clean cocciclean
38643864
$(RM) -r .build $(UNIT_TEST_BIN)

ci/run-static-analysis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ make coccicheck
1010
set +x
1111

1212
fail=
13-
for cocci_patch in contrib/coccinelle/*.patch
13+
for cocci_patch in tools/coccinelle/*.patch
1414
do
1515
if test -s "$cocci_patch"
1616
then

contrib/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ foreach feature : get_option('contrib')
22
subdir(feature)
33
endforeach
44

5-
subdir('coccinelle')
65
subdir('credential')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ that might be useful to developers.
3838
So to aid these large scale refactorings, semantic patches can be used.
3939
However we do not want to store them in the same place as the checks for
4040
bad patterns, as then automated builds would fail.
41-
That is why semantic patches 'contrib/coccinelle/*.pending.cocci'
41+
That is why semantic patches 'tools/coccinelle/*.pending.cocci'
4242
are ignored for checks, and can be applied using 'make coccicheck-pending'.
4343

4444
This allows to expose plans of pending large scale refactorings without
File renamed without changes.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy