aw-was-here commented on code in PR #291:
URL: https://github.com/apache/yetus/pull/291#discussion_r990368512
##########
precommit/src/main/shell/plugins.d/hadolint.sh:
##########
@@ -95,8 +91,8 @@ function hadolint_logic
args=(--no-color)
fi
- for i in "${HADOLINT_CHECKFILES[@]}"; do
- if [[ -f "${i}" ]]; then
+ for i in "${CHANGED_FILES[@]}"; do
+ if [[ "${i}" =~ Dockerfile ]] && [[ -f "${i}" ]]; then
Review Comment:
Yes. HADOLINT_CHECKFILES was basically everything that had Dockerfile in
the name. There is a slight performance penalty not prefiltering... but only
if there are no other files being excluded. As soon as exclusion is
introduced, a second loop is required and that quickly makes the perf diff a
negative since the exclusion list may actually be bigger than what is in the
patch!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]