I have submitted a few PRs recently for code developed using NetBeans. I have configured NetBeans Code Sniffer to use what I think are the coding standards for CiviCRM. However, this produces lots of errors/observations regarding comments etc. that Jenkins, the system that checks coding standards in GitHub CiviCRM. The result is that it is very easy to miss those errors to which Jenkins objects. Does anyone know how to solve this?

  • Stephen - if the question is updated to include links to examples of coding standards checks that failed for your PR (ie, the Jenkins output you got), it might be easier to tell what config changes are required? Oct 12, 2016 at 1:47

1 Answer 1


what sort of code style errors are you coming up against? CiviCRM's code style is very similar to Drupal's code style. I found some information about setting up NetBeans on CiviCRM's wiki, here: https://wiki.civicrm.org/confluence/display/CRMDOC/IDE+Settings+to+Meet+Coding+Standards#IDESettingstoMeetCodingStandards-NetBeans

Hopefully these links provide the right answers. Otherwise let's update the wiki page!

  • Thanks for coming back to me. I followed, I believe, the instruction in John's comment above in setting up NetBeans. Basically, Jenkins complains about things like the tabulation of arrays, that else statements need to start on a new line etc. It ignores commenting errors. Oct 12, 2016 at 9:09
  • I was unable to edit this last comment as I ran out of time. Here it is again. Thanks for coming back to me. I followed, I believe, the instruction in John's comment above in setting up NetBeans. Basically, Jenkins appears to ignore Commenting, most WhiteSpace and Naming Conventions errors, whilst picking up on Array and ControlStructures. If NetBeans could ignore Commenting errors it would help greatly. Oct 12, 2016 at 9:20
  • Sorry, what do you mean by 'ignore commenting errors'? Speaking from personal experience Jenkins normally kicks out my PRs when I've got a whitespace wrong somewhere ;], so I'm not sure what yo mean by Jenkins ignoring whitespace errors? Would be great for us to update the documentation if there is something we can improve in the configuration though.
    – John
    Oct 14, 2016 at 8:51
  • NetBeans throws up lots of Commenting errors, all about defects in the comments associated with the code. Jenkins ignores them. [![Output from NetBeans code sniffer][1]][1] Jenkins also ignores the first WhiteSpace > OpenTagNewline I could only add images to the comment by being logged out. I could then get a preview, too. I then copied the comment, logged in and pasted it. [1]: i.stack.imgur.com/pY8w3.png Oct 15, 2016 at 14:43
  • And I can't see the image when logged in, but can when logged out in Edge. In Chrome I can't see it at all except by clicking on the link. Oct 15, 2016 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.