I use a brush in a rod that I use with my hand-held drill and, after spraying the barrel with some carb/brake cleaner, run the brush down and back several times to get it clean, then follow with patches. What they don't want you doing, like with rifles, is reversing the stroke while still inside the barrel. Brushes are cheap and they wear out. Push it all the way through, then pull it back. If you need more than that, do it again. I've even wrapped a patch around the brush and soaked it with Shooter's Choice and run it after the initial passes. No issues.
That being said, if you have a gas gun, then you want to make sure you gently clean out your gas ports so you don't pull some gunk back into them and clog them.