feat: configure editorconfig-checker tool

This commit is contained in:
Krzysztof Sikorski 2024-05-14 21:51:22 +02:00
parent 07bb0ec139
commit 830adeeed0
Signed by: krzysztof-sikorski
GPG key ID: 4EB564BD08FE8476
2 changed files with 30 additions and 0 deletions

22
.ecrc Normal file
View file

@ -0,0 +1,22 @@
{
"Version": "v3.0.1",
"Verbose": false,
"Debug": false,
"IgnoreDefaults": false,
"SpacesAftertabs": false,
"NoColor": false,
"Exclude": [
"^.git/",
"^.idea/"
],
"AllowedContentTypes": [],
"PassedFiles": [],
"Disable": {
"EndOfLine": false,
"Indentation": false,
"InsertFinalNewline": false,
"TrimTrailingWhitespace": false,
"IndentSize": false,
"MaxLineLength": false
}
}

View file

@ -3,6 +3,9 @@ SHELL := /bin/sh
.SUFFIXES: # no special suffixes
.DEFAULT_GOAL := default
DOCKER_USER_ARGS = --user=$$(id --user):$$(id --group)
DOCKER_IMAGE_EDITORCONFIG_CHECKER = mstruebing/editorconfig-checker:v3.0.1
# dummy entry to force make to do nothing by default
.PHONY: default
default:
@ -17,3 +20,8 @@ git_push_current_branch:
.PHONY: git_push_tags
git_push_tags:
git remote | xargs -L1 git push --verbose --tags
# lint all files against EditorConfig settings
.PHONY: lint_editorconfig
lint_editorconfig:
docker container run --rm ${DOCKER_USER_ARGS} --volume=$$PWD:/check ${DOCKER_IMAGE_EDITORCONFIG_CHECKER}