Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bad PR #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 26 additions & 2 deletions src/JuliaGHA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,32 @@ function add(x, y)
return x + y
end

function mul(x, y)
return x * y
# Broke the formatting
Comment on lines 6 to +9
Copy link
Owner Author

Choose a reason for hiding this comment

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

asdf

function mul(w, z)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Test review

Copy link
Owner Author

Choose a reason for hiding this comment

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

Test review 2

Copy link
Owner Author

Choose a reason for hiding this comment

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

Test review 2

return w *
z
Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return w *
z
return w * z

Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return w *
z
return w * z

Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return w *
z
return w * z

Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return w *
z
return w * z

Copy link
Owner Author

Choose a reason for hiding this comment

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

foo

Copy link
Owner Author

Choose a reason for hiding this comment

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

hi

Copy link
Owner Author

Choose a reason for hiding this comment

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

hi

end

# Untested, but will result in a Method Error.
# JET.jl will find it!
function untested_func(x::String, y::String)
return add(x, y)
end

# Breaks tests!
function add(x::Int, y::Int)
return 1
end

# Does not pass formatting test.
function poorly_formatted(x , y )
return add(mul(x,x),
mul(x,
x))
end
Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
function poorly_formatted(x , y )
return add(mul(x,x),
mul(x,
x))
end
function poorly_formatted(x, y)
return add(mul(x, x), mul(x, x))
end

Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
function poorly_formatted(x , y )
return add(mul(x,x),
mul(x,
x))
end
function poorly_formatted(x, y)
return add(mul(x, x), mul(x, x))
end

Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
function poorly_formatted(x , y )
return add(mul(x,x),
mul(x,
x))
end
function poorly_formatted(x, y)
return add(mul(x, x), mul(x, x))
end


function a_new_func(x::Real)
return 2 * x
adamslc marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
return 2 * x
return 4 * x

Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
return 2 * x
return 4 * x

Comment on lines +33 to +34
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
function a_new_func(x::Real)
return 2 * x
function a_new_func(y::Real)
return 4 * y

end

end # module