Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Parses invalid code as valid in tuple esque structure

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
elixir
Domain
compilers

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elixir-tools/spitfire

All issues in elixir-tools/spitfire

Similar issues

More Elixir issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.