autoformat 0.0.1

Autoformatter of source code with git hooks


To use this package, run the following command in your project's root directory:

autoformat Build Status

Wraps existing tools for formatting of source code in a handy package with integration with git.

Getting Started

autoformat depend on the following packages:

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.

Authors:
  • Joakim Brännström
Dependencies:
none
Versions:
0.0.1 2019-Aug-08
~master 2019-Aug-08
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 1 downloads this week

  • 7 downloads this month

  • 7 downloads total

Score:
0.4
Short URL:
autoformat.dub.pm