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

Add example issues. #1

wants to merge 1 commit into from

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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
object Example1 {
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)

@@ -1,3 +1,8 @@
object Example1 {
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)

@@ -1,3 +1,8 @@
object Example1 {
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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
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)

@@ -1,3 +1,8 @@
object Example2 {
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.

2 participants