digitalmars.D - D source code formatter
- psychoticRabbit (8/8) Feb 21 2018 I rely (heavily) on clang-format in my C code. It save me so much
- Nicholas Wilson (3/11) Feb 21 2018 look for 'dfmt'
- psychoticRabbit (6/19) Feb 21 2018 thanks. but do you mean:
- rikki cattermole (3/21) Feb 21 2018 It's the only one we have as a separate tool.
- aberba (8/28) Feb 21 2018 dfmt is available along witj DCD and other D tools in Visual
- Seb (14/22) Feb 21 2018 See https://github.com/dlang-community/dfmt/issues/249 for why it
- Timothee Cour (9/30) Feb 21 2018 note that we'd need to implement
- Russel Winder (16/21) Feb 22 2018 So now we have both:
I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.
Feb 21 2018
On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.look for 'dfmt'
Feb 21 2018
On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote:On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:thanks. but do you mean: dfmt is certainly reliable, so go look for it. or for look for dfmt and work out whether it's reliable.I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.look for 'dfmt'
Feb 21 2018
On 22/02/2018 6:38 PM, psychoticRabbit wrote:On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote:It's the only one we have as a separate tool. https://github.com/dlang-community/dfmtOn Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:thanks. but do you mean: dfmt is certainly reliable, so go look for it. or for look for dfmt and work out whether it's reliable.I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.look for 'dfmt'
Feb 21 2018
On Thursday, 22 February 2018 at 05:38:38 UTC, psychoticRabbit wrote:On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote:dfmt is available along witj DCD and other D tools in Visual Studio Code. Its all package in the code-d package. dfmt formats D code good enough for the common cases as I don't do much CTFE or cryptic D coding style. VS Code is slow though. Its built with electron (html, css, Javascript) and uses a lot of cpu and ram.On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:thanks. but do you mean: dfmt is certainly reliable, so go look for it. or for look for dfmt and work out whether it's reliable.I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.look for 'dfmt'
Feb 21 2018
On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.See https://github.com/dlang-community/dfmt/issues/249 for why it was never included in the release distribution. In short: Brian was never really interested in packaging and investing time into releasing his tools, so it stalled. Now that dub is part of the release distribution, it's simply: dub fetch dfmt dub run dfmt So there's essentially no big need to ship it in the release archives. Though Sociomantic has recently taken over the release process of dfmt and currently provides APT packages at bintray: https://bintray.com/dlang-community/apt/dfmt
Feb 21 2018
note that we'd need to implement https://github.com/dlang-community/dfmt/issues/159 ( option to format only diff-ed lines (like git clang-format)) in order to run dfmt on only the part of source code that was modified in a PR. this is to avoid concern that it affects git history / git blame (although these can skip blacklisted format-only commits or skip white-space diffs) On Wed, Feb 21, 2018 at 11:00 PM, Seb via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote:I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution - given the importance of consistent source code formatting these days.See https://github.com/dlang-community/dfmt/issues/249 for why it was never included in the release distribution. In short: Brian was never really interested in packaging and investing time into releasing his tools, so it stalled. Now that dub is part of the release distribution, it's simply: dub fetch dfmt dub run dfmt So there's essentially no big need to ship it in the release archives. Though Sociomantic has recently taken over the release process of dfmt and currently provides APT packages at bintray: https://bintray.com/dlang-community/apt/dfmt
Feb 21 2018
On Thu, 2018-02-22 at 07:00 +0000, Seb via Digitalmars-d wrote:[=E2=80=A6] Though Sociomantic has recently taken over the release process of=20 dfmt and currently provides APT packages at bintray: =20 https://bintray.com/dlang-community/apt/dfmtSo now we have both: http://d-apt.sourceforge.net/ and=20 https://bintray.com/dlang-community/apt Is now the time to discuss harmonising Debian support especially since there is a whole slew of stuff getting into the main Debian archive due to the efforts of the Debian D Language Group: pkg-d-devel lists.alioth.debian.org --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
Feb 22 2018