objectionary / objectionary/lints

'private' attribute `a` has excessively broad scope necessitating new lint rule

Open
#1,100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Consider this example:

[] > foo
  42 >> a
  [] >> b
    a.plus 1 > c

Here, the scope of a is too broad. Since it's a "private" attribute, it can stay closer to its place of usage:

[] > foo
  [] >> b
    42 >> a
    a.plus 1 > c

Let's create a lint that can catch such situations.

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

No implementation file or test entry point is named. Start by locating the existing XMIR lint rules and their tests, then compare the two examples to define how a private attribute's scope is measured. Done means the new lint reports the broad-scope a case while accepting the narrowed version.

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.