Skip to content

Negation patterns (!) in .codesightignore currently behave differently from .gitignore #42

@vakuor

Description

@vakuor

Negation patterns (!) in .codesightignore currently behave differently from .gitignore. This makes it impossible to properly exclude and then re-include specific folders/files.

Example
Project structure:

codesight-project-root/
├── .codesightignore
├── .codesight/
└── .source/
    ├── notignoredfile.js
    └── testfolder/
        └──  ignoredfile.js

.codesightignore contents:

.source/testfolder/*
.source/testfolder*
.source/testfolder
!.source

Expected behavior

  • The folder .source/testfolder and all its contents should be ignored.
  • The root .source folder and files recursively (except testfolder) inside it (e.g. notignoredfile.js) should not be ignored.

Actual behavior
The whole .source folder is NOT ignored. As a result folders .source/testfolder or .source/.vs or .source/.git ARE scanned.

Related issue: #41

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