Merge pull request #7059 from savonarola/elixir-stylecheck

chore(codestyle): add formatting check for Elixir code
This commit is contained in:
Ilya Averyanov 2022-02-21 11:43:14 +03:00 committed by GitHub
commit 2aeb1bc0e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -4,7 +4,16 @@ on: [pull_request]
jobs: jobs:
build: build:
strategy:
matrix:
otp:
- 24.1.5-4
elixir:
- 1.13.2
os:
- ubuntu20.04
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: "ghcr.io/emqx/emqx-builder/5.0-5:${{ matrix.elixir}}-${{ matrix.otp }}-${{ matrix.os }}"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
@ -15,3 +24,6 @@ jobs:
- name: Check line-break at EOF - name: Check line-break at EOF
run: | run: |
./scripts/check-nl-at-eof.sh ./scripts/check-nl-at-eof.sh
- name: Check Elixir code formatting
run: |
mix format --check-formatted

View File

@ -36,4 +36,4 @@
-endif. -endif.
-define(RESOURCE_GROUP, <<"emqx_authn">>). -define(RESOURCE_GROUP, <<"emqx_authn">>).

View File

@ -72,4 +72,4 @@
, count => 1 , count => 1
}). }).
-define(RESOURCE_GROUP, <<"emqx_authz">>). -define(RESOURCE_GROUP, <<"emqx_authz">>).

View File

@ -553,7 +553,7 @@ defmodule EMQXUmbrella.MixProject do
emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type), emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type),
built_on_arch: built_on(), built_on_arch: built_on(),
is_elixir: "yes", is_elixir: "yes",
is_enterprise: (if edition_type == :enterprise, do: "yes", else: "no") is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
] ]
end end
@ -581,7 +581,7 @@ defmodule EMQXUmbrella.MixProject do
emqx_schema_mod: emqx_schema_mod(edition_type), emqx_schema_mod: emqx_schema_mod(edition_type),
emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type), emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type),
is_elixir: "yes", is_elixir: "yes",
is_enterprise: (if edition_type == :enterprise, do: "yes", else: "no") is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
] ]
end end