Browse Source

[added] use [editorconfig] to keep a consistent coding style

[editorconfig]: https://editorconfig.org
yanchi 2 years ago
parent
commit
7c126a3243
2 changed files with 20 additions and 2 deletions
  1. 15 0
      .editorconfig
  2. 5 2
      .gitignore

+ 15 - 0
.editorconfig

@@ -0,0 +1,15 @@
+# Top most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending in every file
+# and remove any trailing whitespaces
+[*]
+end_of_line = lf
+charset = utf-8
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# Use tab to indent qsrc code
+[*.qsrc]
+indent_style = tab
+indent_size = 4

+ 5 - 2
.gitignore

@@ -21,9 +21,12 @@ images.zip
 
 *.png
 
-#ignore Visual Studio build files
+# ignore Visual Studio build files
 /tools/qsp-analyser/QSP_Analyser/[Bb]in/
 /tools/qsp-analyser/QSP_Analyser/[Oo]bj/
 
-#don't ignore this file
+# don't ignore this file
 !.gitignore
+
+# do NOT ignore editorconfig
+!.editorconfig