Skip to content

Default templates for .dockerignore do not ignore some files and folders in subdirectories #625

@Aegdesil

Description

@Aegdesil

Prerequisites

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

Description

When generating a .dockerignore file using the default templates, some files and folders that are not at the root path are not excluded when they should.
As per the docs, the pattern filename only excludes files that are present at the root directory, not in the subdirectories. This is also the case for ignored directories. Note that .gitignore uses different rules for its pattern matching and these files and folders are ignored in all subdirectories.

Steps to Reproduce

  1. Generate a new .dockerignore file
  2. Add the macOS template
  3. It contains the pattern .DS_Store, instead of **/.DS_Store

Note that the macOS template is not the only one concerned by this issue, all templates that use the pattern path instead of **/path for files and folders that can be found in subdirectories are concerned.

Expected behavior:

The default templates should prefix all patterns for files and folders that are not only found at the root of the project by **/

Actual behavior:

Some default templates do not use the correct pattern.

Versions

Plugin:

3.2.3

IDE:

WebStorm 2020.1
Build #WS-201.6668.106, built on April 6, 2020
Runtime version: 11.0.6+8-b765.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
Non-Bundled Plugins: DBN, mobi.hsz.idea.gitignore, ru.adelf.idea.dotenv

OS:

macOS v10.15.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions