diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..ad16f473 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,40 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[{.github/**,.devcontainer/**}] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true + +[**/CMakeLists.txt] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true + +[src/**] +end_of_line = lf +insert_final_newline = true +indent_style = tab +indent_size = tab +tab_width = 8 +charset = utf-8 +trim_trailing_whitespace = true +# The left part of the curly bracket should be on the next line +curly_bracket_next_line = true +spaces_around_operators = true +spaces_around_brackets = none +indent_brace_style = Allman + +[src/dnsmasq/**] +indent_style = space +indent_size = 2 +insert_final_newline = false +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml new file mode 100644 index 00000000..7cd23e36 --- /dev/null +++ b/.github/workflows/editorconfig.yml @@ -0,0 +1,12 @@ +name: EditorConfig Checker + +on: + push: + +jobs: + editorconfig: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: editorconfig-checker/action-editorconfig-checker@main + - run: editorconfig-checker