Tool for automatically upgrading D source code
- Updates old-style alias syntax to new-style
- Fixes implicit concatenation of string literals
- Automatic conversion of C-style array declarations and parameters to D-style.
- Upgrades code to comply with DIP64 when the
--dip64switch is specified. (Not recommended) - Upgrades code to comply with DIP65 unless the
--dip65=falseswitch is specified. - Upgrades code to comply with DIP1003 unless the
--dip1003=falseswitch is specified. - Rewrites functions declared
const,immutableandinoutto be more clear by moving these keywords from the left side of the return type to the right side of the parameter list.
dfix will edit your files in-place. Do not use dfix on files that have no backup copies. Source control solves this problem for you. Double-check the results before checking in the modified code.
OS X users with homebrew should be able to install via brew install dfix for the latest stable release or brew install dfix --HEAD for the latest git master branch.
Other users should manually install, e.g. on *nix systems:
git clone https://github.com/dlang-community/dfix && git submodule update --initcd dfixgit checkout v0.3.5if you want the stable releasemaketo buildmake testto test- either add the
bindirectory to your path or copy to another directory that is on your path.
> dub fetch dfix && dub run dfix