Update some tools

This commit is contained in:
Fundor333
2020-12-23 13:09:17 +01:00
parent a47c01d8e6
commit b77ec53346
5 changed files with 28 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
# https://editorconfig.org/ # http://editorconfig.org
root = true root = true
@@ -12,7 +12,7 @@ charset = utf-8
# Docstrings and comments use max_line_length = 79 # Docstrings and comments use max_line_length = 79
[*.py] [*.py]
max_line_length = 119 max_line_length = 80
# Use 2 spaces for the HTML files # Use 2 spaces for the HTML files
[*.html] [*.html]
@@ -21,16 +21,16 @@ indent_size = 2
# The JSON files contain newlines inconsistently # The JSON files contain newlines inconsistently
[*.json] [*.json]
indent_size = 2 indent_size = 2
insert_final_newline = ignore insert_final_newline = unset
[**/admin/js/vendor/**] [**/admin/js/vendor/**]
indent_style = ignore indent_style = unset
indent_size = ignore indent_size = unset
# Minified JavaScript files shouldn't be changed # Minified JavaScript files shouldn't be changed
[**.min.js] [**.min.js]
indent_style = ignore indent_style = unset
insert_final_newline = ignore insert_final_newline = unset
# Makefiles always use tabs for indentation # Makefiles always use tabs for indentation
[Makefile] [Makefile]
@@ -39,9 +39,3 @@ indent_style = tab
# Batch files use tabs for indentation # Batch files use tabs for indentation
[*.bat] [*.bat]
indent_style = tab indent_style = tab
[docs/**.txt]
max_line_length = 79
[makefile]
indent_style = tab

View File

@@ -1,5 +1,9 @@
fail_fast: true fail_fast: true
repos: repos:
- repo: https://github.com/twu/skjold
rev: v0.1.6
hooks:
- id: skjold
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v3.2.0
hooks: hooks:

View File

@@ -11,6 +11,7 @@ rope = "*"
safety = "*" safety = "*"
flake8 = "*" flake8 = "*"
pre-commit= "*" pre-commit= "*"
skjold = "*"
[packages] [packages]
django = ">=3.1.0" django = ">=3.1.0"

View File

@@ -18,15 +18,20 @@ install: env ## Make venv and install requirements
pre-commit autoupdate pre-commit autoupdate
migrate: ## Make and run migrations migrate: ## Make and run migrations
$(PYTHON) manage.py makemigrations pipenv run manage.py makemigrations
$(PYTHON) manage.py migrate pipenv run manage.py migrate
.PHONY: test .PHONY: test
test: ## Run tests 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 .PHONY: run
run: ## Run the Django server 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 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

View File

@@ -14,3 +14,10 @@ exclude = '''
| dist | 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.