Merge pull request #7059 from savonarola/elixir-stylecheck
chore(codestyle): add formatting check for Elixir code
This commit is contained in:
commit
2aeb1bc0e8
|
@ -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
|
||||||
|
|
4
mix.exs
4
mix.exs
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue