Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
Aegdesil opened this issue May 7, 2020 · 2 comments
Open
2 of 3 tasks

Comments

@Aegdesil
Copy link

Aegdesil commented May 7, 2020

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
@AKorezin
Copy link

Additional example

Directories

/node_modules/
/packages/sample/node_modules/
/packages/another_package/node_modules/
/@custom/package/node_modules/
/@types/for_other_package/node_modules/

Can be ignored by file

**/node_modules/

or by

/node_modules/
/packages/*/node_modules/
/@custom/*/node_modules/
/@types/*/node_modules/

or by

/node_modules/
/*/*/node_modules/

@AKorezin
Copy link

@hsz should I create another issue about handling **/ syntax by IgnoreUnusedEntryInspection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants