Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Add example issues. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions module1/src/main/scala/Example1.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
object Example1 {
def sum(a: Int, b: Int) = a + b
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Public method must have type (more)


def ExampleIssues: Unit = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Parameterless methods returns unit (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info Method name not recommended (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Method name (more)

val isEmpty = List(1).size == 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info List.size is O(n) (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Avoid Traversable.size == 0 (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Literal passed as argument without name (more)

???
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Usage of ??? operator (more)

}
}
5 changes: 5 additions & 0 deletions module2/src/main/scala/Example2.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
object Example2 {
def sum(a: Int, b: Int) = a + b
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Public method must have type (more)


def ExampleIssues: Unit = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Parameterless methods returns unit (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info Method name not recommended (more)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Method name (more)

val a = (14 / 1).toInt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Unnecessary toInt (more)

return ()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Return (more)

}
}