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

Conversation

@mwz
Copy link
Member

@mwz mwz commented Dec 20, 2019

No description provided.

@@ -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)

object Example1 {
def sum(a: Int, b: Int) = a + b

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)

object Example1 {
def sum(a: Int, b: Int) = a + b

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.

info Method name not recommended (more)

object Example1 {
def sum(a: Int, b: Int) = a + b

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 Method name (more)

def sum(a: Int, b: Int) = a + b

def ExampleIssues: Unit = {
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)

def sum(a: Int, b: Int) = a + b

def ExampleIssues: Unit = {
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.

minor Avoid Traversable.size == 0 (more)

def sum(a: Int, b: Int) = a + b

def ExampleIssues: Unit = {
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.

minor Literal passed as argument without name (more)


def ExampleIssues: Unit = {
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.

minor Usage of ??? operator (more)

@@ -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)

object Example2 {
def sum(a: Int, b: Int) = a + b

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)

object Example2 {
def sum(a: Int, b: Int) = a + b

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.

info Method name not recommended (more)

object Example2 {
def sum(a: Int, b: Int) = a + b

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 Method name (more)

def sum(a: Int, b: Int) = a + b

def ExampleIssues: Unit = {
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)


def ExampleIssues: Unit = {
val a = (14 / 1).toInt
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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants