Skip to content

Conversation

@giordano
Copy link
Collaborator

This also adds a simple check for simple whitespace issues which is used in the Julia repo. In PRs, this annotates the offending lines in the "files changed" tab, see an example at JuliaLang/julia#55281 (comment).

A previous attempt at adding a formatting linter didn't go very far, but this is very lightweight and only about extra, or missing, whitespaces at the end of lines and similar issues, and it's even used in the Julia repo where there's traditionally some resistance to enforce heavy handed code formatters. Note: #395 would introduce 400+ more whitespace issues (which is my main motivation for this 🙃), but I can fix them all in one go with a simple elisp script if this is accepted.


∂t_ρθ_large_scale = Field{Nothing, Nothing, Center}(grid)
∂t_θ_large_scale = - 2.5 / day # K / day
∂t_θ_large_scale = - 2.5 / day # K / day
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This replaced

julia> ' '
' ': Unicode U+00A0 (category Zs: Separator, space)

with

julia> ' '
' ': ASCII/Unicode U+0020 (category Zs: Separator, space)

No idea how a non-breaking space ended up there in the first place.

@giordano giordano force-pushed the mg/cleanup-whitespaces branch from 9dbe5ee to 271b9f5 Compare January 14, 2026 22:18
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../KinematicDriver/kinematic_driver_time_stepping.jl 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@giordano
Copy link
Collaborator Author

Note: #395 would introduce 400+ more whitespace issues (which is my main motivation for this 🙃), but I can fix them all in one go with a simple elisp script if this is accepted.

Ok, done it already in 4cccd18 (in #395 directly) 😇 There were so many trailing whitespaces littering the code.

@giordano giordano merged commit e262ab7 into main Jan 15, 2026
11 of 12 checks passed
@giordano giordano deleted the mg/cleanup-whitespaces branch January 15, 2026 00:52
Copy link
Member

Choose a reason for hiding this comment

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

I like this!

navidcy added a commit to CliMA/Oceananigans.jl that referenced this pull request Jan 15, 2026
navidcy added a commit to CliMA/Oceananigans.jl that referenced this pull request Jan 16, 2026
* Add GitHub action to clear whitespace

NumericalEarth/Breeze.jl#406

* Resolve all whitespace issues

* Fix typo in nospecialize annotation

* Fix typo in @nospecialize annotation

---------

Co-authored-by: Mosè Giordano <m.giordano@ucl.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants