apply Codenarc rules

Hi,

I plan on making more PRs for this plugin, but to start with I added codenarc checking to the build. I tried to remain true to the original coding style, so no big surprises here I hope.