aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/coccinelle
AgeCommit message (Expand)AuthorFilesLines
2024-02-12use xstrncmpz()René Scharfe1-0/+28
2023-06-28config: pass kvi to die_bad_number()Glen Choo1-0/+27
2023-06-28config: add ctx arg to config_fn_tGlen Choo1-0/+144
2023-06-13Merge branch 'gc/doc-cocci-updates'Junio C Hamano1-4/+36
2023-04-27cocci: codify authoring and reviewing practicesGlen Choo1-0/+30
2023-04-27cocci: add headings to and reword READMEGlen Choo1-4/+6
2023-04-20cocci: remove 'unused.cocci'SZEDER Gábor3-170/+0
2023-03-28cocci: apply the "revision.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-14/+4
2023-03-28cocci: apply the "rerere.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-4/+4
2023-03-28cocci: apply the "refs.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-4/+4
2023-03-28cocci: apply the "promisor-remote.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-10/+10
2023-03-28cocci: apply the "packfile.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-4/+4
2023-03-28cocci: apply the "pretty.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-4/+4
2023-03-28cocci: apply the "object-store.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-10/+10
2023-03-28cocci: apply the "diff.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-4/+4
2023-03-28cocci: apply the "commit.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-19/+19
2023-03-28cocci: apply the "commit-reach.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-16/+16
2023-03-28cocci: apply the "cache.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason2-37/+44
2023-03-28cocci: add missing "the_repository" macros to "pending"Ævar Arnfjörð Bjarmason1-0/+70
2023-03-28cocci: sort "the_repository" rules by headerÆvar Arnfjörð Bjarmason1-15/+19
2023-03-28cocci: fix incorrect & verbose "the_repository" rulesÆvar Arnfjörð Bjarmason1-114/+46
2023-03-28cocci: remove dead rule from "the_repository.pending.cocci"Ævar Arnfjörð Bjarmason1-8/+0
2023-02-10cocci & cache.h: remove "USE_THE_INDEX_COMPATIBILITY_MACROS"Ævar Arnfjörð Bjarmason2-21/+6
2023-02-10cache-tree API: remove redundant update_main_cache_tree()Ævar Arnfjörð Bjarmason1-0/+3
2023-02-10cocci & cache-tree.h: migrate "write_cache_as_tree" to "*_index_*"Ævar Arnfjörð Bjarmason1-0/+11
2023-02-10cocci & cache.h: apply pending "index_cache_pos" ruleÆvar Arnfjörð Bjarmason2-3/+3
2023-02-10cocci & cache.h: fully apply "active_nr" part of index-compatibilityÆvar Arnfjörð Bjarmason1-9/+4
2023-01-09use DUP_ARRAYRené Scharfe1-0/+7
2022-12-01Merge branch 'ab/fewer-the-index-macros'Junio C Hamano1-4/+8
2022-12-01cocci: avoid "should ... be a metavariable" warningsÆvar Arnfjörð Bjarmason1-4/+8
2022-11-28Merge branch 'ab/fewer-the-index-macros'Junio C Hamano2-0/+159
2022-11-21cocci: apply "pending" index-compatibility to some "builtin/*.c"Ævar Arnfjörð Bjarmason2-54/+53
2022-11-21cocci & cache.h: apply variable section of "pending" index-compatibilityÆvar Arnfjörð Bjarmason2-17/+22
2022-11-21cocci & cache.h: apply a selection of "pending" index-compatibilityÆvar Arnfjörð Bjarmason2-15/+15
2022-11-21cocci: add a index-compatibility.pending.cocciÆvar Arnfjörð Bjarmason1-0/+110
2022-11-21cocci & cache.h: remove rarely used "the_index" compat macrosÆvar Arnfjörð Bjarmason1-0/+45
2022-11-02spatchcache: add a ccache-alike for "spatch"Ævar Arnfjörð Bjarmason2-0/+324
2022-11-02cocci: run against a generated ALL.cocciÆvar Arnfjörð Bjarmason1-0/+13
2022-11-02cocci rules: remove <id>'s from rules that don't need themÆvar Arnfjörð Bjarmason4-4/+4
2022-11-02cocci: optimistically use COMPUTE_HEADER_DEPENDENCIESÆvar Arnfjörð Bjarmason1-0/+16
2022-11-02cocci: make "coccicheck" rule incrementalÆvar Arnfjörð Bjarmason1-1/+1
2022-11-02cocci rules: remove unused "F" metavariable from pending ruleÆvar Arnfjörð Bjarmason1-1/+0
2022-07-19Merge branch 'rs/cocci-array-copy'Junio C Hamano1-42/+40
2022-07-10cocci: avoid normalization rules for memcpyRené Scharfe1-42/+40
2022-07-06cocci: generalize "unused" rule to cover more than "strbuf"Ævar Arnfjörð Bjarmason3-4/+57
2022-07-06cocci: add and apply a rule to find "unused" strbufsÆvar Arnfjörð Bjarmason3-0/+117
2022-07-06cocci: add a "coccicheck-test" target and test *.cocci rulesÆvar Arnfjörð Bjarmason2-0/+20
2022-06-17Merge branch 'jc/cocci-cleanup'Junio C Hamano1-12/+0
2022-06-07cocci: retire is_null_sha1() ruleJunio C Hamano1-12/+0
2022-06-07Merge branch 'ab/plug-leak-in-revisions'Junio C Hamano1-0/+27
2022-05-20Merge branch 'ep/maint-equals-null-cocci'Junio C Hamano1-0/+30
2022-05-10Merge branch 'ab/misc-cleanup'Junio C Hamano1-15/+0
2022-05-02contrib/coccinnelle: add equals-null.cocciElia Pinto1-0/+30
2022-04-30cocci: drop bogus xstrdup_or_null() ruleJunio C Hamano1-8/+0
2022-04-13cocci: add and apply free_commit_list() rulesÆvar Arnfjörð Bjarmason1-0/+27
2022-04-01object-store.h: remove unused has_sha1_file*()Ævar Arnfjörð Bjarmason1-15/+0
2022-03-23cocci: allow padding with `strbuf_addf()`Johannes Schindelin1-3/+3
2021-09-10index-pack: use xopen in init_threadRené Scharfe1-5/+8
2021-08-25use xopen() to handle fatal open(2) failuresRené Scharfe1-0/+16
2021-03-19Merge branch 'rs/xcalloc-takes-nelem-first'Junio C Hamano1-0/+10
2021-03-15cocci: allow xcalloc(1, size)Junio C Hamano1-1/+1
2021-03-13use CALLOC_ARRAYRené Scharfe1-0/+8
2021-03-08fix xcalloc() argument orderRené Scharfe1-0/+10
2020-06-17commit: move members graph_pos, generation to a slabAbhishek Kumar1-0/+18
2019-12-01Merge branch 'jk/remove-sha1-to-hex'Junio C Hamano1-32/+0
2019-11-13hex: drop sha1_to_hex()Jeff King1-15/+0
2019-11-11hex: drop sha1_to_hex_r()Jeff King1-17/+0
2019-11-10Fix spelling errors in code commentsElijah Newren1-1/+1
2019-10-07coccicheck: detect hashmap_entry.hash assignmentEric Wong1-0/+16
2019-06-17coccinelle: use COPY_ARRAY for copying arraysRené Scharfe1-15/+46
2019-05-09Merge branch 'nd/sha1-name-c-wo-the-repository'Junio C Hamano1-7/+13
2019-04-16commit.c: add repo_get_commit_tree()Nguyễn Thái Ngọc Duy1-3/+3
2019-04-16commit.cocci: refactor code, avoid double rewriteNguyễn Thái Ngọc Duy1-7/+13
2019-04-04cocci: FLEX_ALLOC_MEM to FLEX_ALLOC_STRDenton Liu1-0/+13
2019-02-05Merge branch 'sg/strbuf-addbuf-cocci'Junio C Hamano1-0/+30
2019-02-05Merge branch 'sb/more-repo-in-api'Junio C Hamano1-0/+144
2019-01-27strbuf.cocci: suggest strbuf_addbuf() to add one strbuf to an otherSZEDER Gábor1-0/+30
2019-01-15cache: make oidcpy always copy GIT_MAX_RAWSZ bytesbrian m. carlson1-30/+0
2018-11-14pretty: prepare format_commit_message to handle arbitrary repositoriesStefan Beller1-0/+10
2018-11-14commit: prepare logmsg_reencode to handle arbitrary repositoriesStefan Beller1-0/+9
2018-11-14commit: prepare repo_unuse_commit_buffer to handle any repoStefan Beller1-0/+8
2018-11-14commit: prepare get_commit_buffer to handle any repoStefan Beller1-0/+8
2018-11-14commit-reach: prepare in_merge_bases[_many] to handle any repoStefan Beller1-0/+17
2018-11-14commit-reach: prepare get_merge_bases to handle any repoStefan Beller1-0/+26
2018-11-14commit: allow parse_commit* to handle any repoStefan Beller1-0/+24
2018-11-14object-store: prepare has_{sha1, object}_file to handle any repoStefan Beller1-0/+30
2018-11-14object-store: prepare read_object_file to deal with any repoStefan Beller1-0/+12
2018-11-14coccicheck: introduce 'pending' semantic patchesSZEDER Gábor1-0/+41
2018-10-30Merge branch 'jc/cocci-preincr'Junio C Hamano1-0/+5
2018-10-24cocci: simplify "if (++u > 1)" to "if (u++)"Junio C Hamano1-0/+5
2018-10-15object_id.cocci: match only expressions of type 'struct object_id'SZEDER Gábor1-54/+63
2018-08-29convert "hashcmp() != 0" to "!hasheq()"Jeff King1-0/+9
2018-08-29convert "oidcmp() != 0" to "!oideq()"Jeff King1-0/+6
2018-08-29convert "hashcmp() == 0" to hasheq()Jeff King1-0/+9
2018-08-29convert "oidcmp() == 0" to oideq()Jeff King1-0/+6
2018-08-29coccinelle: use <...> for function exclusionJeff King2-12/+12
2018-07-16coccinelle: update commit.cocciDerrick Stolee1-1/+1
2018-05-02coccinelle: avoid wrong transformation suggestions from commit.cocciSZEDER Gábor1-6/+4
2018-04-11treewide: replace maybe_tree with accessor methodsDerrick Stolee1-0/+30
2018-02-15Merge branch 'rs/cocci-strbuf-addf-to-addstr'Junio C Hamano1-16/+1
2018-02-02cocci: simplify check for trivial format stringsRené Scharfe1-16/+1
2018-01-19cocci: use format keyword instead of a literal stringRené Scharfe1-1/+2
2017-10-02coccinelle: remove parentheses that become unnecessaryRené Scharfe1-5/+5
2017-07-17add MOVE_ARRAYRené Scharfe1-0/+17
2017-06-29coccinelle: polish FREE_AND_NULL rulesRené Scharfe1-9/+1
2017-06-16coccinelle: add a rule to make "expression" code use FREE_AND_NULL()Ævar Arnfjörð Bjarmason1-0/+7
2017-06-16coccinelle: add a rule to make "type" code use FREE_AND_NULL()Ævar Arnfjörð Bjarmason1-0/+8
2017-03-10Merge branch 'rs/strbuf-add-real-path'Junio C Hamano2-0/+22
2017-02-27strbuf: add strbuf_add_real_path()René Scharfe1-0/+6
2017-02-27cocci: use ALLOC_ARRAYRené Scharfe1-0/+16
2017-02-16Merge branch 'rs/cocci-check-free-only-null'Junio C Hamano1-0/+6
2017-02-15Merge branch 'rs/swap'Junio C Hamano1-0/+28
2017-02-11cocci: detect useless free(3) callsRené Scharfe1-0/+6
2017-02-02Merge branch 'rs/absolute-pathdup'Junio C Hamano1-0/+6
2017-01-30add SWAP macroRené Scharfe1-0/+28
2017-01-26abspath: add absolute_pathdup()René Scharfe1-0/+6
2016-11-01Merge branch 'rs/cocci'Junio C Hamano1-0/+15
2016-11-01cocci: avoid self-references in object_id transformationsRené Scharfe1-0/+15
2016-10-28Merge branch 'jc/cocci-xstrdup-or-null' into maintJunio C Hamano1-0/+7
2016-10-28Merge branch 'rs/cocci' into maintJunio C Hamano4-6/+52
2016-10-26Merge branch 'jc/cocci-xstrdup-or-null'Junio C Hamano1-0/+7
2016-10-17Merge branch 'rs/cocci'Junio C Hamano1-0/+5
2016-10-12cocci: refactor common patterns to use xstrdup_or_null()Junio C Hamano1-0/+7
2016-10-10Merge branch 'rs/qsort'Junio C Hamano1-0/+37
2016-10-10remove unnecessary NULL check before free(3)René Scharfe1-0/+5
2016-10-06Merge branch 'rs/cocci'Junio C Hamano2-1/+37
2016-10-03Merge branch 'rs/copy-array'Junio C Hamano1-0/+26
2016-10-03coccicheck: make transformation for strbuf_addf(sb, "...") more preciseRené Scharfe1-3/+26
2016-09-29remove unnecessary check before QSORTRené Scharfe1-0/+18
2016-09-29add QSORTRené Scharfe1-0/+19
2016-09-27use strbuf_add_unique_abbrev() for adding short hashes, part 2René Scharfe1-0/+6
2016-09-27use strbuf_addstr() instead of strbuf_addf() with "%s", part 2René Scharfe1-0/+6
2016-09-27gitignore: ignore output files of coccicheck make targetRené Scharfe1-0/+1
2016-09-25use COPY_ARRAYRené Scharfe1-0/+26
2016-09-15use strbuf_addstr() for adding constant strings to a strbuf, part 2René Scharfe1-0/+5
2016-09-15contrib/coccinelle: fix semantic patch for oid_to_hex_r()René Scharfe1-6/+6
2016-06-28contrib/coccinelle: add basic Coccinelle transformsbrian m. carlson2-0/+97