diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0691035 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,39 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.3.0 + hooks: + - id: check-added-large-files + - id: check-yaml + args: + - --allow-multiple-documents + - id: check-json + - id: requirements-txt-fixer + - id: trailing-whitespace + - id: end-of-file-fixer + # Python + - id: debug-statements + - id: check-merge-conflict + - id: name-tests-test + # exclude: tests/(common.py|util.py|(helpers)/(.+).py) + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + - repo: git://github.com/asottile/reorder_python_imports + rev: v2.3.6 + hooks: + - id: reorder-python-imports + args: + - --py3-plus + - repo: git://github.com/dnephin/pre-commit-golang + rev: v0.3.5 + hooks: + - id: go-fmt + - id: go-imports + - id: golangci-lint +# - repo: git://github.com/jumanjihouse/pre-commit-hooks +# rev: 1.11.0 +# hooks: +# - id: rubocop +# - id: fasterer diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c2b21e1 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +SUBDIRS := $(wildcard */.) + +.PHONY: default test clean +default: check + +.PHONY: all +all: $(SUBDIRS) + +.PHONY: $(SUBDIRS) +$(SUBDIRS): + $(MAKE) -C $@ + +# Installs pre-commit hooks +.PHONY: install-hooks +install-hooks: + pre-commit install -f --install-hooks + +# Checks files for encryption +.PHONY: check +check: + pre-commit run --all-files diff --git a/crawler/Makefile b/crawler/Makefile new file mode 100644 index 0000000..21d4c36 --- /dev/null +++ b/crawler/Makefile @@ -0,0 +1,4 @@ +.PHONY: default all test clean + +default: + @echo ok diff --git a/indexer/Makefile b/indexer/Makefile new file mode 100644 index 0000000..21d4c36 --- /dev/null +++ b/indexer/Makefile @@ -0,0 +1,4 @@ +.PHONY: default all test clean + +default: + @echo ok diff --git a/parsers/Makefile b/parsers/Makefile new file mode 100644 index 0000000..21d4c36 --- /dev/null +++ b/parsers/Makefile @@ -0,0 +1,4 @@ +.PHONY: default all test clean + +default: + @echo ok diff --git a/viewers/Makefile b/viewers/Makefile new file mode 100644 index 0000000..21d4c36 --- /dev/null +++ b/viewers/Makefile @@ -0,0 +1,4 @@ +.PHONY: default all test clean + +default: + @echo ok