# Runic.jl: A code formatter with rules set in stone

**URL:** <https://discourse.julialang.org/t/runic-jl-a-code-formatter-with-rules-set-in-stone/117898>\
**Category:** Package Announcements\
**Created:** [August 6, 2024, 3:15pm UTC](https://discourse.julialang.org/t/runic-jl-a-code-formatter-with-rules-set-in-stone/117898 "2024-08-06T15:15:46Z")\
**Posts on this page:** 1\
**Showing post:** 44

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [December 18, 2024, 9:04am UTC](https://discourse.julialang.org/t/runic-jl-a-code-formatter-with-rules-set-in-stone/117898/44 "2024-12-18T09:04:55Z")

</div>

## Runic versions 1.1, 1.2, 1.3

Runic versions 1.1, 1.2, and 1.3 are released, see [CHANGELOG](https://github.com/fredrikekre/Runic.jl/blob/master/CHANGELOG.md) for all changes.

Runic now support ranged formatting with the new `--lines=a:b` option which enables more surgical formatting of code. Based on this I want to highlight the new [Git integration](https://github.com/fredrikekre/Runic.jl?tab=readme-ov-file#git-integration) provided by the [`git-runic`](https://github.com/fredrikekre/Runic.jl/blob/master/bin/git-runic) script. `git runic` applies formatting only to your _staged_ changes (but it can also be used to format the diff from multiple commits, see `git runic -h` for details). This enables incremental formatting of a code base as an alternative to going all in with Runic in a single large commit.

`git-runic` was contributed by @maleadt (thanks!) and is based on [`git-clang-format`](https://github.com/llvm/llvm-project/blob/main/clang/tools/clang-format/git-clang-format) (git integration for [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html)). The following two blog posts give some more details about how `git-clang-format` (and thus `git-runic`) can be used:

- [Surgical formatting with git-clang-format](https://offlinemark.com/surgical-formatting-with-git-clang-format/)
- [Format your code - all the time](https://ortogonal.github.io/cpp/git-clang-format/)

Thanks!

---

_[View the full topic](https://discourse.julialang.org/t/runic-jl-a-code-formatter-with-rules-set-in-stone/117898)._
