Use Coccinelle's "depends on" directive to exclude files from certain transformations. This should make them a bit simpler and possibly faster, since we don't have to shell out to Python. Unfortunately, this works only for file/directory exclusions. For function and other more complex exclusions we still need to use Python, at least for now. Also, completely drop the file exclusion for man/ in the xsprintf transformation, since we filter out everything under man/ before we even run Coccinelle (in run-coccinelle.sh).
8 lines
205 B
Plaintext
8 lines
205 B
Plaintext
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/* We want to stick with dup() in test-fd-util.c */
|
|
@ depends on !(file in "src/test/test-fd-util.c") @
|
|
expression fd;
|
|
@@
|
|
- dup(fd)
|
|
+ fcntl(fd, F_DUPFD, 3)
|