You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or otherwise, set the global `ARGS` variable, and call `include("test/runtests.jl")`.
51
51
52
+
### Code Formatting
53
+
54
+
Turing uses [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl) to ensure consistent code style across the codebase. **All code must be formatted before submitting a pull request**, and ideally with every commit.
55
+
56
+
#### Installing JuliaFormatter
57
+
58
+
We use version 1 of JuliaFormatter. Install it in your **global Julia environment** (not the project environment, as adding it to the Project.toml would make it invalid):
59
+
60
+
```julia
61
+
julia -e 'using Pkg; Pkg.activate(); Pkg.add(name="JuliaFormatter", version="1"); Pkg.pin("JuliaFormatter")'
62
+
```
63
+
64
+
#### Formatting Code
65
+
66
+
To format all Julia files in the current directory and subdirectories:
67
+
68
+
```julia
69
+
julia -e 'using JuliaFormatter; format(".")'
70
+
```
71
+
72
+
Run this command from the root of the repository before committing your changes. This ensures your code follows the project's formatting standards and maintains consistency across the codebase.
0 commit comments