Ignore subdirectories pattern
- Dominant language
- Go
- Stars
- 886
- Forks
- 194
- PR merge metrics
- No merged PRs in 30d
Description
Hey folks,
Is there any way to ignore subdirectories based on the directory name? We currently have a lerna monorepo and I find it difficult to exclude multiple `node_modules` folders.
The optimal would be to use it like this
```
addlicense -c "Neo4j Inc." -f license.txt -check ./**/*.{js,ts,css} -ignore **/node_modules/*
```
but it doesn't seem to work.
The directories also are in the following tree structure
```
.
├── CONTRIBUTING.md
├── README.md
├── lerna.json
├── license.js
├── license.txt
├── node_modules
├── package.json
├── packages
│ ├── base
│ │ ├── node_modules
│ │ ├── package.json
│ │ ├── src
│ ├── html-storybook
│ │ ├── node_modules
│ │ ├── package.json
│ ├── react
│ │ ├── node_modules
│ │ ├── package.json
│ │ ├── src
│ │ └── tsconfig.json
│ └── react-storybook
│ ├── node_modules
│ ├── package.json
│ └── src
├── tsconfig.json
└── yarn.lock
```
Contributor guide
Research direction
Start by tracing how the addlicense command expands recursive directory patterns and applies the -ignore option. Reproduce the lerna-style tree with nested node_modules directories and test the reported command. Done means directory-name patterns such as **/node_modules/* reliably exclude those subdirectories while other matching files are still scanned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100