exercism / exercism/elixir-analyzer

Allow for alternative erlang solutions in `captains-log`

Đang mở
#340 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
x:action/improve
Ngôn ngữ chính
Elixir
Star
33
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Given that the main focus of this exercise is to use erlang libaries, it feels strange to receive analyzer errors for the following two solutions:

`random_ship_registry/0` (prompts to use `Enum.random/1`):
```elixir
def random_ship_registry_number() do
digits = :rand.uniform(9000) + 999

"NCC-#{digits}"
end
```

`format_stardate/1` (prompts to use `:io_lib.format("~.1f", [stardate]) |> to_string()`):
```elixir
def format_stardate(stardate) do
stardate
|> :erlang.float_to_binary([{:decimals, 1}])
end
```

Would it make sense to have the analyzer allow one or both of these alternate solutions, since they are still using erlang?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.