Skip to content

feat: add env support for controlling indexing of dotfiles#10

Merged
giancarloerra merged 1 commit intogiancarloerra:mainfrom
midweste:midweste-dotfiles
Mar 18, 2026
Merged

feat: add env support for controlling indexing of dotfiles#10
giancarloerra merged 1 commit intogiancarloerra:mainfrom
midweste:midweste-dotfiles

Conversation

@midweste
Copy link
Copy Markdown
Contributor

Summary

Add INCLUDE_DOT_FILES environment variable to control whether dot-directories (e.g. .agent, .config) are included during indexing. By default, dot-directories remain excluded to preserve existing behavior.

Changes

  • Modified src/services/indexer.ts: read INCLUDE_DOT_FILES env var and pass it to the glob dot option (previously hardcoded to false)
  • Updated README.md: added INCLUDE_DOT_FILES to the "Respects ignore rules" feature bullet and to the Indexing Behavior env var table
  • Added 4 unit tests in tests/unit/indexer.test.ts covering default exclusion, true inclusion, case-insensitivity, and rejection of non-true values

Type of change

  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Test coverage improvement

Testing

  • Unit tests pass (npm run test:unit)
  • Integration tests pass (npm run test:integration) — if applicable
  • TypeScript compiles cleanly (npx tsc --noEmit)
  • New tests added for new/changed functionality

Checklist

  • My code follows the existing code style and conventions
  • I have added/updated JSDoc comments where appropriate
  • I have updated documentation (README.md / DEVELOPER.md) if needed
  • I have read the Contributing Guide
  • I agree to the Contributor License Agreement

Related issues

None

@midweste midweste marked this pull request as ready for review March 17, 2026 12:14
@midweste
Copy link
Copy Markdown
Contributor Author

May consider making dot files included by default. Since gitignore is already respected it seems anything that is in a dotfile or dotfolder is likely part of the codebase that could benefit from indexing.

@giancarloerra giancarloerra self-assigned this Mar 18, 2026
@giancarloerra
Copy link
Copy Markdown
Owner

May consider making dot files included by default. Since gitignore is already respected it seems anything that is in a dotfile or dotfolder is likely part of the codebase that could benefit from indexing.

Potentially good idea, at the moment I think it is better to be overcautious and offer the option in the configuration as you've done it here.

@giancarloerra giancarloerra merged commit 0c45ed9 into giancarloerra:main Mar 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants