Parses invalid code as valid in tuple esque structure
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
Research direction
Start with the failing Elixir test and compare s2q(code) with Spitfire.parse(code); trace tuple and map parsing around the invalid => expression. Done when Spitfire returns an error instead of the shown {:ok,...} result, with a regression test covering this case.
Written by the indexing model from the issue text.
Description
Description
Failing test
code = """
{
attributes: %{
"polyline" => Faker.Lorem.characters()
},
type: "shape"
}
"""
assert s2q(code) == Spitfire.parse(code)
Fails with
Assertion with == failed
code: assert s2q(code) == Spitfire.parse(code)
left: {:error, {[line: 5, column: 16], "syntax error before: ", "eol"}}
right: {
:ok,
{
:{},
[end_of_expression: [newlines: 1, line: 6, column: 2], newlines: 1, closing: [line: 6, column: 1], line: 1, column: 1],
[[attributes: {:%{}, [newlines: 1, closing: [line: 4, column: 3], line: 2, column: 15], [{"polyline", {{:., [line: 3, column: 30], [{:__aliases__, [last: [line: 3, column: 25], line: 3, column: 19], [:Faker, :Lorem]}, :characters]}, [closing: [line: 3, column: 42], line: 3, column:
31], []}}]}, type: "shape"]]
}
}
Spitfire should report this as an error
- Dominant language
- Elixir
- Stars
- 103
- Forks
- 15
- Avg merge
- 4h 17m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elixir-tools/spitfire
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
elixir-tools/spitfire#135 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
elixir-tools/spitfire#127 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elixir-tools/spitfire#119 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
elixir-tools/spitfire#31 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
elixir-tools/spitfire#18 · 3 comments ·
All issues in elixir-tools/spitfire
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
carverauto/serviceradar#5264 ·
Maintainers usually reply within 1 day
-
replication_slot_teardown crashes with MatchError on unreachable tenant databasePossibly taken @sushrut1058 claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Handle short ciphertext in AES-GCM Decrypt instead of panickingPossibly taken @pamod-madubashana claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
semaphoreio/semaphore#1305 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuinnWilton/argus#5 · 1 comment ·
-
help-wanted L: docker L: elm L: github:actions L: helm L: ruby:bundler
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
dependabot/dependabot-core#16425 ·
Maintainers usually reply within 2 days