# Is there a PEP8 for Julia?

**URL:** <https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433>\
**Category:** New to Julia\
**Created:** [January 12, 2017, 1:55pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433 "2017-01-12T13:55:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![cripcate](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cripcate/32/34170_2.png) [@cripcate](https://discourse.julialang.org/u/cripcate)\
**Post date:** [January 12, 2017, 1:55pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/1 "2017-01-12T13:55:27Z")

</div>

Is there a Guide to “pretty” Julia code yet? Meaning somehting similar to PEP8 and PEP250 (was it that numbers) from python?

Also: is there a linter for Atom / Juno yet?

Greetings!

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [January 12, 2017, 2:22pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/2 "2017-01-12T14:22:49Z")

</div>

[https://github.com/johnmyleswhite/Style.jl](https://github.com/johnmyleswhite/Style.jl) was referenced for some time, i don’t know the current status.

---

<div class="post-metadata">

**Author:** ![johnmyleswhite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnmyleswhite/32/31_2.png) [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Post date:** [January 12, 2017, 3:03pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/3 "2017-01-12T15:03:21Z")

</div>

I should really update that. At this point, I would tend to go with the Julia one: [http://docs.julialang.org/en/stable/manual/style-guide/](http://docs.julialang.org/en/stable/manual/style-guide/)

---

<div class="post-metadata">

**Author:** ![Pbellive](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pbellive/32/3604_2.png) [@Pbellive](https://discourse.julialang.org/u/Pbellive)\
**Post date:** [January 12, 2017, 7:48pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/4 "2017-01-12T19:48:51Z")

</div>

There is a lint package:

> **[GitHub - tonyhffong/Lint.jl: A lint tool for Julia code](https://github.com/tonyhffong/Lint.jl)**
>
> A lint tool for Julia code. Contribute to tonyhffong/Lint.jl development by creating an account on GitHub.

but I haven’t heard anything about integration with Juno.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [January 14, 2017, 4:15pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/5 "2017-01-14T16:15:40Z")

</div>

I am also interested of the topic. I did some searching and found this issue:  
[https://github.com/JuliaEditorSupport/atom-language-julia/issues/8](https://github.com/JuliaEditorSupport/atom-language-julia/issues/8)

If I understood correctly, it was almost working already.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [February 2, 2017, 5:13pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/6 "2017-02-02T17:13:51Z")

</div>

I ended up doing the package myself:  
[https://github.com/TeroFrondelius/linter-julia](https://github.com/TeroFrondelius/linter-julia)  
It’s not yet published, but if someone wants to test drive, there are basic functionalities in place.

---

<div class="post-metadata">

**Author:** ![Seanny123](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/seanny123/32/5271_2.png) [@Seanny123](https://discourse.julialang.org/u/Seanny123)\
**Post date:** [December 14, 2018, 5:23pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/7 "2018-12-14T17:23:14Z")

</div>

FYI, for others finding this question years later, all of the packages have not been updated for a year. This is somewhat expected, given Julia just when through a big version jump and isn’t used by enough Big Corporate Teams to worry by minutia like:

- How may line-breaks to put between module/functions/imports?
- Spacing around operators
- Formatting of type annotations
- Docstring format

However, I’m still replying to this topic to get notified when the community decides this is a priority.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [December 14, 2018, 5:33pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/8 "2018-12-14T17:33:03Z")

</div>

Personally I find PEP8 overly restrictive and pretty annoying, though I do think having a standardized doc-string format is a really good idea, so a big +1 to that.

---

<div class="post-metadata">

**Author:** ![bennedich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bennedich/32/4894_2.png) [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Post date:** [December 14, 2018, 6:38pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/9 "2018-12-14T18:38:17Z")

</div>

I too tend to find such guides a bit overly restrictive, and I think it shifts focus from far more important factors (writing clean, DRY, reusable, maintainable code).

For the latter, there’s the [Julia Style Guide](https://docs.julialang.org/en/latest/manual/style-guide/index.html).

When it comes to formatting, I think the [General Formatting Guidelines for Julia code contributions](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#general-formatting-guidelines-for-julia-code-contributions) are great, not too restrictive.

---

<div class="post-metadata">

**Author:** ![marosko89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marosko89/32/1976_2.png) [@marosko89](https://discourse.julialang.org/u/marosko89)\
**Post date:** [December 1, 2021, 12:39pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/10 "2021-12-01T12:39:27Z")

</div>

Anything new in this area?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [December 1, 2021, 1:53pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/11 "2021-12-01T13:53:57Z")

</div>

About a general style guide or a formatting tool? There is no ecosystem-wide style guide, there are some different guides. As a formatting tool there is [`JuliaFormatter.jl`](https://github.com/domluna/JuliaFormatter.jl), which supports some those styles. I believe it’s also integrated in some IDEs like the Julia VS Code plugin

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [December 1, 2021, 2:20pm UTC](https://discourse.julialang.org/t/is-there-a-pep8-for-julia/1433/12 "2021-12-01T14:20:28Z")

</div>

> [@giordano](#):
>
> There is no ecosystem-wide style guide, there are some different guides.

Some popular guides include [BlueStyle](https://github.com/invenia/BlueStyle) and [YASGuide](https://github.com/jrevels/YASGuide).
