AdaCore / AdaCore/gnatstudio

Idea: suggestion for missing "with Ada.Strings.Fixed" and "Ada.Characters.Handling"

Open
#171 1 comment 0 reactions 1 assignee View on GitHub

@AnthonyLeonardoGracio is already working on this.

Since Apr 11, 2024.

enhancement
Dominant language
Ada
Stars
531
Forks
65
PR merge metrics
No merged PRs in 30d

Description

When you write a "Put_Line" without a "with Ada.Text_IO;", GNAT suggests, and GNAT provides the "wrench" for it, to add "with Ada.Text_IO; use with Ada.Text_IO;". It is super useful.
In a similar way, I have more than often, since decades, the case where "To_Lower", "To_Upper" or "Trim" are not known to GNAT.
It would be extremely cool to have a similar suggestion with an auto-fix with
"with Ada.Characters.Handling; use Ada.Characters.Handling;"
and
"with Ada.Strings.Fixed; use Ada.Strings, Ada.Strings.Fixed;"
depending on those function names (and perhaps others).
Especially, "Ada.Characters.Handling" is not an obvious place to search for "To_Lower" and "To_Upper", so it would be welcoming for beginners.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.