Browse Source

pylint 2.6.0 (#1)

pull/3/head
Mykyta Solomko 5 years ago
parent
commit
735a49d209
  1. 14
      .ci-scripts/lint-dockerfile.sh
  2. 16
      .ci-scripts/lint-shell.sh
  3. 14
      .ci-scripts/lint-yaml.sh
  4. 21
      .ci-scripts/yamllint.yml
  5. 42
      .drone.yml
  6. 18
      Dockerfile
  7. 22
      slackpkg.conf

14
.ci-scripts/lint-dockerfile.sh

@ -0,0 +1,14 @@
#!/usr/bin/env bash
RET=0
CUR_DIR=$(pwd)
DOCKER_FILES=$(find "${CUR_DIR}" -type f -iname 'Dockerfile*')
for DKR_F in ${DOCKER_FILES[*]}; do
hadolint "${DKR_F}" \
|| RET=${?}
done
exit ${RET}

16
.ci-scripts/lint-shell.sh

@ -0,0 +1,16 @@
#!/usr/bin/env bash
RET=0
CUR_DIR=$(pwd)
SHELL_FILES=$(find "${CUR_DIR}" -type f -name '*.sh')
for SH_F in ${SHELL_FILES[*]}; do
shellcheck --color=always \
--severity=style \
"${SH_F}" \
|| RET=${?}
done
exit ${RET}

14
.ci-scripts/lint-yaml.sh

@ -0,0 +1,14 @@
#!/usr/bin/env bash
RET=0
CUR_DIR=$(pwd)
YAML_FILES=$(find "${CUR_DIR}" -type f \( -iname '*.yml' -or -iname '*.yaml' \))
for YM_F in ${YAML_FILES[*]}; do
yamllint -c "${CUR_DIR}/.ci-scripts/yamllint.yml" "${YM_F}" \
|| RET=${?}
done
exit ${RET}

21
.ci-scripts/yamllint.yml

@ -0,0 +1,21 @@
---
extends: default
rules:
line-length:
max: 256
level: warning
braces:
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: 0
max-spaces-inside-empty: 1
level: warning
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: 0
max-spaces-inside-empty: 1
level: warning
# vim:set syntax=yaml ts=2 sw=2 et:

42
.drone.yml

@ -0,0 +1,42 @@
---
workspace:
base: /drone
path: src
pipeline:
lint-shell:
image: koalaman/shellcheck-alpine:stable
group: lint
commands:
- apk add --no-cache bash
- bash ./.ci-scripts/lint-shell.sh
lint-yaml:
image: sdesbure/yamllint:latest
group: lint
commands:
- apk add --no-cache bash
- bash ./.ci-scripts/lint-yaml.sh
lint-dockerfile:
image: hadolint/hadolint:latest-debian
group: lint
commands:
- bash ./.ci-scripts/lint-dockerfile.sh
docker-build-and-push:
image: plugins/docker:17
secrets:
- docker_username
- docker_password
repo: sevoid/linter-pylint
tags:
- 'latest'
when:
branch:
- build-*
branches:
axlude: [ master ]
# vim:set syntax=yaml ts=2 sw=2 et:

18
Dockerfile

@ -0,0 +1,18 @@
FROM vbatts/slackware:current
ENV PYLINT_VER=2.6.0
COPY slackpkg.conf /etc/slackpkg/
RUN touch /var/lib/slackpkg/current \
&& slackpkg update \
&& slackpkg install perl ca-certificates dcron \
&& echo 'https://mirrors.nix.org.ua/linux/slackware/slackware64-current/' > /etc/slackpkg/mirrors \
&& slackpkg update gpg \
&& slackpkg update \
&& slackpkg upgrade-all \
&& slackpkg install python3 python-pip python-setuptools \
&& pip install -q pylint==${PYLINT_VER}
LABEL maintainer="sev@nix.org.ua"

22
slackpkg.conf

@ -0,0 +1,22 @@
#
# slackpkg.conf - Configuration for SlackPkg
# v2.8
#
TEMP=/var/cache/packages
WORKDIR=/var/lib/slackpkg
WGETFLAGS="--passive-ftp --no-verbose --progress=dot:giga:noscroll --no-check-certificate"
DELALL=yes
CHECKMD5=on
CHECKGPG=on
CHECKSIZE=off
PRIORITY=( patches %PKGMAIN extra pasture testing )
POSTINST=on
ONLY_NEW_DOTNEW=on
ONOFF=off
DOWNLOAD_ALL=on
DIALOG=off
BATCH=off
DEFAULT_ANSWER=n
USE_INCLUDES=on
SPINNING=off
DIALOG_MAXARGS=139000
Loading…
Cancel
Save