Update some tools
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# https://editorconfig.org/
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
@@ -12,7 +12,7 @@ charset = utf-8
|
||||
|
||||
# Docstrings and comments use max_line_length = 79
|
||||
[*.py]
|
||||
max_line_length = 119
|
||||
max_line_length = 80
|
||||
|
||||
# Use 2 spaces for the HTML files
|
||||
[*.html]
|
||||
@@ -21,16 +21,16 @@ indent_size = 2
|
||||
# The JSON files contain newlines inconsistently
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
insert_final_newline = ignore
|
||||
insert_final_newline = unset
|
||||
|
||||
[**/admin/js/vendor/**]
|
||||
indent_style = ignore
|
||||
indent_size = ignore
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
# Minified JavaScript files shouldn't be changed
|
||||
[**.min.js]
|
||||
indent_style = ignore
|
||||
insert_final_newline = ignore
|
||||
indent_style = unset
|
||||
insert_final_newline = unset
|
||||
|
||||
# Makefiles always use tabs for indentation
|
||||
[Makefile]
|
||||
@@ -39,9 +39,3 @@ indent_style = tab
|
||||
# Batch files use tabs for indentation
|
||||
[*.bat]
|
||||
indent_style = tab
|
||||
|
||||
[docs/**.txt]
|
||||
max_line_length = 79
|
||||
|
||||
[makefile]
|
||||
indent_style = tab
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
fail_fast: true
|
||||
repos:
|
||||
- repo: https://github.com/twu/skjold
|
||||
rev: v0.1.6
|
||||
hooks:
|
||||
- id: skjold
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
|
||||
1
Pipfile
1
Pipfile
@@ -11,6 +11,7 @@ rope = "*"
|
||||
safety = "*"
|
||||
flake8 = "*"
|
||||
pre-commit= "*"
|
||||
skjold = "*"
|
||||
|
||||
[packages]
|
||||
django = ">=3.1.0"
|
||||
|
||||
13
makefile
13
makefile
@@ -18,15 +18,20 @@ install: env ## Make venv and install requirements
|
||||
pre-commit autoupdate
|
||||
|
||||
migrate: ## Make and run migrations
|
||||
$(PYTHON) manage.py makemigrations
|
||||
$(PYTHON) manage.py migrate
|
||||
pipenv run manage.py makemigrations
|
||||
pipenv run manage.py migrate
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run tests
|
||||
$(PYTHON) $(APP_DIR)/manage.py test application --verbosity=0 --parallel --failfast
|
||||
pipenv run skjold -v audit Pipenv.lock
|
||||
pipenv run python manage.py test application --verbosity=0 --parallel --failfast
|
||||
|
||||
.PHONY: run
|
||||
run: ## Run the Django server
|
||||
$(PYTHON) $(APP_DIR)/manage.py runserver
|
||||
pipenv run python manage.py runserver
|
||||
|
||||
start: install migrate run ## Install requirements, apply migrations, then start development server
|
||||
|
||||
.PHONY: check
|
||||
check: ## Run checks on the packages
|
||||
pipenv run skjold -v audit Pipenv.lock
|
||||
|
||||
@@ -14,3 +14,10 @@ exclude = '''
|
||||
| dist
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.skjold]
|
||||
sources = ["github", "pyup", "gemnasium"] # Sources to check against.
|
||||
report_only = true # Report only, always exit with zero.
|
||||
cache_dir = '.skylt_cache' # Cache location (default: `~/.skjold/cache`).
|
||||
cache_expires = 86400 # Cache max. age.
|
||||
verbose = true # Be verbose.
|
||||
|
||||
Reference in New Issue
Block a user