JetBrains / JetBrains/idea-gitignore

Annotations for .dockerignore root directory

Open
#698 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Kotlin
Stars
1.3k
Forks
176
PR merge metrics
No merged PRs in 30d

Description

### Prerequisites

* [X] Plugin is in the latest version
* [X] Issue was not reported yet
* [ ] Stack trace (if provided) contains `mobi.hsz.idea.gitignore` package name

### Description
It would be nice to have some way to tell plugin, which directory is considered to be "root" for edited `.dockerignore` file.
Sometimes, Dockerfiles and corespoinding .dockerignore files are organized in project subdirectories. When editing such file, file/directory entries are being reported as non-existent ("XYZ entry is never used") - plugin looks into location of `.dockerignore` file, not to directory where actual build is executed - i.e.:
```bash
docker build -f docker/backend.Dockerfile .
```
Some form of annotation provided via comment could be used, to tell plugin. which directory is actual build root - i.e.
```
# root ../..
node_modules
...
```

**Expected behavior:**

Some way to tell plugin to look to different directory.

**Actual behavior:**

No way (at least none documented)

### Versions

**Plugin:**
```
4.1.0
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the warning with the `.dockerignore` beside `docker/backend.Dockerfile` and the command `docker build -f docker/backend.Dockerfile .`. Review how the plugin resolves entries relative to `.dockerignore`, since no implementation file or test is named. Done means a documented way to select the actual build root and correct handling of entries such as `node_modules`.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.