[m-rev.] for post-commit review: --limit-error-contexts

Peter Wang novalazy at gmail.com
Wed Feb 4 15:02:57 AEDT 2015


On Wed, 4 Feb 2015 12:39:11 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> 
> On Tue, 3 Feb 2015, Zoltan Somogyi wrote:
> 
> > I found the need for this when working on rewriting modules.m
> > for the new item structure.
> >
> > The diff itself is quite straightforward. The question I would like
> > feedback on is: do people think this is a generally useful option
> > that should be documented for use by non-developers?
> 
> I think so -- it's not just (Mercury) developers who need to work on
> sections of large files.

I've not wanted such a feature myself.

Perhaps there should be a warning about suppressed messages if there
isn't one.  You (rather, I) might forget that a limit has been set,
leading to unnecessary frustration.

Contexts are associated with files and not modules, but would it be
possible to reuse the generic way of limiting options to modules:

    MCFLAGS-mod += --limit-error-contexts min-max,min-max

That would reduce the amount of syntax peculiar to this option.

Otherwise, the file:range syntax should treat everything up to the
rightmost colon as the path.  Granted, colons should be avoided for
other reasons.  On Windows, mmc -f may be used with absolute paths
and those can contain ':' for the drive.


+%       "\tPrint errors and warning for the named file only when their",
+%       "\tline number is in one of the specified ranges.",

warnings

+%       "\tEither the minimum or the maximum line number in the range",
+%       "\tmay be missing, in which case the range has no lower or upper",
+%       "\tlimit respectively.",

The minimum or maximum line number in each range may be omitted,
in which case the range has no lower or upper bound respectively.

Peter



More information about the reviews mailing list