-
Notifications
You must be signed in to change notification settings - Fork 8
/
.scalafix.conf
29 lines (28 loc) · 1.44 KB
/
.scalafix.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
rules = [
DisableSyntax, # Disables some constructs that make no semantic sense like `final val`
ProcedureSyntax, # Procedure syntax in Scala is always discouraged
ExplicitResultTypes, # To avoid public API breakages by mistake is good to always annotate the return types of public methods
NoValInForComprehension, # `val` in for comprehensions are deprecated and shouldn't be used
NoAutoTupling, # Avoids the automatic tupling in parameters
RemoveUnused, # Removes unused elements
LeakingImplicitClassVal, # This rule adds the private access modifier on the field of implicit value classes in order to prevent direct access.
OrganizeImports # Organizes imports and removes unused ones
]
ExplicitResultTypes.memberKind = [Def, Val, Var]
ExplicitResultTypes.memberVisibility = [Public, Protected]
ExplicitResultTypes.skipSimpleDefinitions = ['Lit', 'Term.New', 'Term.Ref']
ExplicitResultTypes.fatalWarnings = true
DisableSyntax.noNulls = true
DisableSyntax.noReturns = true
DisableSyntax.noWhileLoops = true
DisableSyntax.noIsInstanceOf = true
DisableSyntax.noXml = true
DisableSyntax.noFinalVal = true
DisableSyntax.noFinalize = true
DisableSyntax.noValPatterns = true
RemoveUnused.imports = false # The plugin organize imports removes unused and clashes with this
OrganizeImports.groups = [
"*"
"scala."
"re:javax?\\."
] # Reasoning for this config is to keep the more business related imports at the top, while language imports are on the bottom