forked from fs2-blobstore/fs2-blobstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafix.conf
69 lines (66 loc) · 1.89 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
rules = [
Disable
DisableSyntax // Reports an error for disabled features such as var or XML literals.
LeakingImplicitClassVal // Adds 'private' to val parameters of implicit value classes
NoValInForComprehension // Removes deprecated val inside for-comprehension binders
ProcedureSyntax // Replaces deprecated procedure syntax with explicit ': Unit ='
]
DisableSyntax {
noVars = true
noThrows = true
noNulls = true
noReturns = true
noWhileLoops = true
noAsInstanceOf = true
noIsInstanceOf = true
noXml = true
noDefaultArgs = false
noFinalVal = true // https://github.com/sbt/zinc/issues/227
noFinalize = true
noValPatterns = true
noUniversalEquality = false
noUniversalEqualityMessage = "== and != are unsafe since they allow comparing two unrelated types"
}
Disable.symbols = [
"scala.None.get"
"scala.Some.get"
"scala.Option.get"
"scala.util.Either.LeftProjection.get"
"scala.util.Either.RightProjection.get"
"scala.util.Try.get"
"scala.util.Failure.get"
"scala.util.Success.get"
{
regex = "^\\Qjava/net/URL#\\E[^(.toURI)]*$"
message = "URL talks to the network for equality, prefer URI"
}
{
symbol = "scala/Enumeration"
message = "prefer Enumeratum or a sealed abstract class"
}
]
Disable.ifSynthetic = [
{
regex = {
includes = [
"^\\Qscala/collection/MapLike#apply().\\E$"
"^\\Qscala/collection/LinearSeqOptimized#apply().\\E$"
]
}
message = "not a total function"
}
{
regex = {
includes = [
"^\\Qscala/collection/immutable/MapLike#filterKeys().\\E$"
"^\\Qscala/collection/MapLike#filterKeys().\\E$"
"^\\Qscala/collection/immutable/MapLike#mapValues().\\E$"
"^\\Qscala/collection/MapLike#mapValues().\\E$"
]
}
message = "mapValues and filterKeys are broken"
}
"scala.Any"
"java.io.Serializable"
"scala.Predef.any2stringadd"
]