But if you stay away from farmers markets, as you are advising, then you will miss the guy selling out of the back of his old pickup truck most of the time.  
Use your head at farmers markets.  If you are buying "local" cucumbers in February from the farmers markets you should know that they aren't local.  As for buying produce that is rotten one has to use their noses and eyesight to avoid those bushels or baskets or quarts just as you do at the grocery store.  
I know a few farmers who grow their own for farmers markets but they may have had a bad week or theirs isn't ready yet so they buy from other local farmers so they don't lose their spots at the markets and have something to sell.  I don't have an issue with that.  Do you?