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

Improve code reference scan with indirect flag references

Open
#9 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Locate the Python code-reference scan and read its current regex-based implementation; no file or test path is named in the issue. Review Python's ast documentation and trace how direct flag references are reported. Done means indirect calls such as is__premium_support__enabled are found at every use while direct references remain covered.

Written by the indexing model from the issue text.

Description

While some regex'ing was all it took for a successful PoC, there are valid ways of referencing feature flags we still don't cover.

For example (thanks @khvn26 for pointing out), https://github.com/Flagsmith/flagsmith/pull/6970 introduces a function that will make flag references indirect:

def is__premium_support__enabled(organisation):
    return client.is_flag_enabled("premium_support")  # This is found in the scan.

def the_actual_business_function():
    if is__premium_support__enabled(org):  # This is a more important reference, but isn't found.
        ...

def another_function():
    if is__premium_support__enabled(org):  # Multiple uses of the flag stay hidden!
        ...

Acceptance criteria

  • The code references scan covers for indirection such as the above.

Might be a good idea to look into ast.

Dominant language
Python
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

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 Flagsmith/ci

All issues in Flagsmith/ci

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.