Skip to content

Commit

Permalink
Formulate rule/exceptions descriptions consistently (#4413)
Browse files Browse the repository at this point in the history
* Formulate rule/exceptions descriptions consistently

reference #4384

* Apply suggestions from code review for msg

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>

Co-authored-by: Chao Zhang <zhangchao6865@gmail.com>
  • Loading branch information
schalkms and chao2zhang committed Dec 28, 2021
1 parent 3be9ab0 commit 67681e5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Expand Up @@ -48,7 +48,7 @@ class InstanceOfCheckForException(config: Config = Config.empty) : Rule(config)
override val issue = Issue(
"InstanceOfCheckForException",
Severity.CodeSmell,
"Instead of checking for a general exception type and checking for a specific exception type " +
"Instead of catching for a general exception type and checking for a specific exception type, " +
"use multiple catch blocks.",
Debt.TWENTY_MINS
)
Expand Down
Expand Up @@ -34,7 +34,7 @@ class NotImplementedDeclaration(config: Config = Config.empty) : Rule(config) {
Severity.CodeSmell,
"The NotImplementedDeclaration should only be used when a method stub is necessary. " +
"This defers the development of the functionality of this function. " +
"Hence, the NotImplementedDeclaration should only serve as a temporary declaration. " +
"Hence, the `NotImplementedDeclaration` should only serve as a temporary declaration. " +
"Before releasing, this type of declaration should be removed.",
Debt.TWENTY_MINS
)
Expand Down
Expand Up @@ -51,8 +51,8 @@ class PrintStackTrace(config: Config = Config.empty) : Rule(config) {
override val issue = Issue(
"PrintStackTrace",
Severity.CodeSmell,
"Do not print an stack trace. " +
"These debug statements should be replaced with a logger or removed.",
"Do not print a stack trace. " +
"These debug statements should be removed or replaced with a logger.",
Debt.TWENTY_MINS
)

Expand Down
Expand Up @@ -41,7 +41,7 @@ class TooGenericExceptionCaught(config: Config) : Rule(config) {
override val issue = Issue(
javaClass.simpleName,
Severity.Defect,
"Caught exception is too generic. " +
"The caught exception is too generic. " +
"Prefer catching specific exceptions to the case that is currently handled.",
Debt.TWENTY_MINS
)
Expand Down
Expand Up @@ -41,7 +41,7 @@ class TooGenericExceptionThrown(config: Config) : Rule(config) {
override val issue = Issue(
javaClass.simpleName,
Severity.Defect,
"Thrown exception is too generic. Prefer throwing project specific exceptions to handle error cases.",
"The thrown exception is too generic. Prefer throwing project specific exceptions to handle error cases.",
Debt.TWENTY_MINS
)

Expand Down

0 comments on commit 67681e5

Please sign in to comment.