Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
163 stars 63 forks source link

Adjust indentation to two spaces #1706

Closed joschmitt closed 4 months ago

joschmitt commented 4 months ago

... 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.

lgoettgens commented 4 months ago

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

codecov[bot] commented 4 months ago

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 ```diff @@ 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.

lgoettgens commented 4 months ago

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

thofma commented 4 months ago

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.

joschmitt commented 4 months ago

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 commented 4 months ago

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

thofma commented 4 months ago

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

joschmitt commented 4 months ago

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

Yes, that's also my problem.

thofma commented 4 months ago

the Nemo PR has the same problems

joschmitt commented 4 months ago

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? ...?

thofma commented 4 months ago

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.

joschmitt commented 4 months ago

Okay!