Open directionless opened 1 year ago
I think this really means pushing the dataflatten stuff to use tablehelpers.Exec
I think this had been blocked on adding WithUid
functionality to our exec helper, and that's present now. 🎉
If I understand correctly, the issue suggests that we lint using forbigo to ensure that code with in the /ee/tables
dir only uses tableHelpers.Exec
instead of directly calling Run
on commands from allowedcmd
. Currently golantci-lint does not support applying specific rules to specific paths in a folder. So far the only solution I have found would involve a second execution of golangci-lint that points to a different config that would only run on this specific path. I'm not sure that is worth the overhead.
We should evaulate it in other places. Either exclude, or move to the helper, depending
We have a couple places we create tables by parsing the output from execs. These should all use our helper. This achieves several goals:
We should:
cmd.Run
invocations and replace them withtablehelpers.Exec
(there may be some exceptions.execwrapper
and build generators for example)forbidigo
rule to lint for them