-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
igluctl: switch severity level to skip checks #232
Comments
Hey @oguzhanunlu, here's another piece of info. Yes, we're going to get rid of notion of levels entirely as well as of You can have a map of linters: val allLinters: Map[String, Linter] = Map(
"minimumMaximum" -> lintMinimumMaximum,
"minMaxLength" -> lintMinMaxLength,
...etc) Then just get val lintersToUse = lintersToSkip.foldLeft(Right(allLinters.values)) { (linters, cur) =>
(linters, allLinters.get(cur)) match {
case (Right(linters), Some(c)) => Right(linters.diff(List(c)))
case (Left(errors), Some(_)) => Left(errors)
case (Right(_), None) => Left(List(s"Unknown linter $cur"))
case (Left(errors), None) => Left(s"Unknown linter $cur" :: errors)
}
} |
I'm also quite keen to have different sets of linters for different use cases, like |
That's a nice idea. |
Hey @oguzhanunlu, just a quick reminder to add description of all new linters Igluctl wiki page ("Update documenation" card in project this time is after you!) |
Currently severity levels assume that we can have better or worse (high quality/low quality) checks, whereas it really not high/low, but include/exclude. User should have an ability to disable/enable each particular check if he is sure that absence of
maxLength
is fine.My idea is to switch severity levels with checks option (or even
--skip-checks
), so user will have explicitly skip some lint if he wants:igluctl lint /path/ --skip-checks optionalNull,implicitMax
, whereoptionalNull
disables #231 check andimplicitMax
disables #175.The text was updated successfully, but these errors were encountered: