adaalire

How to switch off -gnatyt in alr


I've just installed alr on Linux. Haven't used ada for about 10 years and found that gnat community is no longer supported. Entered the following program

with Ada.Text_IO;

procedure A02hello is
begin
   Ada.Text_IO.Put_Line("It works");
end A02hello;

Getting the following compilation warning

Compile
   [Ada]          a02hello.adb
a02hello.adb:5:24: (style) space required [-gnatyt]

If I change the put_line to

   Ada.Text_IO.Put_Line ("It works");

The warning disappears.

I looked up -gnatyt in https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gnat_ugn/Style-Checking.html . Says a space is required.

How do I switch off -gnatyt in alr.


Solution

  • You can turn off all checks:

    [build-switches]
    "*".style_checks = "No"
    

    Or, you can set your own style checks. I usually set line length to 120:

    "*".style_checks = ["-gnatyM120"]