Re: [cocci] [PATCH 01/11] coccinelle: Add script to reorder capable() calls
From: Markus Elfring
Date: Tue Nov 26 2024 - 07:56:14 EST
…
> +(
> +- F@p(EL) op E
> ++ E op F(EL)
> +|
> +- E1 op1 F@p(EL) op2 E2
> ++ E1 op1 E2 op2 F(EL)
> +)
How do you think about to use an SmPL code variant like the following?
(
E1 op1
-F@p(EL)
+E2
op2
-E2
+F(EL)
|
-F@p(EL) op
E
+op F(EL)
)
> +//----------------------------------------------------------
> +// For context mode
> +//----------------------------------------------------------
> +
> +@r1 depends on !patch exists@
…
I would prefer the dependency specification “context” for this SmPL rule.
The SmPL asterisk functionality should be better distinguished here.
…
> +@script:python depends on org@
> +p << r1.p;
> +@@
…
I got the impression that source code search approaches can be safely
shared only between the operation modes “org” and “report” so far.
Regards,
Markus