1

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.

Bastien Jansen
  • 8,756
  • 2
  • 35
  • 53
pradyumn
  • 130
  • 13

2 Answers2

2

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

hakamairi
  • 4,464
  • 4
  • 30
  • 53
  • I created a plugin on top of codenarc which has rules and logic for Gosu and is working fine on V9. But you were right about the problem. The rules which are embedded in the studio are less and i wanted to have more customs rules for code standard checking. Thnks :) – pradyumn Jan 24 '19 at 14:39
2

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

Aruna
  • 76
  • 3