|
| 1 | +rules = [ |
| 2 | + DisableSyntax, # Disables some constructs that make no semantic sense like `final val` |
| 3 | + ProcedureSyntax, # Procedure syntax in Scala is always discouraged |
| 4 | + NoValInForComprehension, # `val` in for comprehensions are deprecated and shouldn't be used |
| 5 | + NoAutoTupling, # Avoids the automatic tupling in parameters |
| 6 | + RemoveUnused, # Removes unused elements |
| 7 | + LeakingImplicitClassVal, # This rule adds the private access modifier on the field of implicit value classes in order to prevent direct access. |
| 8 | + OrganizeImports # Organizes imports and removes unused ones |
| 9 | +] |
| 10 | + |
| 11 | +ExplicitResultTypes.memberKind = [Def, Val, Var] |
| 12 | +ExplicitResultTypes.memberVisibility = [Public, Protected] |
| 13 | +ExplicitResultTypes.skipSimpleDefinitions = ['Lit', 'Term.New', 'Term.Ref'] |
| 14 | +ExplicitResultTypes.fatalWarnings = true |
| 15 | +DisableSyntax.noReturns = true |
| 16 | +DisableSyntax.noWhileLoops = true |
| 17 | +DisableSyntax.noXml = true |
| 18 | +DisableSyntax.noFinalVal = true |
| 19 | +DisableSyntax.noFinalize = true |
| 20 | +DisableSyntax.noValPatterns = true |
| 21 | +RemoveUnused.imports = false # The plugin organize imports removes unused and clashes with this |
| 22 | +OrganizeImports { |
| 23 | + groupedImports = Merge |
| 24 | + groups = [ |
| 25 | + "*" |
| 26 | + "java." |
| 27 | + "scala." |
| 28 | + "re:javax?\\." |
| 29 | + ] # Reasoning for this config is to keep the more business related imports at the top, while language imports are on the bottom |
| 30 | +} |
0 commit comments