Skip to content

Need support to scan dot-folders (folders with leading dot) #41

@vakuor

Description

@vakuor

Problem
Currently, the scanner in src/scanner.ts contains a hard limitation:

entry.name.startsWith(".")

This check completely excludes all files and folders whose name begins with a dot. Because of this, folders like .source/, .config/ etc. are never scanned.

Use case
I have a project where important source code from libraries lives inside a folder called .source. I cannot rename that folder and I need CodeSight to scan this folder, but currently there is no way to include it.

Suggested solution
It would be very useful to support including dot-folders through the ignore mechanism, similar to how .gitignore works.

Proposed options:

  1. Support negation with ! in .codesightignore:
# ignore everything starting with dot
.*
# but explicitly include needed folders
!.source
!.config
  1. Add a configuration option (in codesight.config.json or similar) to allow dot-files/folders globally:
{
  "scanDotFiles": true,
  "scanDotFolders": true,
  "ignorePatterns": ["!.source*"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions