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
<code>with Ada.Text_IO;
procedure A02hello is
begin
Ada.Text_IO.Put_Line("It works");
end A02hello;
</code>
<code>with Ada.Text_IO;
procedure A02hello is
begin
Ada.Text_IO.Put_Line("It works");
end A02hello;
</code>
with Ada.Text_IO;
procedure A02hello is
begin
Ada.Text_IO.Put_Line("It works");
end A02hello;
Getting the following compilation warning
<code>Compile
[Ada] a02hello.adb
a02hello.adb:5:24: (style) space required [-gnatyt]
</code>
<code>Compile
[Ada] a02hello.adb
a02hello.adb:5:24: (style) space required [-gnatyt]
</code>
Compile
[Ada] a02hello.adb
a02hello.adb:5:24: (style) space required [-gnatyt]
If I change the put_line to
<code> Ada.Text_IO.Put_Line ("It works");
</code>
<code> Ada.Text_IO.Put_Line ("It works");
</code>
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.
You can turn off all checks:
<code>[build-switches]
"*".style_checks = "No"
</code>
<code>[build-switches]
"*".style_checks = "No"
</code>
[build-switches]
"*".style_checks = "No"
Or, you can set your own style checks. I usually set line length to 120:
<code>"*".style_checks = ["-gnatyM120"]
</code>
<code>"*".style_checks = ["-gnatyM120"]
</code>
"*".style_checks = ["-gnatyM120"]
2