I've let a call to dpm() slip into my commits a few times. I once saw a contributed module release that contained one. Obviously that's bad since debugging functions will needlessly consume resources and potentially leak information on a live site if Devel is installed and will cause a fatal PHP error if it isn't. Maybe Coder could check for the presence of such function calls. I know Devel provides at least these:

  • dargs()
  • dcp()
  • dd()
  • dfb()
  • dfbt()
  • dpm()
  • dpq()
  • dpr()
  • dprint_r()
  • drupal_debug()
  • dsm()
  • dvm()
  • dvr()
  • kdevel_print_object()
  • kpr()
  • kprint_r()
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TravisCarden’s picture

Component: Coder Review » Coder Sniffer
Issue summary: View changes
dstol’s picture

Status: Active » Needs review
FileSize
2.14 KB
TravisCarden’s picture

Thanks, @dstol! That works great. Here's an updated version of the patch that observes the standards laid out in the contribution guidelines.

klausi’s picture

Status: Needs review » Fixed

Commited, thanks! http://drupalcode.org/project/coder.git/commit/2446cdc

Ugly that we have to implement a class and cannot specify this from ruleset.xml.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.