GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Home
  • Downloads
  • GitHub Project
  • Javadoc
  • Ant Task
  • Command-Line
  • Docker
  • Run as a Test
  • Other Tools/Frameworks
  • Creating a RuleSet
  • Creating a Rule
  • Configuring Rules
  • Config for Grails, Spock, etc.
  • Starter RuleSet (All)

This view

  • Original page
  • New address

GeezerVison is showing codenarc.org — CodeNarc

CodeNarc Fork me on GitHub

General

  • Home
  • Downloads
  • GitHub Project
  • Javadoc

Running

  • Ant Task
  • Command-Line [Docker]
  • Run as a Test
  • Other Tools/Frameworks

Using

  • Creating a RuleSet
  • Creating a Rule
  • Configuring Rules
  • Config for Grails, Spock, etc.
  • Starter RuleSet (All)

Report Types

  • HTML Report [SAMPLE]
  • Sortable HTML [SAMPLE]
  • XML Report [SAMPLE]
  • JSON Report [SAMPLE]
  • Text/IDE/Compact Reports [SAMPLE]
  • GitLab Code Quality Report [SAMPLE]
  • SARIF Report [SAMPLE]
  • Baseline Report

Rules

  • Rule Index [By Name]
  • Basic Rules
  • Braces Rules
  • Comments Rules
  • Concurrency Rules
  • Convention Rules
  • Design Rules
  • DRY Rules
  • Enhanced Rules
  • Exceptions Rules
  • Formatting Rules
  • Generic Rules
  • Grails Rules
  • Groovyism Rules
  • Import Rules
  • JDBC Rules
  • JUnit Rules
  • Logging Rules
  • Naming Rules
  • Size/Complexity Rules
  • Security Rules
  • Serialization Rules
  • Unnecessary Rules
  • Unused Rules

Developing

  • Developer Guide

CodeNarc

Static Analysis for Groovy

CodeNarc analyzes Groovy code for defects, bad practices, inconsistencies, style issues and more. A flexible framework for rules, rulesets and custom rules means it’s easy to configure CodeNarc to fit into your project. Build tool, framework support, and report generation are all enterprise ready.

CodeNarc Rules

CodeNarc triggers violations based on rules. Click the links to the left to view the index of all rules, or individual rule categories (rulesets), such as the basic, or import rules. Or you can create your own ruleset; see how easy it is in this screencast.
Get 4.0.0
Release Notes

Running CodeNarc

Run CodeNarc with the Ant Task, the command-line runner, Docker, or as part of your test suite. Also, plugins exist for Maven, Gradle, Grails, SonarQube, Visual Studio Code, and Jenkins. See our Integration page for more details. Reports come in HTML, XML, or text format. Take a look at a Sample CodeNarc HTML Report, or a Sample CodeNarc XML Report.

Requirements

CodeNarc requires:
  • Java 17 or later for the default CodeNarc artifact (Groovy 5); Java 1.8 or later for the Groovy 4-compatible variant
  • Groovy 4.0 or later
  • SLF4J API and binding jar(s)
  • GMetrics 3.0.0 or later for CodeNarc 4.x.x; GMetrics-Groovy4 2.1.0 or later for CodeNarc 3.x.x, if using the Size/Complexity rules

Get it from Maven2

For projects built using Maven, CodeNarc is available from the Maven Central Repository
  • groupId = org.codenarc
  • artifactId = CodeNarc for the default (Groovy 5-compatible) artifact; CodeNarc-Groovy4 for the Groovy 4-compatible variant
  • version = 4.x.x (same version number for both artifactIds)

Inspirations

We're inspired by the wonderful PMD and Checkstyle Java static analysis tools, as well as the extensive Groovy inspections performed by IntelliJ IDEA.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.