GroovyLint configuration
Rules to apply with npm-groovy-lint tool
| Type | object |
|---|---|
| File match |
.groovylintrc.json
.groovylintrc.js
.groovylintrc.cjs
.groovylintrc.yml
.groovylintrc.yaml
.groovylintrc
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/groovylint-configuration/latest.json |
| Source | https://raw.githubusercontent.com/nvuillam/npm-groovy-lint/refs/heads/main/docs/groovy-lint.jsonschema.json |
Validate with Lintel
npx @lintel/lintel check
Schema describing the .groovylintrc.json format
Properties
Name of a base configuration bundled with npm-groovy-lint.
Overrides for CodeNarc rules (string severity or advanced object).
783 nested properties
Assert Within Finally Block
Assert Within Finally Block
Assignment In Conditional
Assignment In Conditional
Big Decimal Instantiation
Big Decimal Instantiation
Bitwise Operator In Conditional
Bitwise Operator In Conditional
Boolean Get Boolean
Boolean Get Boolean
Broken Null Check
Broken Null Check
Broken Oddness Check
Broken Oddness Check
Class For Name
Class For Name
Comparison Of Two Constants
Comparison Of Two Constants
Comparison With Self
Comparison With Self
Constant Assert Expression
Constant Assert Expression
Constant If Expression
Constant If Expression
Constant Ternary Expression
Constant Ternary Expression
Dead Code
Dead Code
Double Negative
Double Negative
Duplicate Case Statement
Duplicate Case Statement
Duplicate Map Key
Duplicate Map Key
Duplicate Set Value
Duplicate Set Value
Empty Catch Block
Empty Catch Block
Empty Class
Empty Class
Empty Else Block
Empty Else Block
Empty Finally Block
Empty Finally Block
Empty For Statement
Empty For Statement
Empty If Statement
Empty If Statement
Empty Instance Initializer
Empty Instance Initializer
Empty Method
Empty Method
Empty Static Initializer
Empty Static Initializer
Empty Switch Statement
Empty Switch Statement
Empty Synchronized Statement
Empty Synchronized Statement
Empty Try Block
Empty Try Block
Empty While Statement
Empty While Statement
Equals And Hash Code
Equals And Hash Code
Equals Overloaded
Equals Overloaded
Explicit Garbage Collection
Explicit Garbage Collection
For Loop Should Be While Loop
For Loop Should Be While Loop
Hard Coded Windows File Separator
Hard Coded Windows File Separator
Hard Coded Windows Root Directory
Hard Coded Windows Root Directory
Integer Get Integer
Integer Get Integer
Multiple Unary Operators
Multiple Unary Operators
Parameter Assignment In Filter Closure
Parameter Assignment In Filter Closure
Random Double Coerced To Zero
Random Double Coerced To Zero
Remove All On Self
Remove All On Self
Return From Finally Block
Return From Finally Block
Throw Exception From Finally Block
Throw Exception From Finally Block
Else Block Braces
Else Block Braces
For Statement Braces
For Statement Braces
If Statement Braces
If Statement Braces
While Statement Braces
While Statement Braces
Class Javadoc
Class Javadoc
Javadoc Consecutive Empty Lines
Javadoc Consecutive Empty Lines
Javadoc Empty Author Tag
Javadoc Empty Author Tag
Javadoc Empty Exception Tag
Javadoc Empty Exception Tag
Javadoc Empty First Line
Javadoc Empty First Line
Javadoc Empty Last Line
Javadoc Empty Last Line
Javadoc Empty Param Tag
Javadoc Empty Param Tag
Javadoc Empty Return Tag
Javadoc Empty Return Tag
Javadoc Empty See Tag
Javadoc Empty See Tag
Javadoc Empty Since Tag
Javadoc Empty Since Tag
Javadoc Empty Throws Tag
Javadoc Empty Throws Tag
Javadoc Empty Version Tag
Javadoc Empty Version Tag
Javadoc Missing Exception Description
Javadoc Missing Exception Description
Javadoc Missing Param Description
Javadoc Missing Param Description
Javadoc Missing Throws Description
Javadoc Missing Throws Description
Busy Wait
Busy Wait
Double Checked Locking
Double Checked Locking
Inconsistent Property Locking
Inconsistent Property Locking
Inconsistent Property Synchronization
Inconsistent Property Synchronization
Nested Synchronization
Nested Synchronization
Static Calendar Field
Static Calendar Field
Static Connection
Static Connection
Static Date Format Field
Static Date Format Field
Static Matcher Field
Static Matcher Field
Static Simple Date Format Field
Static Simple Date Format Field
Synchronized Method
Synchronized Method
Synchronized On Boxed Primitive
Synchronized On Boxed Primitive
Synchronized On Get Class
Synchronized On Get Class
Synchronized On Reentrant Lock
Synchronized On Reentrant Lock
Synchronized On String
Synchronized On String
Synchronized On This
Synchronized On This
Synchronized Read Object Method
Synchronized Read Object Method
System Run Finalizers On Exit
System Run Finalizers On Exit
This Reference Escapes Constructor
This Reference Escapes Constructor
Thread Group
Thread Group
Thread Local Not Static Final
Thread Local Not Static Final
Thread Yield
Thread Yield
Use Of Notify Method
Use Of Notify Method
Volatile Array Field
Volatile Array Field
Volatile Long Or Double Field
Volatile Long Or Double Field
Wait Outside Of While Loop
Wait Outside Of While Loop
Compile Static
Compile Static
Confusing Ternary
Confusing Ternary
Could Be Elvis
Could Be Elvis
Could Be Switch Statement
Could Be Switch Statement
Field Type Required
Field Type Required
Hashtable Is Obsolete
Hashtable Is Obsolete
If Statement Could Be Ternary
If Statement Could Be Ternary
Implicit Closure Parameter
Implicit Closure Parameter
Implicit Return Statement
Implicit Return Statement
Inverted Condition
Inverted Condition
Inverted If Else
Inverted If Else
Long Literal With Lower Case L
Long Literal With Lower Case L
Method Parameter Type Required
Method Parameter Type Required
Method Return Type Required
Method Return Type Required
No Def
No Def
No Double
No Double
No Float
No Float
No Java Util Date
No Java Util Date
No Tab Character
No Tab Character
Parameter Reassignment
Parameter Reassignment
Public Methods Before Non Public Methods
Public Methods Before Non Public Methods
Static Fields Before Instance Fields
Static Fields Before Instance Fields
Static Methods Before Instance Methods
Static Methods Before Instance Methods
Ternary Could Be Elvis
Ternary Could Be Elvis
Trailing Comma
Trailing Comma
Variable Type Required
Variable Type Required
Vector Is Obsolete
Vector Is Obsolete
Abstract Class With Public Constructor
Abstract Class With Public Constructor
Abstract Class Without Abstract Method
Abstract Class Without Abstract Method
Assignment To Static Field From Instance Method
Assignment To Static Field From Instance Method
Boolean Method Returns Null
Boolean Method Returns Null
Builder Method With Side Effects
Builder Method With Side Effects
Cloneable Without Clone
Cloneable Without Clone
Close Without Closeable
Close Without Closeable
Compare To Without Comparable
Compare To Without Comparable
Constants Only Interface
Constants Only Interface
Empty Method In Abstract Class
Empty Method In Abstract Class
Final Class With Protected Member
Final Class With Protected Member
Implementation As Type
Implementation As Type
Instanceof
Instanceof
Locale Set Default
Locale Set Default
Nested For Loop
Nested For Loop
Optional Collection Return Type
Optional Collection Return Type
Optional Field
Optional Field
Optional Method Parameter
Optional Method Parameter
Private Field Could Be Final
Private Field Could Be Final
Public Instance Field
Public Instance Field
Returns Null Instead Of Empty Array
Returns Null Instead Of Empty Array
Returns Null Instead Of Empty Collection
Returns Null Instead Of Empty Collection
Simple Date Format Missing Locale
Simple Date Format Missing Locale
Stateless Singleton
Stateless Singleton
To String Returns Null
To String Returns Null
Duplicate List Literal
Duplicate List Literal
Duplicate Map Literal
Duplicate Map Literal
Duplicate Number Literal
Duplicate Number Literal
Duplicate String Literal
Duplicate String Literal
Clone Without Cloneable
Clone Without Cloneable
J Unit Assert Equals Constant Actual Value
J Unit Assert Equals Constant Actual Value
Missing Override Annotation
Missing Override Annotation
Unsafe Implementation As Map
Unsafe Implementation As Map
Catch Array Index Out Of Bounds Exception
Catch Array Index Out Of Bounds Exception
Catch Error
Catch Error
Catch Exception
Catch Exception
Catch Illegal Monitor State Exception
Catch Illegal Monitor State Exception
Catch Index Out Of Bounds Exception
Catch Index Out Of Bounds Exception
Catch Null Pointer Exception
Catch Null Pointer Exception
Catch Runtime Exception
Catch Runtime Exception
Catch Throwable
Catch Throwable
Confusing Class Named Exception
Confusing Class Named Exception
Exception Extends Error
Exception Extends Error
Exception Extends Throwable
Exception Extends Throwable
Exception Not Thrown
Exception Not Thrown
Missing New In Throw Statement
Missing New In Throw Statement
Return Null From Catch Block
Return Null From Catch Block
Swallow Thread Death
Swallow Thread Death
Throw Error
Throw Error
Throw Exception
Throw Exception
Throw Null Pointer Exception
Throw Null Pointer Exception
Throw Runtime Exception
Throw Runtime Exception
Throw Throwable
Throw Throwable
Blank Line Before Package
Blank Line Before Package
Block Ends With Blank Line
Block Ends With Blank Line
Block Starts With Blank Line
Block Starts With Blank Line
Braces For Class
Braces For Class
Braces For For Loop
Braces For For Loop
Braces For If Else
Braces For If Else
Braces For Method
Braces For Method
Braces For Try Catch Finally
Braces For Try Catch Finally
Class Ends With Blank Line
Class Ends With Blank Line
Class Starts With Blank Line
Class Starts With Blank Line
Closure Statement On Opening Line Of Multiple Line Closure
Closure Statement On Opening Line Of Multiple Line Closure
Consecutive Blank Lines
Consecutive Blank Lines
File Ends Without Newline
File Ends Without Newline
Indentation
Indentation
Line Length
Line Length
Missing Blank Line After Imports
Missing Blank Line After Imports
Missing Blank Line After Package
Missing Blank Line After Package
Missing Blank Line Before Annotated Field
Missing Blank Line Before Annotated Field
Space After Catch
Space After Catch
Space After Closing Brace
Space After Closing Brace
Space After Comma
Space After Comma
Space After For
Space After For
Space After If
Space After If
Space After Method Call Name
Space After Method Call Name
Space After Method Declaration Name
Space After Method Declaration Name
Space After Not Operator
Space After Not Operator
Space After Opening Brace
Space After Opening Brace
Space After Semicolon
Space After Semicolon
Space After Switch
Space After Switch
Space After While
Space After While
Space Around Closure Arrow
Space Around Closure Arrow
Space Around Map Entry Colon
Space Around Map Entry Colon
Space Around Operator
Space Around Operator
Space Before Closing Brace
Space Before Closing Brace
Space Before Opening Brace
Space Before Opening Brace
Space Inside Parentheses
Space Inside Parentheses
Trailing Whitespace
Trailing Whitespace
Illegal Class Member
Illegal Class Member
Illegal Class Reference
Illegal Class Reference
Illegal Package Reference
Illegal Package Reference
Illegal Regex
Illegal Regex
Illegal String
Illegal String
Illegal Subclass
Illegal Subclass
Required Regex
Required Regex
Required String
Required String
Stateless Class
Stateless Class
Grails Domain Gorm Methods
Grails Domain Gorm Methods
Grails Domain Has Equals
Grails Domain Has Equals
Grails Domain Has To String
Grails Domain Has To String
Grails Domain Reserved Sql Keyword Name
Grails Domain Reserved Sql Keyword Name
Grails Domain String Property Max Size
Grails Domain String Property Max Size
Grails Domain With Service Reference
Grails Domain With Service Reference
Grails Duplicate Constraint
Grails Duplicate Constraint
Grails Duplicate Mapping
Grails Duplicate Mapping
Grails Mass Assignment
Grails Mass Assignment
Grails Public Controller Method
Grails Public Controller Method
Grails Servlet Context Reference
Grails Servlet Context Reference
Grails Stateless Service
Grails Stateless Service
Assign Collection Sort
Assign Collection Sort
Assign Collection Unique
Assign Collection Unique
Closure As Last Method Parameter
Closure As Last Method Parameter
Collect All Is Deprecated
Collect All Is Deprecated
Confusing Multiple Returns
Confusing Multiple Returns
Explicit Array List Instantiation
Explicit Array List Instantiation
Explicit Call To And Method
Explicit Call To And Method
Explicit Call To Compare To Method
Explicit Call To Compare To Method
Explicit Call To Div Method
Explicit Call To Div Method
Explicit Call To Equals Method
Explicit Call To Equals Method
Explicit Call To Get At Method
Explicit Call To Get At Method
Explicit Call To Left Shift Method
Explicit Call To Left Shift Method
Explicit Call To Minus Method
Explicit Call To Minus Method
Explicit Call To Mod Method
Explicit Call To Mod Method
Explicit Call To Multiply Method
Explicit Call To Multiply Method
Explicit Call To Or Method
Explicit Call To Or Method
Explicit Call To Plus Method
Explicit Call To Plus Method
Explicit Call To Power Method
Explicit Call To Power Method
Explicit Call To Put At Method
Explicit Call To Put At Method
Explicit Call To Right Shift Method
Explicit Call To Right Shift Method
Explicit Call To Xor Method
Explicit Call To Xor Method
Explicit Hash Map Instantiation
Explicit Hash Map Instantiation
Explicit Hash Set Instantiation
Explicit Hash Set Instantiation
Explicit Linked Hash Map Instantiation
Explicit Linked Hash Map Instantiation
Explicit Linked List Instantiation
Explicit Linked List Instantiation
Explicit Stack Instantiation
Explicit Stack Instantiation
Explicit Tree Set Instantiation
Explicit Tree Set Instantiation
G String As Map Key
G String As Map Key
G String Expression Within String
G String Expression Within String
Getter Method Could Be Property
Getter Method Could Be Property
Groovy Lang Immutable
Groovy Lang Immutable
Use Collect Many
Use Collect Many
Use Collect Nested
Use Collect Nested
Duplicate Import
Duplicate Import
Import From Same Package
Import From Same Package
Import From Sun Packages
Import From Sun Packages
Misordered Static Imports
Misordered Static Imports
No Wildcard Imports
No Wildcard Imports
Unnecessary Groovy Import
Unnecessary Groovy Import
Unused Import
Unused Import
Direct Connection Management
Direct Connection Management
Jdbc Connection Reference
Jdbc Connection Reference
Jdbc Result Set Reference
Jdbc Result Set Reference
Jdbc Statement Reference
Jdbc Statement Reference
Chained Test
Chained Test
Coupled Test Case
Coupled Test Case
J Unit Assert Always Fails
J Unit Assert Always Fails
J Unit Assert Always Succeeds
J Unit Assert Always Succeeds
J Unit Fail Without Message
J Unit Fail Without Message
J Unit Lost Test
J Unit Lost Test
J Unit Public Field
J Unit Public Field
J Unit Public Non Test Method
J Unit Public Non Test Method
J Unit Public Property
J Unit Public Property
J Unit Set Up Calls Super
J Unit Set Up Calls Super
J Unit Style Assertions
J Unit Style Assertions
J Unit Tear Down Calls Super
J Unit Tear Down Calls Super
J Unit Test Method Without Assert
J Unit Test Method Without Assert
J Unit Unnecessary Set Up
J Unit Unnecessary Set Up
J Unit Unnecessary Tear Down
J Unit Unnecessary Tear Down
J Unit Unnecessary Throws Exception
J Unit Unnecessary Throws Exception
Spock Ignore Rest Used
Spock Ignore Rest Used
Unnecessary Fail
Unnecessary Fail
Use Assert Equals Instead Of Assert True
Use Assert Equals Instead Of Assert True
Use Assert False Instead Of Negation
Use Assert False Instead Of Negation
Use Assert Null Instead Of Assert Equals
Use Assert Null Instead Of Assert Equals
Use Assert Same Instead Of Assert True
Use Assert Same Instead Of Assert True
Use Assert True Instead Of Assert Equals
Use Assert True Instead Of Assert Equals
Use Assert True Instead Of Negation
Use Assert True Instead Of Negation
Logger For Different Class
Logger For Different Class
Logger With Wrong Modifiers
Logger With Wrong Modifiers
Logging Swallows Stacktrace
Logging Swallows Stacktrace
Multiple Loggers
Multiple Loggers
Print Stack Trace
Print Stack Trace
Println
Println
System Err Print
System Err Print
System Out Print
System Out Print
Abstract Class Name
Abstract Class Name
Class Name
Class Name
Class Name Same As Filename
Class Name Same As Filename
Class Name Same As Superclass
Class Name Same As Superclass
Confusing Method Name
Confusing Method Name
Factory Method Name
Factory Method Name
Field Name
Field Name
Interface Name
Interface Name
Interface Name Same As Super Interface
Interface Name Same As Super Interface
Method Name
Method Name
Object Override Misspelled Method Name
Object Override Misspelled Method Name
Package Name
Package Name
Package Name Matches File Path
Package Name Matches File Path
Parameter Name
Parameter Name
Property Name
Property Name
Variable Name
Variable Name
File Create Temp File
File Create Temp File
Insecure Random
Insecure Random
Java Io Package Access
Java Io Package Access
Non Final Public Field
Non Final Public Field
Non Final Subclass Of Sensitive Interface
Non Final Subclass Of Sensitive Interface
Object Finalize
Object Finalize
Public Finalize Method
Public Finalize Method
System Exit
System Exit
Unsafe Array Declaration
Unsafe Array Declaration
Enum Custom Serialization Ignored
Enum Custom Serialization Ignored
Serial Persistent Fields
Serial Persistent Fields
Serial Version U I D
Serial Version U I D
Serializable Class Must Define Serial Version U I D
Serializable Class Must Define Serial Version U I D
Class Size
Class Size
Method Count
Method Count
Method Size
Method Size
Nested Block Depth
Nested Block Depth
Parameter Count
Parameter Count
Add Empty String
Add Empty String
Consecutive Literal Appends
Consecutive Literal Appends
Consecutive String Concatenation
Consecutive String Concatenation
Unnecessary Big Decimal Instantiation
Unnecessary Big Decimal Instantiation
Unnecessary Big Integer Instantiation
Unnecessary Big Integer Instantiation
Unnecessary Boolean Expression
Unnecessary Boolean Expression
Unnecessary Boolean Instantiation
Unnecessary Boolean Instantiation
Unnecessary Call For Last Element
Unnecessary Call For Last Element
Unnecessary Call To Substring
Unnecessary Call To Substring
Unnecessary Cast
Unnecessary Cast
Unnecessary Catch Block
Unnecessary Catch Block
Unnecessary Collect Call
Unnecessary Collect Call
Unnecessary Collection Call
Unnecessary Collection Call
Unnecessary Constructor
Unnecessary Constructor
Unnecessary Def In Field Declaration
Unnecessary Def In Field Declaration
Unnecessary Def In Method Declaration
Unnecessary Def In Method Declaration
Unnecessary Def In Variable Declaration
Unnecessary Def In Variable Declaration
Unnecessary Dot Class
Unnecessary Dot Class
Unnecessary Double Instantiation
Unnecessary Double Instantiation
Unnecessary Else Statement
Unnecessary Else Statement
Unnecessary Final On Private Method
Unnecessary Final On Private Method
Unnecessary Float Instantiation
Unnecessary Float Instantiation
Unnecessary G String
Unnecessary G String
Unnecessary Getter
Unnecessary Getter
Unnecessary If Statement
Unnecessary If Statement
Unnecessary Instance Of Check
Unnecessary Instance Of Check
Unnecessary Instantiation To Get Class
Unnecessary Instantiation To Get Class
Unnecessary Integer Instantiation
Unnecessary Integer Instantiation
Unnecessary Long Instantiation
Unnecessary Long Instantiation
Unnecessary Mod One
Unnecessary Mod One
Unnecessary Null Check
Unnecessary Null Check
Unnecessary Null Check Before Instance Of
Unnecessary Null Check Before Instance Of
Unnecessary Object References
Unnecessary Object References
Unnecessary Overriding Method
Unnecessary Overriding Method
Unnecessary Package Reference
Unnecessary Package Reference
Unnecessary Parentheses For Method Call With Closure
Unnecessary Parentheses For Method Call With Closure
Unnecessary Public Modifier
Unnecessary Public Modifier
Unnecessary Return Keyword
Unnecessary Return Keyword
Unnecessary Safe Navigation Operator
Unnecessary Safe Navigation Operator
Unnecessary Self Assignment
Unnecessary Self Assignment
Unnecessary Semicolon
Unnecessary Semicolon
Unnecessary Setter
Unnecessary Setter
Unnecessary String Instantiation
Unnecessary String Instantiation
Unnecessary Ternary Expression
Unnecessary Ternary Expression
Unnecessary To String
Unnecessary To String
Unnecessary Transient Modifier
Unnecessary Transient Modifier
Unused Array
Unused Array
Unused Method Parameter
Unused Method Parameter
Unused Object
Unused Object
Unused Private Field
Unused Private Field
Unused Private Method
Unused Private Method
Unused Private Method Parameter
Unused Private Method Parameter
Unused Variable
Unused Variable
Comma-separated list of CodeNarc RuleSet files. When set, npm-groovy-lint ignores JSON rule definitions.