Skip to content

Commit

Permalink
Adding flake8 config and dockerfilelint
Browse files Browse the repository at this point in the history
Precommit-Verified: d4333bcd762db20b08ac242f146a28c1d3cb35fd5f43f472a8aef43184b7eb04
  • Loading branch information
Daniel Pryor committed Jun 29, 2018
1 parent e198a09 commit 431adfd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ repos:
- --autofix
- id: flake8
stages: [commit]
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.0
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfile_lint
- id: dockerfilelint
stages: [commit]
- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.1.1
Expand Down
20 changes: 17 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
FROM python:2.7-alpine as linter
# Runs required lints so automated builds are a little more fluid

WORKDIR /opt/vmware_exporter/
COPY . /opt/vmware_exporter/

RUN pip install flake8 && \
apk add --no-cache --update nodejs && \
npm install -g dockerfilelint

RUN flake8 vmware_exporter
RUN dockerfilelint Dockerfile


FROM python:2.7-alpine

LABEL MAINTAINER Daniel Pryor <dpryor@pryorda.net>
LABEL NAME vmware_exporter
LABEL VERSION 0.20
LABEL MAINTAINER="Daniel Pryor <daniel@pryorda.net>"
LABEL NAME=vmware_exporter
LABEL VERSION=0.20

WORKDIR /opt/vmware_exporter/

Expand Down

0 comments on commit 431adfd

Please sign in to comment.