← Back to team overview

kicad-developers team mailing list archive

Re: Footprint filter match behavior

 

Agreed, they do look like standard globbing patterns and should probably
behave that way. In fact globs have to line up at _both_ ends... but I
think a lot of people set the filters assuming left-aligned matching, so
I don't think I want to go that far.

On Wed, Mar 15, 2017 at 12:16:20AM +0800, John Beard wrote:
> HI Chris,
> 
> That sounds reasonable. A match pattern like "R_*" looks like a
> globbing pattern, and I'd expect globbing patterns to act like that in
> general. It's how most bash works, for a start, as well as things like
> find(1).
> 
> I imagine that most footprints with a pattern like "R_*" intended it
> to be match-at-front anyway.
> 
> Cheers,
> 
> John
> 
> On Tue, Mar 14, 2017 at 11:57 PM, Chris Pavlina <pavlina.chris@xxxxxxxxx> wrote:
> > Hi,
> >
> > Currently, the footprint filter strings in a component match a footprint
> > if they occur *anywhere* in the footprint's name. This leads to some
> > possibly unintentional matches - for example, "R" has a filter "R_*",
> > which matches literally every footprint with R_ somewhere in its name.
> > This is quite a lot of footprints that are NOT resistors.
> >
> > What if I changed this to require matching at the beginning of the
> > string? A filter meant to match anywhere in the string could be written
> > "*R_*" instead. This should significantly reduce the number of false
> > positive matches.
> >
> > --
> > Chris
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp


References