From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.156.201 with SMTP id t192mr5704142ywg.127.1506383023682; Mon, 25 Sep 2017 16:43:43 -0700 (PDT) X-Received: by 10.157.61.196 with SMTP id l62mr115597otc.17.1506383023614; Mon, 25 Sep 2017 16:43:43 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!q8no3273444qtb.0!news-out.google.com!194ni54itf.0!nntp.google.com!o200no65546itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 25 Sep 2017 16:43:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.37; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.37 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to check code indentation? From: Anh Vo Injection-Date: Mon, 25 Sep 2017 23:43:43 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 850070193 X-Received-Bytes: 2288 Xref: news.eternal-september.org comp.lang.ada:48225 Date: 2017-09-25T16:43:43-07:00 List-Id: On Monday, September 25, 2017 at 4:10:33 PM UTC-7, Victor Porton wrote: > Victor Porton wrote: > > > I have a source code where some declarations or statements are indented > > wrongly. An example: > > > > function raptor_namespaces_find_namespace (Stack: > > Namespace_Stack_Handle; > > Prefix: chars_ptr; > > Len: int) > > return Namespace_Handle > > with Import, Convention=>C; > > > > ("Prefix" is not below "Stack" but two spaces are extraneous.) > > > > I use -gnaty3 but weirdly GNAT 7.2.0 does not detect this error. > > > > Is there any free tool to check (or even better automatically correct) Ada > > (preferably Ada2012) indentation? > > Hm, GNAT GPS does (however sometimes wrong) Ada code reformatting when > pressing Tab key. > > Can it be scripted in some way to do Ada reformatting automatically for a > set of source files? Have you looked at gnatpp command? Anh Vo