Просмотр исходного кода

Add code-reformatting commit to blame ignore file; validate format in CI

Sergey Prokhorov 2 лет назад
Родитель
Сommit
857e045751
4 измененных файлов с 28 добавлено и 0 удалено
  1. 17 0
      .editorconfig
  2. 2 0
      .git-blame-ignore-revs
  3. 3 0
      .github/workflows/ci.yml
  4. 6 0
      Makefile

+ 17 - 0
.editorconfig

@@ -0,0 +1,17 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 4
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+max_line_length = 120
+
+[*.{config,src}]
+indent_style = space
+
+[*.md]
+indent_style = space
+trim_trailing_whitespace = false

+ 2 - 0
.git-blame-ignore-revs

@@ -0,0 +1,2 @@
+# Code formatter introduced; code was re-formatted
+d8c64208e3f377cf5fd4236a9089c3f9822fde5a

+ 3 - 0
.github/workflows/ci.yml

@@ -43,6 +43,9 @@ jobs:
         run: make xref
         if: ${{ matrix.otp != '23.3' }}
 
+      - name: Code formatter validation
+        run: make format_check
+
       - name: Eunit test
         run: make test
 

+ 6 - 0
Makefile

@@ -18,6 +18,12 @@ test: $(REBAR)
 xref: $(REBAR)
 	$(REBAR) xref
 
+format: $(REBAR)
+	$(REBAR) fmt
+
+format_check: $(REBAR)
+	$(REBAR) fmt --check
+
 doc: $(REBAR)
 	$(REBAR) as dev edoc