autoformat 1.0.0
Autoformatter of source code with git hooks
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
autoformat
Wraps existing tools for formatting of source code in a handy package with integration with git.
Getting Started
autoformat depend on the following packages:
- D compiler (dmd 2.079+, ldc 1.11.0+)
Optional:
- astyle
- clang-format
- dfmt
It is recommended to install the D compiler by downloading it from the official distribution page.
# link https://dlang.org/download.html
curl -fsS https://dlang.org/install.sh | bash -s dmd
For users running Ubuntu some of the dependencies can be installed with apt.
sudo apt install astyle clang-format
The easiest way to now run autoformat is by using dub:
dub run autoformat
Otherwise you can clone the repo, build and install manually.
git clone https://github.com/joakim-brannstrom/autoformat.git
cd autoformat
dub build -b release
Copy the files from autoformat/build to wherever you want them
Done! Have fun. Don't be shy to report any issue that you find.
Git Integration
It couldn't be easier. Make sure that autoformat is in your PATH.
To install the git hooks:
autoformat -i path/to/directory/with/a/.git
When the hook is being installed it will prompt for one of three options. Choose the configuration you like.
Now whenever you do a git commit it will check/format the changed files.
- 1.0.0 released 2 years ago
- joakim-brannstrom/autoformat
- BSL-1.0
- Copyright © 2017, Joakim Brännström
- Authors:
- Dependencies:
- colorlog, my, sumtype
- Versions:
-
1.0.0 2022-Jun-03 0.0.1 2019-Aug-08 ~master 2023-Nov-12 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
30 downloads total
-
- Score:
- 0.6
- Short URL:
- autoformat.dub.pm