-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
add format check action - initial repo format #2520
base: master
Are you sure you want to change the base?
Conversation
fcf0d0d
to
ee0aa3c
Compare
1e09a72
to
389be7a
Compare
GLMakie/experiments/shaderabstr.jl
Outdated
println( | ||
io, | ||
""" | ||
in $(value_t) fragment_$(name)_index; | ||
uniform $(sampler_t) $(name)_texture; | ||
|
||
vec4 get_$(name)(){ | ||
return texture($(name)_texture, fragment_$(name)_index); | ||
} | ||
""") | ||
vec4 get_$(name)(){ | ||
return texture($(name)_texture, fragment_$(name)_index); | ||
} | ||
""", | ||
) |
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.
Would be good to ignore indention for this
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.
This is a bit annoying yes (domluna/JuliaFormatter.jl#501), but still readable.
CairoMakie/src/overrides.jl
Outdated
function draw_poly( | ||
scene::Scene, | ||
screen::Screen, | ||
poly, | ||
points::Vector{<:Point2}, | ||
color::Union{Symbol, Colorant, Makie.AbstractPattern}, | ||
model, | ||
strokecolor, | ||
strokewidth, | ||
) |
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.
I prefer this to be double indented so that function .. end
and ( .. )
are on different levels and visually distinct.
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.
I think this is a matter of taste.
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.
Sure, that's true for pretty much all of these. I'm mostly pointing this stuff out so it can be discussed and we can figure out what we actually want
src/interaction/inspector.jl
Outdated
z = | ||
((r - i) * img[l, b] + (i - l) * img[r, b]) * (t - j) + | ||
((r - i) * img[l, t] + (i - l) * img[r, t]) * (j - 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.
I guess this is very subjective and nit-picky but I think in some situations (like here) it's nicer to have e.g. (t-j)
instead of (t - j)
. The former sort of establishes groups and gives you less separate things to look at which, in my opinion, helps readability. Maybe this is something to keep unformated?
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.
Not sure, I personally find this quite readable, and consistent with the rest.
@@ -4,206 +4,205 @@ represent keyboard buttons. | |||
""" | |||
module Keyboard |
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.
I don't think we should lose the indention for modules with how we use them here.
440bcff
to
2a15ad7
Compare
I have taken another approach, since there were too many controversial changes as @ffreyer pointed out. I propose instead to use the
|
I'll say it again here so it's more visible: Most of my complaints are just my opinions on code style. My main reason for posting them is so we can discuss those points and figure out what styling we want. It doesn't need to be what I suggest. But I think this pr is the place to discuss that. |
Code style is always controversial, and comments on this PR are very welcome. |
20aa8db
to
3e58ffe
Compare
1397143
to
781c1f6
Compare
e55ee76
to
eeeea7c
Compare
Rebased against latest master. Should this go in (based on #2493 (comment)) ? |
Description
Fix #2519
I've ran on a single format error on https://github.com/MakieOrg/Makie.jl/blob/master/src/camera/camera.jl#L32-L34, which was trivial to fix, and I'm going to open an issue + PR inJuliaFormatter
to fix this, but this is non-blocking.Type of change
Delete options that do not apply:
Checklist