kowainik / kowainik/stan

How to exclude generated files?

Open
#399 4 comments 1 reaction 0 assignees View on GitHub
config :gear: question
Dominant language
Haskell
Stars
597
Forks
53
PR merge metrics
No merged PRs in 30d

Description

I'm using Happy to generate `.hs` files from `.y` files, and stan reports errors in the `.hs` file (notably, Happy-generated files use `(!!)`) that I would like to exclude from reports.

How can I exclude that file?

Is that currently possible? The problem is that apparently you're supposed to report the path to the `.hs` file relative to the root of the project, but generated files don't have a stable location. The path to the file shown in the report is the absolute path on my filesystem, going into the `dist-newstyle/` directory (see picture). One way would be to have a way to ignore any file whose path ends with `MyLib/Parser.hs`, rather than matching a relative path exactly.

![Screenshot_2020-10-30 Stan Report](https://user-images.githubusercontent.com/2515201/97742498-bd791380-1aba-11eb-85a2-adcbae335c56.png)

Contributor guide

Open the contributing guide

Research direction

The issue provides no source file, test, or entry point to start from. First trace how Stan reads exclusion paths and how report paths are produced, then determine whether generated files can be matched by a stable suffix or another pattern. Done means the requested generated `.hs` file can be excluded reliably and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.