I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code. Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards. I've installed PHP Code Sniffer and the Drupal standard from Coder - see https://www.drupal.org/node/1420008, but even when applied to 'vanilla' CiviCRM code throws a number of standards violations, particularly around the way comments are entered. Has anyone got any comments/thoughts?
Using the Drupal standards in your IDE ought to get you most of the way. For fine-tuning you can see https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation and also try out the
civilint cli tool which is shipped with buildkit.
For IDE purposes, look at https://github.com/civicrm/coder/
This is a fork of drupal/coder which relaxes a number of conditions. (The coding practices in Civi differed from Drupal in some non-cosmetic ways -- changing them would break functional backward-compatibility.)
This is the same rule-set used by
civilint, which is the script that runs the
civicrm.org test bot (Github/Jenkins).