bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

Change strings passed to bids ignore test?

Open rwblair opened this issue 2 years ago • 1 comments

.bidsignore entries not working for this dataset: https://github.com/bids-standard/bids-examples/blob/master/fnirs_automaticity/.bidsignore

Neither of these will work: phenotype/practicelogbook.json /phenotype/practicelogbook.json

**/phenotype/practicelogbook.json Does, but requiring star star for things addressed from the root seems silly. The string being passed to the ignore test function is the file.path which is /phenotype/practicelogbook.json

The leading slash in the ignore file puts the slash before the start of line carot:

    IgnoreRule {
      origin: "/phenotype/practicelogbook.json",
      pattern: "/phenotype/practicelogbook.json",
      negative: false,
      regex: /^phenotype\/practicelogbook\.json(?=$|\/$)/i
    },

Maybe we chomp leading slashes in the test function?

rwblair avatar Jun 15 '23 20:06 rwblair

I think the regex should start with (^|/), not ^. Is that possible?

effigies avatar Jun 15 '23 21:06 effigies

I believe this is done.

effigies avatar Aug 07 '24 01:08 effigies