phan / phan/phan

Add an `exclude_directory_from_parse` config

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

Nobody has claimed this yet.

enhancement help wanted usability
Dominant language
PHP
Stars
5.6k
Forks
365
Avg merge
1h 25m
Merged PRs (30d)
6

Description

exclude_file_regex is an inefficient way to exclude directories, and regexes are inconvenient to set up for users.

Add exclude_directory_from_parse, which accepts a case-sensitive path and normalizes it. The parse phase should check if the directory which is about to be iterated over is listed in that config.

  • Warn if one of the folders didn't exclude anything

exclude_file_regex currently acts on the list of files, after the files in an (effectively excluded) directory are listed, which is inefficient

  • I hope to be able to change that to also act on directories while iterating

Contributor guide

Open the contributing guide

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 exclude_file_regex handling and the parse phase where directories are iterated. Add the normalized, case-sensitive directory configuration, skip matching directories before iteration, and warn when configured folders exclude nothing; verify the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.