objectionary / objectionary/lints

`long-live-object` lint is not implemented

Open
#796 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

How about we create a lint that would catch objects, located too far from their usages. In this program, f can be moved closer to its usage:

[] > app
  foo 42 > f
  … # some statements here
  52.plus f > r

The lint should be able to accept maxObjectLifetime parameter. If its bigger than predefined threshold, the defect with warning severity should be generated.

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 file, test, or entry point is named. Start by reading existing lint implementations and how they accept configuration parameters, then trace how object locations and usages are represented. Done means a long-live-object lint reports warning-severity defects when the configurable maxObjectLifetime threshold is exceeded, while recognizing the example’s movable object.

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
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.