https://github.com/julia-vscode/documentformat.jl
Auto-formatter for Julia
https://github.com/julia-vscode/documentformat.jl
Last synced: 3 months ago
JSON representation
Auto-formatter for Julia
- Host: GitHub
- URL: https://github.com/julia-vscode/documentformat.jl
- Owner: julia-vscode
- License: other
- Created: 2017-08-02T08:26:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T23:08:46.000Z (over 1 year ago)
- Last Synced: 2024-04-14T00:28:25.856Z (over 1 year ago)
- Language: Julia
- Size: 458 KB
- Stars: 62
- Watchers: 6
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DocumentFormat
### This package is deprecated. Please use [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl) instead!
---
[](https://www.julia-vscode.org/DocumentFormat.jl/dev)
[](http://www.repostatus.org/#active)

[](http://codecov.io/github/julia-vscode/DocumentFormat.jl?branch=master)
An auto formatter for Julia.
## Installation and Usage
```julia
using Pkg
Pkg.add("DocumentFormat")
```
```julia
using DocumentFormat
```
**Documentation**: [](https://www.julia-vscode.org/DocumentFormat.jl/dev)
## Overview
The main function to format code is `format`. When called with a string argument, that string is assumed to be code and a new string in which the code is formatted is returned. When called with an `AbstractPath` that points to a file, that file is being formatted. If called with an `AbstractPath` that points to a folder, all `*.jl` files in that folder are formatted.
The function `isformatted` checks whether a piece of code is formatted. It can be called with a string (assumed to hold code) or an `AbstractPath`.