This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/main by this push:
new 6992de4 YETUS-1119. Update dependencies (#222)
6992de4 is described below
commit 6992de4fe8772b6a163cbcc74c28138fc577943a
Author: Allen Wittenauer <[email protected]>
AuthorDate: Fri Oct 8 00:24:06 2021 -0700
YETUS-1119. Update dependencies (#222)
---
.codespellignorelines | 2 +-
.github/workflows/yetus.yml | 1 +
Dockerfile | 2 +-
asf-site-src/Dockerfile | 22 ++--
asf-site-src/Gemfile.lock | 86 +++++++------
asf-site-src/config.rb | 4 -
pom.xml | 10 +-
precommit/src/main/python/jenkins-admin.py | 29 +++--
precommit/src/main/shell/buildkite-recovery.sh | 3 +-
precommit/src/main/shell/core.d/change-analysis.sh | 2 +-
precommit/src/main/shell/core.d/docker.sh | 2 +
precommit/src/main/shell/docker-cleanup.sh | 3 +-
precommit/src/main/shell/github-status-recovery.sh | 3 +-
precommit/src/main/shell/plugins.d/shelldocs.sh | 4 +-
precommit/src/main/shell/smart-apply-patch.sh | 6 +-
.../src/main/shell/test-patch-docker/Dockerfile | 141 +++++++++++++--------
.../test-patch-docker/Dockerfile.patchspecific | 12 +-
.../shell/test-patch-docker/launch-test-patch.sh | 1 +
precommit/src/main/shell/test-patch.sh | 11 +-
release/build-and-sign.sh | 2 +-
release/initial-patches.sh | 2 +-
release/update-doc-versions.sh | 2 +-
releasedocmaker/src/main/python/releasedocmaker.py | 1 +
shelldocs/src/main/python/shelldocs.py | 18 +--
24 files changed, 206 insertions(+), 163 deletions(-)
diff --git a/.codespellignorelines b/.codespellignorelines
index fa991af..399bd3c 100644
--- a/.codespellignorelines
+++ b/.codespellignorelines
@@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
rouge (~> 3.2)
- rouge (3.23.0)
+ rouge (3.26.1)
unless FileUtils.uptodate?(output, docs) &&
FileUtils.uptodate?(output, [SHELLDOCS])
diff --git a/.github/workflows/yetus.yml b/.github/workflows/yetus.yml
index 8a6b908..81e04ef 100644
--- a/.github/workflows/yetus.yml
+++ b/.github/workflows/yetus.yml
@@ -52,6 +52,7 @@ jobs:
--plugins=all
--proclimit=2000
--project=yetus
+ --spotbugs-home=/opt/spotbugs
--tests-filter=checkstyle,javadoc,rubocop,test4tests
- name: Artifact output
if: ${{ always() }}
diff --git a/Dockerfile b/Dockerfile
index 56d9190..573571a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,7 @@ COPY entrypoint.sh /entrypoint.sh
RUN chmod a+rx /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
-# hadolint ignore=DL3003
+# hadolint ignore=DL3003,DL3059
RUN cd /ysrc \
&& mvn clean install -DskipTests \
&& rm -rf /.m2 \
diff --git a/asf-site-src/Dockerfile b/asf-site-src/Dockerfile
index 70aaee8..6ce0d39 100644
--- a/asf-site-src/Dockerfile
+++ b/asf-site-src/Dockerfile
@@ -44,10 +44,12 @@ RUN apt-get -q update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
+# hadolint disable=DL3059
RUN echo "export GPG_TTY=\$(tty)" >> /root/.bashrc
-RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}"
-RUN useradd -g "${GROUP_ID}" -u "${USER_ID}" -k /root -m "${USER_NAME}"
-# shellcheck disable=SC2039,SC1117
+# hadolint disable=DL3059
+RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}" \
+ && useradd -l -g "${GROUP_ID}" -u "${USER_ID}" -k /root -m "${USER_NAME}"
+# hadolint disable=DL3059,SC2039,SC1117
RUN echo -e "${USER_NAME}\\tALL=NOPASSWD: ALL" >
"/etc/sudoers.d/yetus-build-${USER_ID}"
ENV HOME /home/${USER_NAME}
@@ -59,28 +61,26 @@ ENV APACHE_RUN_DIR /tmp/website/rundir
ENV APACHE_RUN_USER ${USER_NAME}
ENV APACHE_RUN_GROUP ${USER_NAME}
+# hadolint ignore=DL3013
RUN mkdir -p /tmp/website/{logdir,rundir} \
&& chown -R ${USER_ID}:${GROUP_ID} /var/www/html /tmp/website \
&& ln -s /var/www/html /tmp/website/html \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf \
&& sed -i "s,Listen 80,Listen 8123," /etc/apache2/ports.conf \
- && sed -i "s,:80,:8123," /etc/apache2/sites-available/000-default.conf
-
-# there is no version to pin here, so....
-# hadolint ignore=DL3013
-RUN pip3 install git+https://github.com/linkchecker/linkchecker.git
+ && sed -i "s,:80,:8123," /etc/apache2/sites-available/000-default.conf \
+ && pip3 install --no-cache-dir
git+https://github.com/linkchecker/linkchecker.git
USER ${USER_NAME}
-RUN bundle config --global github.https true
-RUN bundle config --global path "${BUNDLE_PATH}"
+RUN bundle config --global github.https true \
+ && bundle config --global path "${BUNDLE_PATH}"
ENV GEM_HOME ${BUNDLE_PATH}
# pre-install most of the middleman stack to save time
# on re-launches
# hadolint ignore=DL3028
RUN gem install bundler \
- middleman:'4.3.11' \
+ middleman:'4.4.0' \
middleman-livereload \
middleman-syntax \
nokogiri:1.10.10 \
diff --git a/asf-site-src/Gemfile.lock b/asf-site-src/Gemfile.lock
index bb91cb2..cfa9ad5 100644
--- a/asf-site-src/Gemfile.lock
+++ b/asf-site-src/Gemfile.lock
@@ -9,19 +9,20 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- activesupport (5.2.4.4)
+ activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (>= 0.7, < 2)
- minitest (~> 5.1)
- tzinfo (~> 1.1)
- addressable (2.7.0)
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
+ addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
- backports (3.18.2)
+ backports (3.21.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
- concurrent-ruby (1.1.7)
+ concurrent-ruby (1.1.9)
contracts (0.13.0)
dotenv (2.7.6)
em-websocket (0.5.2)
@@ -29,20 +30,20 @@ GEM
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.2.7)
- execjs (2.7.0)
- fast_blank (1.0.0)
- fastimage (2.2.0)
- ffi (1.13.1)
- haml (5.2.0)
+ execjs (2.8.1)
+ fast_blank (1.0.1)
+ fastimage (2.2.5)
+ ffi (1.15.4)
+ haml (5.2.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.6.0)
http_parser.rb (0.6.0)
- i18n (0.9.5)
+ i18n (1.6.0)
concurrent-ruby (~> 1.0)
- kramdown (2.3.0)
+ kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
@@ -51,19 +52,19 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
memoist (0.16.2)
- middleman (4.3.11)
+ middleman (4.4.0)
coffee-script (~> 2.2)
haml (>= 4.0.5)
kramdown (>= 2.3.0)
- middleman-cli (= 4.3.11)
- middleman-core (= 4.3.11)
- middleman-cli (4.3.11)
+ middleman-cli (= 4.4.0)
+ middleman-core (= 4.4.0)
+ middleman-cli (4.4.0)
thor (>= 0.17.0, < 2.0)
- middleman-core (4.3.11)
- activesupport (>= 4.2, < 6.0)
- addressable (~> 2.3)
+ middleman-core (4.4.0)
+ activesupport (>= 6.1, < 7.0)
+ addressable (~> 2.4)
backports (~> 3.6)
- bundler
+ bundler (~> 2.0)
contracts (~> 0.13.0)
dotenv
erubis
@@ -72,38 +73,40 @@ GEM
fastimage (~> 2.0)
hamster (~> 3.0)
hashie (~> 3.4)
- i18n (~> 0.9.0)
+ i18n (~> 1.6.0)
listen (~> 3.0.0)
memoist (~> 0.14)
- padrino-helpers (~> 0.13.0)
+ padrino-helpers (~> 0.15.0)
parallel
rack (>= 1.4.5, < 3)
sassc (~> 2.0)
servolux
tilt (~> 2.0.9)
+ toml
uglifier (~> 3.0)
- middleman-livereload (3.4.6)
+ webrick
+ middleman-livereload (3.4.7)
em-websocket (~> 0.5.1)
middleman-core (>= 3.3)
rack-livereload (~> 0.3.15)
- minitest (5.14.2)
- padrino-helpers (0.13.3.4)
- i18n (~> 0.6, >= 0.6.7)
- padrino-support (= 0.13.3.4)
+ minitest (5.14.4)
+ padrino-helpers (0.15.1)
+ i18n (>= 0.6.7, < 2)
+ padrino-support (= 0.15.1)
tilt (>= 1.4.1, < 3)
- padrino-support (0.13.3.4)
- activesupport (>= 3.1)
- parallel (1.19.2)
+ padrino-support (0.15.1)
+ parallel (1.21.0)
+ parslet (2.0.0)
public_suffix (4.0.6)
rack (2.2.3)
rack-livereload (0.3.17)
rack
- rb-fsevent (0.10.4)
+ rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
ref (2.0.0)
- rexml (3.2.4)
- rouge (3.23.0)
+ rexml (3.2.5)
+ rouge (3.26.1)
sassc (2.4.0)
ffi (~> 1.9)
servolux (0.13.0)
@@ -111,13 +114,16 @@ GEM
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
- thor (1.0.1)
- thread_safe (0.3.6)
+ thor (1.1.0)
tilt (2.0.10)
- tzinfo (1.2.7)
- thread_safe (~> 0.1)
+ toml (0.3.0)
+ parslet (>= 1.8.0, < 3.0.0)
+ tzinfo (2.0.4)
+ concurrent-ruby (~> 1.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
+ webrick (1.7.0)
+ zeitwerk (2.4.2)
PLATFORMS
ruby
@@ -132,4 +138,4 @@ DEPENDENCIES
wdm (~> 0.1.0)
BUNDLED WITH
- 2.1.4
+ 2.2.27
diff --git a/asf-site-src/config.rb b/asf-site-src/config.rb
index 543f1de..7e25555 100644
--- a/asf-site-src/config.rb
+++ b/asf-site-src/config.rb
@@ -60,10 +60,6 @@ page '.htaccess.apache', layout: false
# classes needed to publish our api docs
class CopyInPlaceResource < ::Middleman::Sitemap::Resource
- def initialize(sitemap, dest, src)
- super(sitemap, dest, src)
- end
-
def binary?
true
end
diff --git a/pom.xml b/pom.xml
index 4ce5f1e..f1e75f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,13 +64,13 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
- <checkstyle.version>8.36</checkstyle.version>
- <commons.io.version>2.6</commons.io.version>
+ <checkstyle.version>9.0</checkstyle.version>
+ <commons.io.version>2.7</commons.io.version>
<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
<jdiff.version>1.0.9</jdiff.version>
- <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
-
<maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
- <spotbugs-maven-plugin.version>4.0.4</spotbugs-maven-plugin.version>
+ <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
+
<maven-project-info-reports-plugin.version>3.1.2</maven-project-info-reports-plugin.version>
+ <spotbugs-maven-plugin.version>4.4.1</spotbugs-maven-plugin.version>
<sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor>
diff --git a/precommit/src/main/python/jenkins-admin.py
b/precommit/src/main/python/jenkins-admin.py
index 18679fd..f193adf 100755
--- a/precommit/src/main/python/jenkins-admin.py
+++ b/precommit/src/main/python/jenkins-admin.py
@@ -20,6 +20,11 @@
#
""" Process patch file attachments from JIRA using a query """
+#
+# we actually want native encoding so tell pylint to be quiet
+#
+# pylint: disable=unspecified-encoding
+
from argparse import ArgumentParser
from tempfile import NamedTemporaryFile
from xml.etree import ElementTree
@@ -155,14 +160,15 @@ def main(): #pylint: disable=too-many-branches,
too-many-statements, too-many-l
# Handle the version string right away and exit
if options.release_version:
- with open(os.path.join(os.path.dirname(__file__), "../../VERSION"),
- 'r') as ver_file:
+ with open(
+ os.path.join(os.path.dirname(__file__), "..", "..",
+ "VERSION")) as ver_file:
print(ver_file.read())
sys.exit(0)
token_frag = ''
if options.jenkinsToken:
- token_frag = 'token=%s' % options.jenkinsToken
+ token_frag = f'token={options.jenkinsToken}'
else:
token_frag = 'token={project}-token'
if not options.jiraFilter:
@@ -180,22 +186,21 @@ def main(): #pylint: disable=too-many-branches,
too-many-statements, too-many-l
parser.error('Invalid Jenkins Url Override: ' + override)
(project, url) = override.split('=', 1)
jenkinsurloverrides[project.upper()] = url
- tempfile = NamedTemporaryFile(delete=False)
+ tempfile = NamedTemporaryFile(delete=False) # pylint:
disable=consider-using-with
try:
jobloghistory = None
if not options.jenkinsInit:
+ lsb = 'lastSuccessfulBuild/artifact/patch_tested.txt'
+ lcb = 'lastCompletedBuild/artifact/patch_tested.txt'
jobloghistory = http_get(
- options.jenkinsurl +
- '/job/%s/lastSuccessfulBuild/artifact/patch_tested.txt' %
- options.jenkinsJobName, True)
+ f'{options.jenkinsurl}/job/{options.jenkinsJobName}/{lsb}',
+ True)
# if we don't have a successful build available try the last build
if not jobloghistory:
jobloghistory = http_get(
- options.jenkinsurl +
- '/job/%s/lastCompletedBuild/artifact/patch_tested.txt' %
- options.jenkinsJobName)
+ f'{options.jenkinsurl}/job/{options.jenkinsJobName}/{lcb}')
jobloghistory = jobloghistory.strip().split('\n')
if 'TESTED ISSUES' not in jobloghistory[0]:
print(
@@ -205,7 +210,7 @@ def main(): #pylint: disable=too-many-branches,
too-many-statements, too-many-l
# we are either going to write a new one or rewrite the old one
- joblog = open('patch_tested.txt', 'w+')
+ joblog = open('patch_tested.txt', 'w+') # pylint:
disable=consider-using-with
if jobloghistory:
if len(jobloghistory) > options.history:
@@ -242,7 +247,7 @@ def main(): #pylint: disable=too-many-branches,
too-many-statements, too-many-l
# submit job
- jobname = '%s-%s,%s' % (project, issue, attachment)
+ jobname = f'{project}-{issue},{attachment}'
if not jobloghistory or jobname not in jobloghistory:
print(jobname + ' has not been processed, submitting')
joblog.write(jobname + '\n')
diff --git a/precommit/src/main/shell/buildkite-recovery.sh
b/precommit/src/main/shell/buildkite-recovery.sh
index 74463f8..4e9f531 100755
--- a/precommit/src/main/shell/buildkite-recovery.sh
+++ b/precommit/src/main/shell/buildkite-recovery.sh
@@ -46,8 +46,7 @@ function import_core
declare filename
for filename in "${BINDIR}/core.d"/*; do
- # shellcheck disable=SC1091
- # shellcheck source=core.d/01-common.sh
+ # shellcheck source=SCRIPTDIR/core.d/01-common.sh
. "${filename}"
done
}
diff --git a/precommit/src/main/shell/core.d/change-analysis.sh
b/precommit/src/main/shell/core.d/change-analysis.sh
index 877d711..079c5f2 100755
--- a/precommit/src/main/shell/core.d/change-analysis.sh
+++ b/precommit/src/main/shell/core.d/change-analysis.sh
@@ -172,7 +172,7 @@ function exclude_paths_from_changed_files
if [[ -f "${EXCLUDE_PATHS_FILE_SAVEOFF}" ]]; then
EXCLUDE_PATHS_FILE=$(yetus_abs "${EXCLUDE_PATHS_FILE_SAVEOFF}")
elif [[ -f "${BASEDIR}/${EXCLUDE_PATHS_FILE_SAVEOFF}" ]]; then
- EXCLUDE_PATHS_FILE=$(yetus_abs
"${BASEDIR}/${EEXCLUDE_PATHS_FILE_SAVEOFF}")
+ EXCLUDE_PATHS_FILE=$(yetus_abs
"${BASEDIR}/${EXCLUDE_PATHS_FILE_SAVEOFF}")
fi
# if it exists, process, otherwise just return because nothing
diff --git a/precommit/src/main/shell/core.d/docker.sh
b/precommit/src/main/shell/core.d/docker.sh
index 7d44c0c..8e18199 100755
--- a/precommit/src/main/shell/core.d/docker.sh
+++ b/precommit/src/main/shell/core.d/docker.sh
@@ -707,6 +707,7 @@ function docker_run_image
fi
fi
+ # shellcheck disable=SC2030
(
if [[ -z "${lines}" ]]; then
cat "${DOCKERFILE}"
@@ -715,6 +716,7 @@ function docker_run_image
fi
) > "${buildfile}"
+ # shellcheck disable=SC2031
if [[ ${lines} -gt 0 ]]; then
if [[ "${DOCKER_VERSION[0]}" -lt 1 ]] || \
[[ "${DOCKER_VERSION[0]}" -lt 2 && "${DOCKER_VERSION[1]}" -lt 38 ]];
then
diff --git a/precommit/src/main/shell/docker-cleanup.sh
b/precommit/src/main/shell/docker-cleanup.sh
index 09b5096..910c7f5 100755
--- a/precommit/src/main/shell/docker-cleanup.sh
+++ b/precommit/src/main/shell/docker-cleanup.sh
@@ -61,8 +61,7 @@ function import_core
declare filename
for filename in "${BINDIR}/core.d"/*; do
- # shellcheck disable=SC1091
- # shellcheck source=core.d/01-common.sh
+ # shellcheck source=SCRIPTDIR/core.d/01-common.sh
. "${filename}"
done
}
diff --git a/precommit/src/main/shell/github-status-recovery.sh
b/precommit/src/main/shell/github-status-recovery.sh
index 97bf95a..b03732b 100755
--- a/precommit/src/main/shell/github-status-recovery.sh
+++ b/precommit/src/main/shell/github-status-recovery.sh
@@ -47,8 +47,7 @@ function import_core
declare filename
for filename in "${BINDIR}/core.d"/*; do
- # shellcheck disable=SC1091
- # shellcheck source=core.d/01-common.sh
+ # shellcheck source=SCRIPTDIR/core.d/01-common.sh
. "${filename}"
done
}
diff --git a/precommit/src/main/shell/plugins.d/shelldocs.sh
b/precommit/src/main/shell/plugins.d/shelldocs.sh
index f0c0dc7..b44117a 100755
--- a/precommit/src/main/shell/plugins.d/shelldocs.sh
+++ b/precommit/src/main/shell/plugins.d/shelldocs.sh
@@ -118,7 +118,7 @@ function shelldocs_preapply
pushd "${BASEDIR}" >/dev/null || return 1
for i in $(shelldocs_private_findbash); do
if [[ -f ${i} ]]; then
- "${SHELLDOCS}" --input "${i}" --lint >>
"${PATCH_DIR}/branch-shelldocs-result.txt"
+ "${SHELLDOCS}" --input "${i}" --lint >>
"${PATCH_DIR}/branch-shelldocs-result.txt" 2>&1
fi
done
popd > /dev/null || return 1
@@ -148,7 +148,7 @@ function shelldocs_postapply
# we re-check this in case one has been added
for i in $(shelldocs_private_findbash); do
if [[ -f ${i} ]]; then
- "${SHELLDOCS}" --input "${i}" --lint >>
"${PATCH_DIR}/patch-shelldocs-result.txt"
+ "${SHELLDOCS}" --input "${i}" --lint >>
"${PATCH_DIR}/patch-shelldocs-result.txt" 2>&1
fi
done
diff --git a/precommit/src/main/shell/smart-apply-patch.sh
b/precommit/src/main/shell/smart-apply-patch.sh
index 430f1ac..01af8db 100755
--- a/precommit/src/main/shell/smart-apply-patch.sh
+++ b/precommit/src/main/shell/smart-apply-patch.sh
@@ -387,7 +387,7 @@ function import_core
for filename in "${BINDIR}/core.d"/*; do
# shellcheck disable=SC1091
- # shellcheck source=core.d/01-common.sh
+ # shellcheck source=SCRIPTDIR/core.d/01-common.sh
. "${filename}"
done
}
@@ -457,7 +457,7 @@ fi
if ! dryrun_both_files; then
yetus_error "ERROR: Aborting! ${PATCH_OR_ISSUE} cannot be verified."
- cleanup_and_exit ${RESULT}
+ cleanup_and_exit "${RESULT}"
fi
patch_file_hinter "${INPUT_APPLIED_FILE}"
@@ -483,4 +483,4 @@ patch_reports
popd >/dev/null || exit 1
-cleanup_and_exit ${RESULT}
+cleanup_and_exit "${RESULT}"
diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile
b/precommit/src/main/shell/test-patch-docker/Dockerfile
index 60cb923..8805e02 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
###############
#
# Example Apache Yetus Dockerfile that includes all functionality supported
@@ -40,40 +39,44 @@ ENV DEBCONF_TERSE true
# Adding libffi-dev for all the programming languages
# that take advantage of it.
######
+# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
- apt-transport-https \
- apt-utils \
- ca-certificates \
- curl \
- dirmngr \
- git \
- gpg \
- gpg-agent \
- libffi-dev \
- locales \
- pkg-config \
- rsync \
- software-properties-common \
- ssh-client \
- xz-utils \
+ apt-transport-https \
+ apt-utils \
+ ca-certificates \
+ curl \
+ dirmngr \
+ git \
+ gpg \
+ gpg-agent \
+ libffi-dev \
+ locales \
+ pkg-config \
+ rsync \
+ software-properties-common \
+ ssh-client \
+ xz-utils \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
###
# Set the locale
###
+#hadolint ignore=DL3059
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
####
-# Install GNU C/C++ (everything generally needs this)
+# Install GNU C/C++ and GNU make (everything generally needs this)
####
+# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
g++ \
gcc \
libc-dev \
+ make \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -82,7 +85,7 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y \
# helper utility in parallel. go bins are typically
# statically linked, so this is perfectly safe.
###
-# hadolint ignore=DL3008
+# hadolint ignore=DL3008,DL3059
RUN add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get -q update \
&& apt-get -q install --no-install-recommends -y golang-go \
@@ -97,23 +100,25 @@ RUN add-apt-repository -y ppa:longsleep/golang-backports \
# Install Apache Creadur RAT jar
####
FROM yetusbase AS apacherat
+ARG APACHE_RAT_VERSION=0.13
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir -p /opt/apache-rat \
&& curl -f -s -L -o /tmp/rat.tgz \
-
'https://www.apache.org/dyn/closer.cgi?action=download&filename=/creadur/apache-rat-0.13/apache-rat-0.13-bin.tar.gz'
\
+
"https://dlcdn.apache.org/creadur/apache-rat-$APACHE_RAT_VERSION/apache-rat-$APACHE_RAT_VERSION-bin.tar.gz"
\
&& shasum -a 512 /tmp/rat.tgz \
| awk
'$1!="2c1e12eace7b80a9b6373c2f5080fbf63d3fa8d9248f3a17bd05de961cd3ca3c4549817b8b7320a84f0c323194edad0abdb86bdfec3976227a228e2143e14a54"
{exit(1)}' \
&& tar --strip-components 1 -C /opt/apache-rat -xpzf /tmp/rat.tgz \
&& rm /tmp/rat.tgz \
- && mv /opt/apache-rat/apache-rat-0.13.jar /opt/apache-rat/apache-rat.jar
+ && mv /opt/apache-rat/apache-rat-$APACHE_RAT_VERSION.jar
/opt/apache-rat/apache-rat.jar
#####
# Install SpotBugs
#####
FROM yetusbase AS spotbugs
+ARG SPOTBUGS_VERSION=4.4.1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN curl -sSL
https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.2.2/spotbugs-4.2.2.tgz
-o spotbugs.tgz \
- && curl -sSL
https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.2.2/spotbugs-4.2.2.tgz.sha1
-o spotbugs.tgz.sha1 \
+RUN curl -sSL
https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/$SPOTBUGS_VERSION/spotbugs-$SPOTBUGS_VERSION.tgz
-o spotbugs.tgz \
+ && curl -sSL
https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/$SPOTBUGS_VERSION/spotbugs-$SPOTBUGS_VERSION.tgz.sha1
-o spotbugs.tgz.sha1 \
&& echo -n " spotbugs.tgz" >> spotbugs.tgz.sha1 \
&& shasum -c spotbugs.tgz.sha1 \
&& mkdir -p /opt/spotbugs \
@@ -126,37 +131,40 @@ ENV SPOTBUGS_HOME /opt/spotbugs
# Install shellcheck (shell script lint)
####
FROM yetusbase AS shellcheck
+ARG SHELLCHECK_VERSION=0.7.2
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSL \
-
https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz
\
+
https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz
\
| tar --strip-components 1 --wildcards -xJf - '*/shellcheck' \
&& chmod a+rx shellcheck \
&& mv shellcheck /bin/shellcheck \
&& shasum -a 512 /bin/shellcheck \
- | awk
'$1!="aae813283d49f18f95a205dca1c5184267d07534a08abc952ebea1958fee06f8a0207373b6770a083079ba875458ea9da443f2b9910a50dcd93b935048bc14f5"
{exit(1)}'
+ | awk
'$1!="0977b3d34f6e7e6d5c95ba46ca648ab55a6168e6304484d0daffefb0724c2309f9b0a2c8121d72ddcee977ba5614a5e7e83efc419b294600e0f73d748ec263a0"
{exit(1)}'
####
# Install hadolint (dockerfile lint)
####
FROM yetusbase AS hadolint
+ARG HADOLINT_VERSION=2.7.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSL \
-
https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-Linux-x86_64
\
+
https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-x86_64
\
-o /bin/hadolint \
&& chmod a+rx /bin/hadolint \
&& shasum -a 512 /bin/hadolint \
- | awk
'$1!="df27253d374c143a606483b07a26234ac7b4bca40b4eba53e79609c81aa70146e7d5c145f90dcec71d6d1aad1048b7d9d2de68d92284f48a735d04d19c5c5559"
{exit(1)}'
+ | awk
'$1!="176eb3fd9f6a3cb9eda7f23b69a98069ea77cefc2078cf6234ebb3cb45897078934ee6925bec32b6e5c10915e8ff39bf24ebec36f37b226a2c8c4068a456ee30"
{exit(1)}'
####
# Install buf (protobuf lint)
####
FROM yetusbase AS buf
+ARG BUF_VERSION=0.56.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSL \
-
https://github.com/bufbuild/buf/releases/download/v0.21.0/buf-Linux-x86_64.tar.gz
\
+
https://github.com/bufbuild/buf/releases/download/v$BUF_VERSION/buf-Linux-x86_64.tar.gz
\
-o buf.tar.gz \
- && shasum -a 256 buf.tar.gz \
- | awk
'$1!="95aba62ac0ecc5a9120cc58c65cdcc85038633a816bddfe8398c5ae3b32803f1"
{exit(1)}' \
+ && shasum -a 512 buf.tar.gz \
+ | awk
'$1!="52b8ef7ba924b6679d59134df0765fe456749e83a9842ce289875489261b62b5261a21fc9849a22778a6afb3c5fcc6e86b856e06d1b62564d794c3e8f4da10ca"
{exit(1)}' \
&& tar -xzf buf.tar.gz -C /usr/local --strip-components 1 \
&& rm buf.tar.gz
@@ -164,8 +172,9 @@ RUN curl -sSL \
# Install bats (TAP-capable unit testing for shell scripts)
####
FROM yetusbase AS bats
+ARG BATS_VERSION=1.4.1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN git clone --branch v1.2.1 \
+RUN git clone --branch v$BATS_VERSION \
https://github.com/bats-core/bats-core.git \
/tmp/bats-core \
&& /tmp/bats-core/install.sh /opt/bats \
@@ -187,19 +196,23 @@ RUN go get -u github.com/mgechev/revive
#
####
FROM yetusbase AS checkmake
+ARG CHECKMAKE_VERSION=8915bd40945dd20b153cfcecb787ecdb5020ba38
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN apt-get -q update \
- && apt-get -q install --no-install-recommends -y golang-1.15 \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* \
- && /usr/lib/go-1.15/bin/go get -u github.com/mrtazz/checkmake
+ENV BUILDER_NAME='Apache Yetus'
+ENV BUILDER_EMAIL='[email protected]'
+RUN git clone \
+ https://github.com/mrtazz/checkmake.git /tmp/checkmake \
+ && git -C /tmp/checkmake checkout $CHECKMAKE_VERSION \
+ && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 make -C /tmp/checkmake binaries \
+ && make -C /tmp/checkmake test
####
# golangci-lint (Multi-tool golang linter)
####
FROM yetusbase as golangci
+ARG GOLANGCILINT_VERSION=1.42.1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN (GO111MODULE=on go get
github.com/golangci/golangci-lint/cmd/[email protected])
+RUN (GO111MODULE=on go get
github.com/golangci/golangci-lint/cmd/golangci-lint@v$GOLANGCILINT_VERSION)
########
#
@@ -219,6 +232,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
####
# OpenJDK 8
####
+# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y
openjdk-8-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -228,6 +242,7 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y openjdk-8
# NOTE: This default only works when Apache Yetus is launched
# _in_ the container and not outside of it!
####
+# hadolint ignore=DL3008,DL3059
RUN apt-get -q update && apt-get -q install --no-install-recommends -y
default-jre-headless openjdk-11-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
@@ -239,20 +254,23 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
####
# Install ant
####
+# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y ant \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
####
-# Install GNU automake, GNU make, and related
+# Install GNU automake and related
####
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y
autoconf automake libtool make \
+# hadolint ignore=DL3008,DL3059
+RUN apt-get -q update && apt-get -q install --no-install-recommends -y
autoconf automake libtool \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
####
# Install cmake
####
+# hadolint ignore=DL3008,DL3059
RUN apt-get -q update && apt-get -q install --no-install-recommends -y cmake \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -260,7 +278,9 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y cmake \
###
# Install docker
###
+# hadolint ignore=DL3059
RUN curl -sSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
+# hadolint ignore=DL3008,DL3059
RUN add-apt-repository -y \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
@@ -272,6 +292,7 @@ RUN add-apt-repository -y \
######
# Install maven
######
+# hadolint ignore=DL3008,DL3059
RUN apt-get -q update && apt-get -q install --no-install-recommends -y maven \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -279,6 +300,7 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y maven \
######
# Install perl
######
+# hadolint ignore=DL3008,DL3059
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
perl \
libperl-critic-perl \
@@ -289,7 +311,12 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y \
# Install python3 and pylint3
# astroid and pylint go hand-in-hand. Upgrade both at the same time.
######
-# hadolint ignore=DL3008,DL3013
+ARG PY3_ASTROID_VERSION=2.8.0
+ARG PY3_CODESPELL_VERSION=2.1.0
+ARG PY3_DOCKER_COMPOSE=1.29.2
+ARG PY3_PYLINT_VERSION=2.11.1
+ARG PY3_YAMLLINT_VERSION=1.26.3
+# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
python3 \
python3-bcrypt \
@@ -314,29 +341,33 @@ RUN apt-get -q update && apt-get -q install
--no-install-recommends -y \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
&& python3 /tmp/get-pip.py \
&& rm /usr/local/bin/pip /tmp/get-pip.py \
- && pip3 install -v \
- astroid==2.4.2 \
-
git+https://github.com/codespell-project/codespell.git@8d8d4ae2bbd24a91d1a9bd8aec25c9f86724c280
\
- docker-compose==1.26.2 \
- pylint==2.5.3 \
- yamllint==1.24.2 \
+ && pip3 install --no-cache-dir -v \
+ astroid==$PY3_ASTROID_VERSION \
+ codespell==$PY3_CODESPELL_VERSION \
+ docker-compose==$PY3_DOCKER_COMPOSE \
+ pylint==$PY3_PYLINT_VERSION \
+ yamllint==$PY3_YAMLLINT_VERSION \
&& rm -rf /root/.cache \
- && mv /usr/local/bin/pylint /usr/local/bin/pylint3
-RUN ln -s /usr/local/bin/pylint3 /usr/local/bin/pylint
-RUN ln -s /usr/local/bin/pip3 /usr/local/bin/pip
+ && mv /usr/local/bin/pylint /usr/local/bin/pylint3 \
+ && ln -s /usr/local/bin/pylint3 /usr/local/bin/pylint \
+ && ln -s /usr/local/bin/pip3 /usr/local/bin/pip
####
# Install ruby and associated bits
###
+ARG RUBY_BUNDLER_VERSION=2.2.27
+ARG RUBY_RAKE_VERSION=13.0.3
+ARG RUBY_RUBOCOP_VERSION=1.21.0
+# hadolint ignore=DL3008
RUN echo 'gem: --no-rdoc --no-ri' >> /root/.gemrc \
&& apt-get -q update && apt-get -q install --no-install-recommends -y \
ruby \
ruby-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
- && gem install rake -v 13.0.1 \
- && gem install rubocop -v 0.90.0 \
- && gem install bundler -v 2.1.4 \
+ && gem install bundler -v $RUBY_BUNDLER_VERSION \
+ && gem install rake -v $RUBY_RAKE_VERSION \
+ && gem install rubocop -v $RUBY_RUBOCOP_VERSION \
&& rm -rf /root/.gem
# set some reasonable defaults for ruby
# user's can always override these as needed
@@ -346,12 +377,16 @@ ENV BUNDLE_PATH /var/tmp/.bundler-gems
###
# Install npm and JSHint
###
+ARG JSHINT_VERSION=2.13.1
+ARG MARKDOWNLINTCLI_VERSION=0.28.1
# hadolint ignore=DL3008
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get -q install --no-install-recommends -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
- && npm install -g [email protected] [email protected] \
+ && npm install -g \
+ jshint@$JSHINT_VERSION \
+ markdownlint-cli@0$MARKDOWNLINTCLI_VERSION \
&& rm -rf /root/.npm
#####
@@ -367,7 +402,7 @@ COPY --from=bats /opt/bats /opt/bats
RUN ln -s /opt/bats/bin/bats /usr/local/bin/bats
COPY --from=revive /root/go/bin/* /usr/local/bin
-COPY --from=checkmake /root/go/bin/* /usr/local/bin
+COPY --from=checkmake /tmp/checkmake/checkmake /usr/local/bin
COPY --from=golangci /root/go/bin/* /usr/local/bin
####
diff --git
a/precommit/src/main/shell/test-patch-docker/Dockerfile.patchspecific
b/precommit/src/main/shell/test-patch-docker/Dockerfile.patchspecific
index 18a2007..4fad879 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile.patchspecific
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile.patchspecific
@@ -27,18 +27,22 @@ ARG DOCKER_SOCKET_GID
ARG DOCKER_WORK_DIR
RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}" || true
-RUN useradd -g "${GROUP_ID}" -u "${USER_ID}" -m "${USER_NAME}" || true
+# hadolint ignore=DL3059
+RUN useradd -l -g "${GROUP_ID}" -u "${USER_ID}" -m "${USER_NAME}" || true
# docker socket handling. unless /etc/group is mounted, we have to do this.
-
+# hadolint ignore=DL3059
RUN if [ "${DOCKER_SOCKET_GID}" != -1 ]; then (groupadd --non-unique --gid
${DOCKER_SOCKET_GID} dockersock && adduser "${USER_NAME}" dockersock ) || true;
fi
-RUN mkdir -p ${DOCKER_WORK_DIR}/extras
-RUN chmod a+rwx ${DOCKER_WORK_DIR}/extras
+# hadolint ignore=DL3059
+RUN mkdir -p ${DOCKER_WORK_DIR}/extras \
+ && chmod a+rwx ${DOCKER_WORK_DIR}/extras
COPY user_params.txt ${DOCKER_WORK_DIR}/user_params.txt
COPY launch-test-patch.sh /launch-test-patch.sh
RUN chown -R "${USER_NAME}":"${GROUP_ID}" ${DOCKER_WORK_DIR}
/launch-test-patch.sh || true
+# hadolint ignore=DL3059
RUN chmod a+rx /launch-test-patch.sh
+# hadolint ignore=DL3059
RUN chown -R "${USER_NAME}" "/home/${USER_NAME}" || true
ENV HOME "/home/${USER_NAME}"
USER ${USER_NAME}
diff --git a/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh
b/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh
index 9cc9d99..9a4f542 100755
--- a/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh
+++ b/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh
@@ -20,6 +20,7 @@ declare -a OVERWRITEARGS
# adding it as a common function library here is a-ok
#shellcheck disable=SC1090
+#shellcheck source=SCRIPTDIR/../core.d/00-yetuslib.sh
source "${PATCH_DIR}/precommit/core.d/00-yetuslib.sh"
if ! yetus_file_to_array OVERWRITEARGS "${DOCKER_WORK_DIR}/user_params.txt";
then
diff --git a/precommit/src/main/shell/test-patch.sh
b/precommit/src/main/shell/test-patch.sh
index f1afd89..5d4d253 100755
--- a/precommit/src/main/shell/test-patch.sh
+++ b/precommit/src/main/shell/test-patch.sh
@@ -1017,9 +1017,6 @@ function parse_args
EXCLUDE_PATHS_FILE=$(yetus_abs "${EXCLUDE_PATHS_FILE}")
elif [[ -f "${BASEDIR}/${EXCLUDE_PATHS_FILE}" ]]; then
EXCLUDE_PATHS_FILE=$(yetus_abs "${BASEDIR}/${EXCLUDE_PATHS_FILE}")
- else
- yetus_error "WARNING: Excluded paths file (${EXCLUDE_PATHS_FILE}}) does
not exist (yet?)."
- unset EXCLUDE_PATHS_FILE
fi
fi
@@ -3016,8 +3013,7 @@ function start_coprocessors
if [[ "${BASH_VERSINFO[0]}" -gt 3 ]]; then
for filename in "${BINDIR}/coprocs.d"/*; do
- # shellcheck disable=SC1091
- # shellcheck source=coprocs.d/process_counter.sh
+ # shellcheck source=SCRIPTDIR/coprocs.d/process_counter.sh
. "${filename}"
done
@@ -3236,9 +3232,8 @@ function import_core
declare filename
for filename in "${BINDIR}/core.d"/*; do
- # shellcheck disable=SC1091
- # shellcheck source=core.d/00-yetuslib.sh
- # shellcheck source=core.d/01-common.sh
+ # shellcheck source=SCRIPTDIR/core.d/00-yetuslib.sh
+ # shellcheck source=SCRIPTDIR/core.d/01-common.sh
. "${filename}"
done
}
diff --git a/release/build-and-sign.sh b/release/build-and-sign.sh
index e694801..157bcbe 100755
--- a/release/build-and-sign.sh
+++ b/release/build-and-sign.sh
@@ -27,7 +27,7 @@ if [[ ! -d precommit ]]; then
exit 1
fi
-#shellcheck source=precommit/src/main/shell/core.d/00-yetuslib.sh
+#shellcheck source=SCRIPTDIR/../precommit/src/main/shell/core.d/00-yetuslib.sh
. precommit/src/main/shell/core.d/00-yetuslib.sh
BINDIR=$(yetus_abs "${thisdir}")
diff --git a/release/initial-patches.sh b/release/initial-patches.sh
index 04d9777..4250079 100755
--- a/release/initial-patches.sh
+++ b/release/initial-patches.sh
@@ -34,7 +34,7 @@ else
SEDI=("-i")
fi
-#shellcheck source=precommit/src/main/shell/core.d/00-yetuslib.sh
+#shellcheck source=SCRIPTDIR/../precommit/src/main/shell/core.d/00-yetuslib.sh
. precommit/src/main/shell/core.d/00-yetuslib.sh
BINDIR=$(yetus_abs "${thisdir}")
diff --git a/release/update-doc-versions.sh b/release/update-doc-versions.sh
index ef33fa1..b658f52 100755
--- a/release/update-doc-versions.sh
+++ b/release/update-doc-versions.sh
@@ -27,7 +27,7 @@ if [[ ! -d precommit ]]; then
exit 1
fi
-#shellcheck source=precommit/src/main/shell/core.d/00-yetuslib.sh
+#shellcheck source=SCRIPTDIR/../precommit/src/main/shell/core.d/00-yetuslib.sh
. precommit/src/main/shell/core.d/00-yetuslib.sh
BINDIR=$(yetus_abs "${thisdir}")
diff --git a/releasedocmaker/src/main/python/releasedocmaker.py
b/releasedocmaker/src/main/python/releasedocmaker.py
index 154abe9..a6f21e9 100755
--- a/releasedocmaker/src/main/python/releasedocmaker.py
+++ b/releasedocmaker/src/main/python/releasedocmaker.py
@@ -18,6 +18,7 @@
""" wrapper to launch releasedocmaker from the CLI """
import sys
+
sys.dont_write_bytecode = True
# pylint: disable=wrong-import-position,import-self
import releasedocmaker
diff --git a/shelldocs/src/main/python/shelldocs.py
b/shelldocs/src/main/python/shelldocs.py
index 7248125..8bd9b3d 100755
--- a/shelldocs/src/main/python/shelldocs.py
+++ b/shelldocs/src/main/python/shelldocs.py
@@ -119,15 +119,17 @@ class ShellFunction: # pylint:
disable=too-many-instance-attributes
"stability": ("Stable", "Evolving"),
"replacerawtext": ("yes", "no"),
}
- for attribute in validvalues:
+ for attribute, attrvalues in validvalues.items():
value = getattr(self, attribute)
- if (not value or value == ''):
+ if (not value or value == '') and attribute != 'replacerawtext':
logging.error("%s:%u:ERROR: function %s has no @%s",
self.filename, self.linenum, self.name,
- attribute.lower().replace('rawtext', 'able'))
- elif value not in validvalues[attribute]:
+ attribute.lower())
+ elif value not in attrvalues:
+ if attribute == 'replacerawtext' and value == '':
+ continue
validvalue = "|".join(v.lower()
- for v in validvalues[attribute])
+ for v in attrvalues)
logging.error(
"%s:%d:ERROR: function %s has invalid value (%s) for @%s
(%s)",
self.filename, self.linenum, self.name, value.lower(),
@@ -160,7 +162,7 @@ class ProcessFile:
Comparison is case sensitive and the comment must be in
UPPERCASE.
"""
- with open(self.filename) as input_file:
+ with open(self.filename) as input_file: #pylint:
disable=unspecified-encoding
for line in input_file:
if line.startswith(
"#") and line[1:].strip() == "SHELLDOC-IGNORE":
@@ -247,7 +249,7 @@ class ProcessFile:
return
try:
- with open(self.filename, "r") as shellcode:
+ with open(self.filename, "r") as shellcode: #pylint:
disable=unspecified-encoding
# if the file contains a comment containing
# only "SHELLDOC-IGNORE" then skip that file
@@ -398,10 +400,8 @@ def process_arguments():
return options
-
def main():
'''main entry point'''
-
logging.basicConfig(format='%(message)s')
options = process_arguments()