-
Notifications
You must be signed in to change notification settings - Fork 0
Add example issues. #1
base: master
Are you sure you want to change the base?
Conversation
| @@ -1,3 +1,8 @@ | |||
| object Example1 { | |||
| def sum(a: Int, b: Int) = a + b | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Public method must have type (more)
| object Example1 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameterless methods returns unit (more)
| object Example1 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name not recommended (more)
| object Example1 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name (more)
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { | ||
| val isEmpty = List(1).size == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List.size is O(n) (more)
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { | ||
| val isEmpty = List(1).size == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid Traversable.size == 0 (more)
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { | ||
| val isEmpty = List(1).size == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Literal passed as argument without name (more)
|
|
||
| def ExampleIssues: Unit = { | ||
| val isEmpty = List(1).size == 0 | ||
| ??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of ??? operator (more)
| @@ -1,3 +1,8 @@ | |||
| object Example2 { | |||
| def sum(a: Int, b: Int) = a + b | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Public method must have type (more)
| object Example2 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameterless methods returns unit (more)
| object Example2 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name not recommended (more)
| object Example2 { | ||
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name (more)
| def sum(a: Int, b: Int) = a + b | ||
|
|
||
| def ExampleIssues: Unit = { | ||
| val a = (14 / 1).toInt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary toInt (more)
|
|
||
| def ExampleIssues: Unit = { | ||
| val a = (14 / 1).toInt | ||
| return () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return (more)
No description provided.