hi,<br><br><div>&lt;bzr help rules&gt; wrote: <br>
</div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Rules are defined in ini file format where the sections are file glob<br>patterns and the contents of each section are the preferences for files<br>
matching that pattern. For example:<br><br>&nbsp;&nbsp;&nbsp; [name *.bat]<br>&nbsp;&nbsp;&nbsp; eol = dos<br><br>&nbsp;&nbsp;&nbsp; [name *.html]<br>&nbsp;&nbsp;&nbsp; keywords = escape</blockquote><br>I&#39;ve always suspected but finally decided that I NEED rules to properly <br>
configure my text checker plugin.<br>here is an example of what I&#39;d like to configure:<br>==<br>[name *.py, *.java, NEWS, README]<br>trailing_whitespace=fail<br>leading_tabs=warn<br>newline_at_eof=warn<br>long_line_length=80<br>
long_lines=ask<br>==<br><br>As you can see I&#39;d like to specify the same bunch of rules for multiple globs.<br><br>I was thinking that we could split them up in rules.IniBasedRulesSearcher.__init__, <br>but then we&#39;d have to <br>
(1) keep a dict of pattern-&gt;rules entries for when we match rules.<br>I figured that the config is read into memory anyways, so it wouldn&#39;t be that bad<br>to get what we need all at once and keep it. OR <br>(2) we just need to keep a dict of glob-&gt;section mappings.<br>
Would one of those be ok?<br><br>Also I think it would be handy to have a command to print out all the rules affecting<br>a specific branch or file eg:<br>bzr rules<br>[name *.bat]<br>eol = dos<br>...<br><br>bzr rules x.bat<br>

eol = dos<br>
<br>But then we&#39;d have to rename the rules help topic.<br><br>regards<br>marius<br>