Skip to content
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

Add a description to the AsInstanceOf inspection. #330

Merged
merged 1 commit into from
Mar 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class UseLog1P
extends Inspection(
text = "Use log1p",
defaultLevel = Levels.Info,
description = "Checks for use of math.log(x + 1) instead of math.log1p(x)",
description = "Checks for use of math.log(x + 1) instead of math.log1p(x).",
explanation = "Use math.log1p(x) is clearer and more performant than $math.log(1 + x)."
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class OptionGet
extends Inspection(
text = "Use of Option.get",
defaultLevel = Levels.Error,
description = "Checks for use of Option.get",
description = "Checks for use of Option.get.",
explanation =
"Using Option.get defeats the purpose of using Option in the first place. Use the following instead: Option.getOrElse, Option.fold, pattern matching or don't take the value out of the container and map over it to transform it."
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class AsInstanceOf
extends Inspection(
text = "Use of asInstanceOf",
defaultLevel = Levels.Warning,
description = "",
description = "Checks for use of asInstanceOf.",
explanation =
"Use of asInstanceOf is considered a bad practice - consider using pattern matching instead."
) {
Expand Down