Skip to content

Instantly share code, notes, and snippets.

@guizmaii
Created February 4, 2022 02:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guizmaii/b6c9dc422b40858ebc10ea23cb364cb2 to your computer and use it in GitHub Desktop.
Save guizmaii/b6c9dc422b40858ebc10ea23cb364cb2 to your computer and use it in GitHub Desktop.
rules = [
Disable
DisableSyntax
ExplicitResultTypes
LeakingImplicitClassVal
NoAutoTupling
NoValInForComprehension
ProcedureSyntax
RemoveUnused
MissingFinal
]
Disable {
ifSynthetic = [
"scala/Option.option2Iterable"
"scala/Predef.any2stringadd"
]
}
DisableSyntax.regex = [
{
id = "offensive"
pattern = "import io\\.circe\\.generic\\.auto\\.\\*"
message = "Never use the `auto` mode of Circe. It makes the code un-testable."
},
{
id = "Enforce new scala3 syntax for intersection type: X & Y"
pattern = "(?!^.*//.*)\\[[^\\[\\]]*\\s+(:?with)\\s+[^a]+\\]"
message = "Replace with by & "
},
{
id = "Enforce List.empty"
pattern = "List\\(\\)"
message = "Replace by List.empty "
},
{
id = "Enforce Map.empty"
pattern = "Map\\(\\)"
message = "Replace by Map.empty "
},
{
id = "Enforce Set.empty"
pattern = "Set\\(\\)"
message = "Replace by Set.empty "
},
]
RemoveUnused {
imports = true
}
DisableSyntax.noReturns = true
DisableSyntax.noXml = true
DisableSyntax.noFinalize = true
DisableSyntax.noValPatterns = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment