Class: Dash::Dockerfile::Rules::DockerignoreGaps
- Inherits:
-
Base
- Object
- Base
- Dash::Dockerfile::Rules::DockerignoreGaps
- Defined in:
- lib/dash/dockerfile/rules/dockerignore_gaps.rb
Overview
A .dockerignore that misses the obvious offenders. .git is always worth naming; the rest only when the directory actually exists in the context.
Constant Summary collapse
- ALWAYS =
".git".freeze
- WHEN_PRESENT =
%w[ node_modules tmp storage coverage log .env* ].freeze
- SUGGESTION =
"add them to .dockerignore so they are not sent to the builder"
Instance Method Summary collapse
Instance Method Details
#findings ⇒ Object
8 9 10 11 12 13 |
# File 'lib/dash/dockerfile/rules/dockerignore_gaps.rb', line 8 def findings return [] if dockerignore.nil? return [] if (gaps = gaps()).empty? [ finding(severity, Dash::Dockerfile::Dockerignore::FILENAME, (gaps), SUGGESTION) ] end |