Open Lysxia opened 3 years ago
@Lysxia if I understand you correctly, you need to exclude the whole folder of dist-newstyle
?
This is possible to do with:
[[check]]
type = "Exclude"
directory = "dist-newstyle/"
filter = "all"
Thanks! It seems I have to give the whole prefix, "dist-newstyle/"
does not suffice:
directory = "/home/..../mylib/dist-newstyle"
Also this seems overly specific to Cabal. Stack users would then want to exclude .stack-work
. It is at the same time quite coarse grained. What do you think of a way to match filepaths by their suffixes, so one could write files = "*/Parser.hs"
for instance? I can try to work on a PR.
Sure, this sounds like a great idea, and there is a use-case for that. I think we can introduce globs to our configs.
Stan itself is working with the relative paths, so it depends on where you call Stan from (but note, that Stan is also looking for the .cabal
file).
I assume that that full path with a prefix is some work of the HIE
as we are taking the pathname from there, and for generated files, it seems to add the whole prefix 🤔
I was taking a look at this while working on https://github.com/chshersh/iris/issues/64, and as @vrom911 pointed out, HIE is putting the absolute path in the case of generated files:
After brainstorming a little bit, I come up with the following ideas. Let me know your thoughts so I can tackle this issue :)
.stack-work
, or .dist-newstyle
on it.ScopeDirectory
would also check for the directory with the current working dir preppended to it: https://github.com/kowainik/stan/blob/c8560bd13f9e272a1a83773a06f2112df3ff4550/src/Stan/Config.hs#L212-L225
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 thedist-newstyle/
directory (see picture). One way would be to have a way to ignore any file whose path ends withMyLib/Parser.hs
, rather than matching a relative path exactly.