Thread overview
how to use clang-tidy with ldc2?
Dec 12, 2015
David
Dec 12, 2015
kinke
Dec 12, 2015
David
Dec 13, 2015
kinke
Dec 13, 2015
Russel Winder
December 12, 2015
Hi,

a pretty nooby question. I have ldc2 installed and realized that it contains clang-tiny and clang-format. However, how can I use clang-tiny and clang-format with ldc2 on a d-file?

Thanks, David
December 12, 2015
Hey there! The config files in the source tree are for the LDC codebase itself (since a couple of weeks). There's no such thing as an ldc-tidy/-format (yet).
December 12, 2015
On Saturday, 12 December 2015 at 22:01:40 UTC, kinke wrote:
> Hey there! The config files in the source tree are for the LDC codebase itself (since a couple of weeks). There's no such thing as an ldc-tidy/-format (yet).

Thanks for the quick reply. Looking forward to seeing it (maybe) one day :-)
December 13, 2015
Actually, a formatting tool would only need a D parser to get hold of the AST, so a LDC-specific thingy is not realistic (LDC translates the D AST provided by the official front-end to LLVM IR). You may want to have a look at dfmt (https://github.com/Hackerpilot/dfmt).
December 13, 2015
On Sat, 2015-12-12 at 23:07 +0000, David via digitalmars-d-ldc wrote:
> On Saturday, 12 December 2015 at 22:01:40 UTC, kinke wrote:
> > Hey there! The config files in the source tree are for the LDC codebase itself (since a couple of weeks). There's no such thing as an ldc-tidy/-format (yet).
> 
> Thanks for the quick reply. Looking forward to seeing it (maybe) one day :-)

Maybe you need Dfmt?

https://github.com/Hackerpilot/dfmt


-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder