Style Guide

    This section describes the coding style rules that apply to our code and that we recommend you to use it also.

    In some cases, our style guide diverges from Julia's official Style Guide (Please read it!). All such cases will be explicitly noted and justified.

    Our style guide adopts many recommendations from the BlueStyle. Please read the BlueStyle before contributing to this package. If not following, your pull requests may not be accepted.

    Info

    The style guide is always a work in progress, and not all SimpleWorkflowRecipes code follows the rules. When modifying SimpleWorkflowRecipes, please fix the style violations of the surrounding code (i.e., leave the code tidier than when you started). If large changes are needed, consider separating them into another pull request.

    Formatting

    Run JuliaFormatter

    SimpleWorkflowRecipes uses JuliaFormatter as an auto-formatting tool.

    We use the options contained in .JuliaFormatter.toml.

    To format your code, cd to the SimpleWorkflowRecipes directory, then run:

    julia> using Pkg
    julia> Pkg.add("JuliaFormatter") Resolving package versions... Installed CSTParser ────── v3.4.3 Installed Crayons ──────── v4.1.1 Installed Glob ─────────── v1.3.1 Installed Tokenize ─────── v0.5.29 Installed CommonMark ───── v0.8.15 Installed JuliaFormatter ─ v1.0.62 Updating `~/work/SimpleWorkflowRecipes.jl/SimpleWorkflowRecipes.jl/docs/build/developers/Project.toml` [98e50ef6] + JuliaFormatter v1.0.62 Updating `~/work/SimpleWorkflowRecipes.jl/SimpleWorkflowRecipes.jl/docs/build/developers/Manifest.toml` [00ebfdb7] + CSTParser v3.4.3 [a80b9123] + CommonMark v0.8.15 [34da2185] + Compat v4.16.0 [a8cc5b0e] + Crayons v4.1.1 [864edb3b] + DataStructures v0.18.20 [c27321d9] + Glob v1.3.1 [98e50ef6] + JuliaFormatter v1.0.62 [bac558e1] + OrderedCollections v1.7.0 [aea7be01] + PrecompileTools v1.2.1 [21216c6a] + Preferences v1.4.3 [0796e94c] + Tokenize v0.5.29 [2a0f44e3] + Base64 v1.11.0 [ade2ca70] + Dates v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [d6f4376e] + Markdown v1.11.0 [de0858da] + Printf v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v0.7.0 [fa267f1f] + TOML v1.0.3 [cf7118a7] + UUIDs v1.11.0 [4ec0a83e] + Unicode v1.11.0 Precompiling project... 413.0 ms ✓ Glob 1168.7 ms ✓ Crayons 2666.2 ms ✓ Tokenize 7986.1 ms ✓ CSTParser 10703.5 ms ✓ CommonMark 21322.6 ms ✓ JuliaFormatter 6 dependencies successfully precompiled in 33 seconds. 13 already precompiled.
    julia> using JuliaFormatter: format
    julia> format("docs");ERROR: IOError: realpath("docs"): no such file or directory (ENOENT)
    julia> format("src");ERROR: IOError: realpath("src"): no such file or directory (ENOENT)
    julia> format("test");ERROR: IOError: realpath("test"): no such file or directory (ENOENT)
    Info

    A continuous integration check verifies that all PRs made to SimpleWorkflowRecipes have passed the formatter.

    The following sections outline extra style guide points that are not fixed automatically by JuliaFormatter.

    Use the Julia extension for Visual Studio Code

    Please use VS Code with the Julia extension to edit, format, and test your code. We do not recommend using other editors to edit your code for the time being.

    This extension already has JuliaFormatter integrated. So to format your code, follow the steps listed here.