kowainik / stan

🕵️ Haskell STatic ANalyser
https://kowainik.github.io/projects/stan
Mozilla Public License 2.0
562 stars 48 forks source link

`file = "relative_path_to_excluded_file"` appears to be OS-specific #531

Open mpilgrem opened 8 months ago

mpilgrem commented 8 months ago

On Windows, I tried:

# Anti-pattern: Slow 'length' for Text
[[check]]
  id = "STAN-0208"
  file = "src/Stack/PackageDump.hs"
  type = "Exclude"

but that did not exclude what I wanted to be excluded. I had to specify:

# Anti-pattern: Slow 'length' for Text
[[check]]
  id = "STAN-0208"
  file = "src\\Stack\\PackageDump.hs"
  type = "Exclude"

I think that means that file-specific exclusions have to be stated twice in each .stan.toml file that is going to be used on both Windows and Unix-like operating systems. I assume the same is true for directory-specific exclusions.

It would be good if they only had to be specified once.