Codenarc plugin rules are not running in guidewire studio

1.3k Views Asked by At

I am currently working on Guidewire Studio built on top of IntelliJ. I have installed the codenarc plugin into the studio but it seems like the rules of codenarc is not running for my codes. After analyzing the codes it does not give me any violation which i know, is there. Can someone please tell me what am i missing here.

2

There are 2 best solutions below

1
On BEST ANSWER

You probably can't, but there's a workaround.

Guidewire provides their customers with GosuCodeNarc which is basically CodeNarc extended with several gosu rules' implementations, possibly some glue code as well. If you are missing any rules they provide documentation on creating any new ones.

This isn't shipped as a plugin, but rather a set of jars with instruction how to run them as gradle task (intended to be run on CD/CI).

EDIT

There is a way if you are on v9 or v10!

The inspection plugin to studio was intensively developed and is most likely meant to replace GosuCodeNarc entirely. Most importantly it provides all the inspections within the GW Studio.

The only requirement is to be on GW Studio v1.14 or higher and to turn inspections of choice within the inspections settings (use quick search to find this one).

Starting from v9.0.5 there's also a gradle task meant for command line use, so feel free to give it a try with

gwb inspect

More on it in

gwb help --task :inspect

0
On

gwb inspect will not work on Windows because of Intellij issue IDEA-152045