Skip to content

Commit d13da1f

Browse files
fhunlethmobileoverlord
authored andcommitted
mix format
1 parent 7f26b84 commit d13da1f

File tree

7 files changed

+42
-38
lines changed

7 files changed

+42
-38
lines changed

.formatter.exs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

mix.exs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ defmodule NervesSystemBbb.Mixfile do
33

44
@app :nerves_system_bbb
55
@version Path.join(__DIR__, "VERSION")
6-
|> File.read!
7-
|> String.trim
6+
|> File.read!()
7+
|> String.trim()
88

99
def project do
1010
[
@@ -47,7 +47,7 @@ defmodule NervesSystemBbb.Mixfile do
4747

4848
defp deps do
4949
[
50-
{:nerves, "~> 1.0-rc", runtime: false },
50+
{:nerves, "~> 1.0-rc", runtime: false},
5151
{:nerves_system_br, "~> 1.0-rc", runtime: false},
5252
{:nerves_toolchain_arm_unknown_linux_gnueabihf, "~> 1.0-rc", runtime: false},
5353
{:nerves_system_linter, "~> 0.3.0", runtime: false},
@@ -88,7 +88,7 @@ defmodule NervesSystemBbb.Mixfile do
8888
"linux"
8989
]
9090
end
91-
91+
9292
# Copy the images referenced by docs, since ex_doc doesn't do this.
9393
defp copy_images(_) do
9494
File.cp_r("assets", "doc/assets")

test/config/config.exs

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ config :shoehorn,
2525
init: [:nerves_runtime, :nerves_network]
2626

2727
# Only trust signed firmware
28-
config :nerves_system_test, :firmware,
29-
public_key: System.get_env("NERVES_FW_PUB_KEY")
28+
config :nerves_system_test, :firmware, public_key: System.get_env("NERVES_FW_PUB_KEY")
3029

3130
# Configure system_registry term storage to store the wifi credentials on the
3231
# app data partition. If the device is using eth0 as the primary connection
@@ -81,8 +80,8 @@ config :nerves_runtime, :kv,
8180
nerves_fw_application_part0_target: "/root",
8281
nerves_fw_architecture: arch,
8382
nerves_fw_author: "The Nerves Team",
84-
nerves_fw_description: Mix.Project.config[:description],
83+
nerves_fw_description: Mix.Project.config()[:description],
8584
nerves_fw_platform: platform,
86-
nerves_fw_product: Mix.Project.config[:app],
85+
nerves_fw_product: Mix.Project.config()[:app],
8786
nerves_fw_vcs_identifier: System.get_env("NERVES_FW_VCS_IDENTIFIER"),
88-
nerves_fw_version: Mix.Project.config[:version]
87+
nerves_fw_version: Mix.Project.config()[:version]

test/lib/test.ex

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
defmodule Test do
2-
32
end

test/mix.exs

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
if Mix.env == :test do
2-
hash = :os.cmd('git rev-parse HEAD')
1+
if Mix.env() == :test do
2+
hash =
3+
:os.cmd('git rev-parse HEAD')
34
|> to_string
4-
|> String.trim
5+
|> String.trim()
6+
57
System.put_env("NERVES_FW_VCS_IDENTIFIER", hash)
68
end
79

810
defmodule Test.Mixfile do
911
use Mix.Project
1012

1113
def project do
12-
[app: :test,
13-
version: "0.1.0",
14-
elixir: "~> 1.4",
15-
archives: [nerves_bootstrap: "~> 1.0-rc"],
16-
build_embedded: Mix.env == :prod,
17-
start_permanent: Mix.env == :prod,
18-
aliases: [loadconfig: [&bootstrap/1]],
19-
deps: deps()]
14+
[
15+
app: :test,
16+
version: "0.1.0",
17+
elixir: "~> 1.4",
18+
archives: [nerves_bootstrap: "~> 1.0-rc"],
19+
build_embedded: Mix.env() == :prod,
20+
start_permanent: Mix.env() == :prod,
21+
aliases: [loadconfig: [&bootstrap/1]],
22+
deps: deps()
23+
]
2024
end
2125

2226
# Configuration for the OTP application.
@@ -45,5 +49,4 @@ defmodule Test.Mixfile do
4549
{:nerves_system_test, github: "nerves-project/nerves_system_test"}
4650
]
4751
end
48-
4952
end

test/priv/test/test_helper.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ExUnit.start
1+
ExUnit.start()

test/rel/config.exs

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
use Mix.Releases.Config,
2-
# This sets the default release built by `mix release`
3-
default_release: :default,
4-
# This sets the default environment used by `mix release`
5-
default_environment: :dev
2+
# This sets the default release built by `mix release`
3+
default_release: :default,
4+
# This sets the default environment used by `mix release`
5+
default_environment: :dev
66

77
# For a full list of config options for both releases
88
# and environments, visit https://hexdocs.pm/distillery/configuration.html
99

10-
1110
# You may define one or more environments in this file,
1211
# an environment's settings will override those of a release
1312
# when building in that environment, this combination of release
1413
# and environment configuration is called a profile
1514

1615
environment :dev do
17-
set cookie: :"eeW260*@lLKngEX.N;Ke>Lu:UWX{WHz_%Z($yrn=YYYU$UuB>2sftLYf!X[}/*Mo"
16+
set(cookie: :"eeW260*@lLKngEX.N;Ke>Lu:UWX{WHz_%Z($yrn=YYYU$UuB>2sftLYf!X[}/*Mo")
1817
end
1918

2019
environment :prod do
21-
set cookie: :"eeW260*@lLKngEX.N;Ke>Lu:UWX{WHz_%Z($yrn=YYYU$UuB>2sftLYf!X[}/*Mo"
20+
set(cookie: :"eeW260*@lLKngEX.N;Ke>Lu:UWX{WHz_%Z($yrn=YYYU$UuB>2sftLYf!X[}/*Mo")
2221
end
2322

2423
# You may define one or more releases in this file.
@@ -27,14 +26,14 @@ end
2726
# will be used by default
2827

2928
release :test do
30-
set version: current_version(:test)
31-
plugin Shoehorn
29+
set(version: current_version(:test))
30+
plugin(Shoehorn)
31+
3232
if System.get_env("NERVES_SYSTEM") do
33-
set dev_mode: false
34-
set include_src: false
35-
set include_erts: System.get_env("ERL_LIB_DIR")
36-
set include_system_libs: System.get_env("ERL_SYSTEM_LIB_DIR")
37-
set vm_args: "rel/vm.args"
33+
set(dev_mode: false)
34+
set(include_src: false)
35+
set(include_erts: System.get_env("ERL_LIB_DIR"))
36+
set(include_system_libs: System.get_env("ERL_SYSTEM_LIB_DIR"))
37+
set(vm_args: "rel/vm.args")
3838
end
3939
end
40-

0 commit comments

Comments
 (0)