phan/phan

Add an `exclude_directory_from_parse` config

Open

#849 opened on Jun 8, 2017

View on GitHub
 (1 comment) (0 reactions) (0 assignees)PHP (5,455 stars) (373 forks)batch import
enhancementhelp wantedusability

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

Add an `exclude_directory_from_parse` config · phan/phan#849 | Good First Issue