Skip to content

Commit 4d18e2f

Browse files
author
Alexander Rogalskiy
committed
Updates on files
Added changest on workflow
1 parent 0e2a95e commit 4d18e2f

File tree

6 files changed

+81
-4
lines changed

6 files changed

+81
-4
lines changed

β€Ž.github/linters/.yaml-lint.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# https://yamllint.readthedocs.io/en/stable/index.html
3+
# yamllint --strict -c .github/linters/.yaml-lint.yml .
4+
5+
extends: default
6+
7+
rules:
8+
document-start: disable
9+
indentation: disable
10+
line-length: disable
11+
truthy: false

β€Ž.pre-commit-config.yaml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
# https://pre-commit.com/
3+
default_stages: [commit, push]
4+
default_language_version:
5+
# force all unspecified Python hooks to run python3
6+
python: python3
7+
minimum_pre_commit_version: "1.20.0"
8+
repos:
9+
- repo: meta
10+
hooks:
11+
- id: identity
12+
- id: check-hooks-apply
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v3.4.0
15+
hooks:
16+
- id: check-added-large-files
17+
- id: check-case-conflict
18+
- id: check-executables-have-shebangs
19+
exclude: ^scripts/windows\.sh$
20+
- id: check-merge-conflict
21+
- id: check-vcs-permalinks
22+
# - id: check-yaml
23+
- id: end-of-file-fixer
24+
- id: fix-byte-order-marker
25+
- id: mixed-line-ending
26+
- id: trailing-whitespace
27+
# - repo: https://github.com/Lucas-C/pre-commit-hooks
28+
# rev: v1.1.10
29+
# hooks:
30+
# - id: forbid-tabs
31+
# - id: remove-tabs
32+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
33+
rev: 2.1.5
34+
hooks:
35+
- id: shellcheck
36+
# - id: shfmt
37+
- repo: https://github.com/codespell-project/codespell
38+
rev: v2.0.0
39+
hooks:
40+
- id: codespell
41+
name: Run codespell
42+
description: Check Spelling with codespell
43+
entry: codespell --ignore-words=codespell.txt
44+
# - repo: https://github.com/igorshubovych/markdownlint-cli
45+
# rev: v0.27.1
46+
# hooks:
47+
# - id: markdownlint
48+
# name: Run markdownlint
49+
# description: Checks the style of Markdown files
50+
# entry: markdownlint -c .github/linters/.markdown-lint.yml .
51+
# types: [markdown]
52+
# files: \.(md|mdown|markdown)$
53+
# - repo: https://github.com/adrienverge/yamllint
54+
# rev: v1.26.1
55+
# hooks:
56+
# - id: yamllint
57+
# name: Run yamllint
58+
# description: Check YAML files with yamllint
59+
# entry: yamllint --strict -c .github/linters/.yaml-lint.yml
60+
# types: [yaml]
61+
# files: \.(yaml|yml)$

β€ŽMakefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ $(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile f
44
IMAGE ?= styled-java-patterns
55
TAG ?= latest
66

7-
UTILS := docker
7+
UTILS := docker tilt
88
# Make sure that all required utilities can be located.
9-
UTIL_CHECK := $(or $(shell which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to install `docker` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS)))
9+
UTIL_CHECK := $(or $(shell which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to install `docker` and `tilt` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS)))
10+
DIRS := $(shell ls -d -- */ | grep -v public)
1011

1112
# Default target (by virtue of being the first non '.'-prefixed in the file).
1213
.PHONY: _no-target-specified
@@ -18,6 +19,11 @@ _no-target-specified:
1819
list:
1920
@$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort
2021

22+
# Lists all dirs (except `public`).
23+
.PHONY: dirs
24+
dirs:
25+
echo "$(DIRS)"
26+
2127
# Ensures that the git workspace is clean.
2228
.PHONY: _ensure-clean
2329
_ensure-clean:

β€ŽTiltfile

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ local_resource(
3434
congrats = "πŸŽ‰ Congrats, you ran a live_update! πŸŽ‰"
3535
docker_build('styled-java-patterns', '.', build_args={'IMAGE_SOURCE': 'node', 'IMAGE_TAG': '12-buster'},
3636
dockerfile='./Dockerfile',
37-
entrypoint=['mkdocs', 'serve', '--verbose', '--dirtyreload'],
3837
live_update=[
3938
sync('.', '/usr/src/app'),
4039
run('python3 ./record-start-time.py'),

β€Žcodespell.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
arbitrer

β€Žpolicy/deny.rego

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ name = input.metadata.name
1414
deny[msg] {
1515
input.kind == "Deployment"
1616
not input.spec.selector.matchLabels.app.kubernetes.io/name
17-
not input.spec.selector.matchLabels.app.kubernetes.io/version
1817
# not input.spec.selector.matchLabels.app
1918

2019
msg := "Containers must provide name/version label for pod selectors"

0 commit comments

Comments
Β (0)