objectionary / objectionary/lints

Linter fails to catch undefined objects and attributes in the code

Open
#682 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug good-title help wanted
Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

This is my code:

[n] > app
  QQ.io.stdout > @
    QQ.txt.sprintf *1
      "Hello, %s!"
      foo

Here, foo is not defined in the app object and there is no @ attribute in app. Obviously, it's a wrong reference to an object. Lints can catch this, but currently they don't. I'm getting this, in runtime:

Couldn't find object 'Φ.org.eolang.foo' because there's no class or package 'EOorg.EOeolang.EOfoo'

Let's create a lint for this.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the existing linter implementations and their tests in this repository, then trace how object and attribute references are represented in XMIR. Reproduce the example from the issue and identify where undefined references are checked. Done means the linter reports both the missing foo object and missing @ attribute before runtime, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.