Shopify / Shopify/packwerk

Assume Ruby Files for parser

Open
#10 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Ruby
Stars
1.9k
Forks
121
Avg merge
2m
Merged PRs (30d)
1

Description

To simplify our lives, let's assume that files are Ruby if they aren't recognized by any other parser (for now, that's just .erb). This will eliminate encountering "unknown file type" errors.

If assuming Ruby fails, we'll have to encourage people to use the include / exclude globs in their configs to handle other types of files.

We could assume a file without an extension is an executable, check to see if it looks like a Ruby executable, and ignore it if it's not. @thegedge prefers being explicit, but can understand that a larger repo may have built up a lot of executable files, many of which may not be Ruby.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the parser dispatch and the handling that produces "unknown file type" errors. Check how .erb and extensionless files are classified, then add coverage showing that otherwise-unrecognized files are treated as Ruby and that non-Ruby executables are handled as described; done means these files no longer produce unknown-type errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.