AbstractAlgebra.jl icon indicating copy to clipboard operation
AbstractAlgebra.jl copied to clipboard

Adjust indentation to two spaces

Open joschmitt opened this issue 9 months ago • 2 comments

... since it was such a huge success in Nemo and there are not many (active) pull requests open right now.

I can of course easily update this, if something else wants to get merged first.

joschmitt avatar May 15 '24 13:05 joschmitt

https://github.com/Nemocas/AbstractAlgebra.jl/pull/1704 is the only larger PR, but only adds lines so it should be fine

lgoettgens avatar May 15 '24 13:05 lgoettgens

Codecov Report

Attention: Patch coverage is 89.01508% with 619 lines in your changes are missing coverage. Please review.

Project coverage is 87.32%. Comparing base (a2e601d) to head (83fb1ae).

Files Patch % Lines
src/NemoStuff.jl 13.71% 151 Missing :warning:
src/MPoly.jl 81.13% 83 Missing :warning:
src/PrettyPrinting.jl 90.95% 67 Missing :warning:
src/RelSeries.jl 94.02% 44 Missing :warning:
src/AbsSeries.jl 93.41% 36 Missing :warning:
src/Fraction.jl 92.09% 32 Missing :warning:
src/WeakValueDict.jl 92.21% 26 Missing :warning:
src/algorithms/GenericFunctions.jl 83.66% 25 Missing :warning:
src/NCPoly.jl 91.98% 23 Missing :warning:
src/AbstractAlgebra.jl 19.23% 21 Missing :warning:
... and 23 more
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1706   +/-   ##
=======================================
  Coverage   87.32%   87.32%           
=======================================
  Files         117      117           
  Lines       29824    29825    +1     
=======================================
+ Hits        26045    26046    +1     
  Misses       3779     3779           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 15 '24 14:05 codecov[bot]

Any objections to just merging this @thofma @fingolfin ? There are no open PRs with painful conflicts.

lgoettgens avatar May 16 '24 13:05 lgoettgens

What is up with all the

something_very_long = [
  1, 2, 3,
  4, 5, 6

being changed to

something_very_long = [
                                          1, 2, 3,
                                          4, 5, 6

and similar for all the other parantheses.

thofma avatar May 16 '24 13:05 thofma

What is up with all the

something_very_long = [
  1, 2, 3,
  4, 5, 6

being changed to

something_very_long = [
                                          1, 2, 3,
                                          4, 5, 6

and similar for all the other parantheses.

Can you point to an example? I'm not sure what you mean.

joschmitt avatar May 16 '24 13:05 joschmitt

If we are generally happy with this, I can try to remove some unwanted changes by hand. (Starting with resetting docs/make.jl.)

joschmitt avatar May 16 '24 13:05 joschmitt

I only checked the first 100 lines. I have 49000 left to check.

thofma avatar May 16 '24 13:05 thofma

I only checked the first 100 lines. I have 49700 to go.

Yes, that's also my problem.

joschmitt avatar May 16 '24 13:05 joschmitt

the Nemo PR has the same problems

thofma avatar May 16 '24 13:05 thofma

Before I put more work into this: What's the idea? Status quo? This pull request (most lines are correctly indented and a few aren't)? We hire somebody to hand-indent every line? ...?

joschmitt avatar May 16 '24 14:05 joschmitt

Status quo it is. The inconsistent indentation does not effect readability. On the other hand, the changes here do not add anything for readability, but they are actually making it worse. See the

a || b || c &&
  error()

change to

a || b || c &&
error()

And these are only the ones I found. I have not checked the other 49000 lines of code. I would say, we just change it when we work on it.

thofma avatar May 16 '24 16:05 thofma

Okay!

joschmitt avatar May 16 '24 17:05 joschmitt