gofed / go-macros

Rpm mechanics for Go packaging
4 stars 7 forks source link

golist should treat all filles under all variations of testdata as data #20

Closed nim-nim closed 5 years ago

nim-nim commented 6 years ago

testdata in all its forms is the accepted Go way to ship data, not code. When there is something like code in it it is usually very broken code to test breakage detection

So, golist should never attempt to parse or execute this what looks like go code under testdata, it will only result in panics and broken dependencies

ingvagabund commented 6 years ago

We need to specify a blacklist for all the cases and pass it to the golist instead of having golist do that for us. So let's defined a %godirblacklist as:

%godirblacklist -r /testdata -r /testsdata ...

and then run the golist in all casese as golist ... %{godirblacklist} .... The same for examples.

@nim-nim wdyt?

nim-nim commented 6 years ago

well, it may make sense for examples, as their name can vary a lot, but testdata is really a core language feature at this point

nim-nim commented 5 years ago

I think we fixed this