Skip to content

Commit d441025

Browse files
chore(data_access_generators): format files + config
Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
1 parent da8e442 commit d441025

File tree

5 files changed

+19
-283
lines changed

5 files changed

+19
-283
lines changed

libs/astarte_data_access_generators/.credo.exs

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# This file is part of Astarte.
33
#
4-
# Copyright 2025 SECO Mind Srl
4+
# Copyright 2025 - 2026 SECO Mind Srl
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -16,26 +16,7 @@
1616
# limitations under the License.
1717
#
1818

19-
locals_without_parens = [
20-
# stream_data
21-
all: :*,
22-
check: 1,
23-
check: 2,
24-
property: 1,
25-
property: 2,
26-
27-
# astarte_generators
28-
gen: :*
29-
]
30-
3119
[
32-
inputs: [
33-
"lib/**/*.{ex,exs}",
34-
"test/**/*.{ex,exs}",
35-
"mix.exs",
36-
"config/**/*.{ex,exs}",
37-
".credo.exs"
38-
],
39-
locals_without_parens: locals_without_parens,
40-
export: [locals_without_parens: locals_without_parens]
20+
import_deps: [:ecto, :stream_data, :astarte_generators],
21+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4122
]

libs/astarte_data_access_generators/.tool-versions

Lines changed: 0 additions & 2 deletions
This file was deleted.

libs/astarte_data_access_generators/LICENSE.txt

Lines changed: 0 additions & 202 deletions
This file was deleted.

libs/astarte_data_access_generators/lib/mapping.ex

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# This file is part of Astarte.
33
#
4-
# Copyright 2025 SECO Mind Srl
4+
# Copyright 2025 - 2026 SECO Mind Srl
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -34,23 +34,21 @@ defmodule Astarte.DataAccess.Generators.Mapping do
3434

3535
@spec from_core(StreamData.t(Mapping.t())) :: StreamData.t(MappingData.t())
3636
def from_core(gen) do
37-
gen all(
38-
%Mapping{
39-
endpoint: endpoint,
40-
value_type: value_type,
41-
reliability: reliability,
42-
retention: retention,
43-
expiry: expiry,
44-
database_retention_policy: database_retention_policy,
45-
database_retention_ttl: database_retention_ttl,
46-
allow_unset: allow_unset,
47-
explicit_timestamp: explicit_timestamp,
48-
endpoint_id: endpoint_id,
49-
interface_id: interface_id,
50-
doc: doc,
51-
description: description
52-
} <- gen
53-
) do
37+
gen all %Mapping{
38+
endpoint: endpoint,
39+
value_type: value_type,
40+
reliability: reliability,
41+
retention: retention,
42+
expiry: expiry,
43+
database_retention_policy: database_retention_policy,
44+
database_retention_ttl: database_retention_ttl,
45+
allow_unset: allow_unset,
46+
explicit_timestamp: explicit_timestamp,
47+
endpoint_id: endpoint_id,
48+
interface_id: interface_id,
49+
doc: doc,
50+
description: description
51+
} <- gen do
5452
%MappingData{
5553
endpoint: endpoint,
5654
value_type: value_type,

0 commit comments

Comments
 (0)