-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafix.conf
28 lines (27 loc) · 1.83 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
rules = [
RemoveUnused #Removes unused imports. Unlike IntelliJ this is not straight up broken
NoAutoTupling #Rewrites autotuple usage to use explicit tuples
DisableSyntax #Enables the DisableSyntax rules. the exact configs are bellow
LeakingImplicitClassVal #Disables leaking the instance of implicity syntax classes
NoValInForComprehension #Disables deprecated usage of val in fors
]
DisableSyntax.noVars = true #Disallows the usage of vars
DisableSyntax.noThrows = true #Disallows the usage of the throw keyword
DisableSyntax.noNulls = true #Disallows the usage of the null literal
DisableSyntax.noReturns = true #Disallows the usage of the return keyword
DisableSyntax.noWhileLoops = true #Disallows the usage of while loops
DisableSyntax.noAsInstanceOf = true #Disallows the usage of typecasting
DisableSyntax.noIsInstanceOf = true #Disallows the usage of runtime typechecking
DisableSyntax.noXml = true #Disallows the usage of xml-literals (they're slotted for removal)
DisableSyntax.noFinalVal = true #Disallows the usage of final on vals as it actually prohibits inheritance overriding not mutations
DisableSyntax.noFinalize = true #Disallows overriding finalize
DisableSyntax.noValPatterns = true #Disallows the usage of val-patterns as they cannot be shown to be exhaustive
DisableSyntax.noUniversalEquality = true #Disallows the usage of == universal equality
DisableSyntax.noUniversalEqualityMessage = "== and != are unsafe since they allow comparing two unrelated types" #Customizes the error message for universal equalit usage
DisableSyntax.regex = [
{
id = "tripleQuestionMark"
pattern = "\\?\\?\\?"
message = "Do not use triple question marks, as that throws an exception. Fail gracefully"
}
]