Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`automated` visibility tokenized but not handled crashes the scan

Open Beginner friendly
#471 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
tooling

Research direction

Start with delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/node/VisibilityNodeImpl.java and the Visibility.java definition referenced in the issue. Run the provided Delphi example to reproduce the assertion, then verify that automated is recognized as a visibility and the scan completes without crashing.

Written by the indexing model from the issue text.

Description

bug triage
Prerequisites
  • This bug is in SonarDelphi, not SonarQube or my Delphi code.
  • This bug has not already been reported.
SonarDelphi version

unrelevant

Delphi version

unrelevant

SonarQube version

unrelevant

Issue description

Analyzing a piece of code that uses the automated keywork the scanner crashes with the following error:

...
java.lang.AssertionError: Visibility node has unexpected token type: AUTOMATED
...

This error traces back to the fact that the automated keyword is tokenized but never actually parsed to the correct visibility, that also needs to be implemented.

https://github.com/integrated-application-development/sonar-delphi/blob/f1b67ba83754fd1c4cc8fb7143df62dca351ac42/delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/node/VisibilityNodeImpl.java#L39-L50

https://github.com/integrated-application-development/sonar-delphi/blob/f1b67ba83754fd1c4cc8fb7143df62dca351ac42/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/ast/Visibility.java#L22-L29

Steps to reproduce

Analyze a piece of code that uses the automated keywork

Minimal Delphi code exhibiting the issue
interface

type
  TTriggerAutomatedVisibility = class
  automated
    procedure Foo;
  public
    procedure Bar;
  end;

implementation

procedure TTriggerAutomatedVisibility.Foo;
begin
end;

procedure TTriggerAutomatedVisibility.Bar;
begin
end;

end.
Dominant language
Java
Stars
159
Forks
33
Avg merge
4d 17h
Merged PRs (30d)
6

Getting set up

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.

More from integrated-application-development/sonar-delphi

All issues in integrated-application-development/sonar-delphi

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.