Danek Duvall wrote:
> On Tue, Jan 27, 2009 at 06:07:29PM -0700, Ali Bahrami wrote:
> 
>> mapfilechk examines any file with a name that matches '*mapfile*',
>> and ignores all others. However, there are a small number of files
>> in OSnet that match this pattern that are not actually mapfiles.
>> For instance, mapfilechk itself. I need to have an exceptions list
>> for these files. I am using the .NOT file mechanism supported in
>> cdm.py via the not_check() function.
> 
> So a design question -- would it be worth it to do a simple bit of parsing
> to see whether or not the file you're looking at actually could be a
> mapfile?  Say, the first non-comment non-blank line matches
> 
>     ^<identifier><whitespace>"{"$
> 
> thus being able to exclude the readme and the python file without having to
> put them in a .NOT file?  Perhaps our mapfiles aren't that well formed --
> though perhaps them mapfilechk should do some styling analysis, too. :)
> 
> Just a suggestion -- I don't care all that much, really.
> 
> Danek


I'd prefer not to take that route. Partly, I just like the exception list
idea better --- many of our tools already use them. But also, I've found
a couple of files that I'd want to exclude that actually do follow the
pattern you described above. One is the mapfile_skel file used by kmdb
to automatically generate mapfiles for the mdb loadable objects.

Another thing I like is that the exception_lists approach that Mark
came up with is general to all the cadmium tools, instead of being
just a mapfilechk specific thing.

- Ali

Reply via email to