> HI > > > > Let's use single quotes instead of variable. > > > > > > Using the script directly with single quotes loses the ability to reuse > it > > with an additional set of folders , expressions and RET_ON_FAIL. > > I don't know awk. Please could you explain what we are loosing and why? > The awk script was written with intention to be called with future optional various folders and banned expressions. The optional reuse takes place inside the function check_forbidden_additions( ) with different instances passed to the awk script that is loaded using the apparently unfriendly -d. (currently only rte_panic) If we move the parameters to the outer function, i.e check_forbidden_additions( params ...) then there is no problem calling the awk script with single quotes
> > > If we wish to keep the awk code in this file and not in a separate file, > > maybe receiving the awk script parameters from the function > > check_forbidden_additions( ) can also preserve the ability to reuse in > > future cases. > > Yes I feel we could add some parameters to this function. > And yes, we could move the awk script in a separate file. > Actually, it would be better to keep checkpatches.sh as a wrapper script > calling various tools. > I was under the wrong impression the opposite was desired, so yes, moving the entire awk code to a separate file would indeed be the cleanest. thanks /Arnon