Author Topic: B6: error parsing exclusion not working?  (Read 3738 times)

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
B6: error parsing exclusion not working?
« on: October 07, 2014, 03:08:11 AM »
I'm trying to get the error parser to ignore lines that start with capitalized words followed by a colon (skipping leading white-space if needed). Eg, the first three lines of the following:

DATE: Mon Oct  6 22:53:38 2014
UNAME: blah
   VERSION: blah
error: xxx

When tested with the Regex Evaluator, the following SlickEdit regexp matches the first three lines but not the fourth (which is in lower case), as expected:

   ^[ ]*[A-Z]+

However, the very same expression matches all four lines when validated using the "Edit Expression" window of the error parsing configuration window.

More importantly, at build time these exclusions aren't being applied. After a build, hitting "Ctrl-Shift-Down" jumps to the "DATE" line of the build output and then presents a "Find File" popup.

I moved the exclusions category to the top priority, and within exclusions the above regexp is first.

Iker

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: B6: error parsing exclusion not working?
« Reply #1 on: October 07, 2014, 11:57:14 AM »
Here's a (hopefully) reproducible example. I unchecked all of the existing error parsing categories and activated a new one with only one regexp (which I copied from another category):

^\*@(cfe\: (Error|Warning)\:|error(~:f|[*:])|warning(~:f|[:*])|\(|<|)\*@ *{:q|(.\\|):p}( +| *\(|\:|, line ){:d#}(,|\:|)( *{:d#}|> :i|)(\)|) @(error|){(\:|Error[~s]|Fatal|Warning)?*$}

I then validated the expression using this test case:

----------------------
DATE: Tue Oct  7 07:45:02 2014
        Built target xtest
        [ 23%] Building CXX object src/CMakeFiles/xxx.dir/test.cpp.o
        /home/iker/Proj/src/xxx/test.cpp:543:5: error: expected initializer before ?pair_VMap_vString?

The validation tool correctly matches only the error lines, but at build time I get a match on the "DATE" line.

Iker


IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: B6: error parsing exclusion not working?
« Reply #2 on: October 07, 2014, 12:06:46 PM »
To clarify - the error markers are set correctly. The problem is only when I try to navigate the errors using "Ctrl-Shift-Down".

Iker

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: B6: error parsing exclusion not working?
« Reply #3 on: October 07, 2014, 09:27:02 PM »
Also, I can't immediately hit "ctrl-shift-down" after doing a build with "ctrl-m" since nothing happens. I have to first explicitly switch to the build window before navigating (which then results in the problem described earlier).

Iker

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: B6: error parsing exclusion not working?
« Reply #4 on: October 07, 2014, 11:06:05 PM »
At the moment, error parsing exclusions and inclusions are all case insensitive. Ideally this should be configurable but I guess this limitation hasn't been an issue. For now, you can work around the limitation by specifying a specific word instead of just caring about the case.

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: B6: error parsing exclusion not working?
« Reply #5 on: October 08, 2014, 01:45:54 AM »
Thanks - that explains the validation tool's behavior (wrt the lower case "error:" string). But, why does ctrl-shift-down/next-error jump to the "DATE" line when the configured regexps don't match that line?

Iker

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: B6: error parsing exclusion not working?
« Reply #6 on: October 08, 2014, 11:47:51 AM »
I'm not surprised. That lines looks like one of the inclusion patterns. The inclusion patterns are pretty complicated so it's hard to figure out.

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: B6: error parsing exclusion not working?
« Reply #7 on: October 08, 2014, 03:29:01 PM »
A restart resolved the issue - it appears that changes to the error parser config are reflected immediately in the message list but not by the next-error command. To recap:
  • Removed all inclusions from error parse configuration
  • Added single inclusion that matched error lines but not "DATE:" when tested in the validation window (see earlier post).
  • Ran a build that produced an error. The message list correctly showed only the error line.
  • Hitting ctrl-shift-down/next-error incorrectly jumped to the "DATE:" line.
  • Restarted SE and repeated. Hitting next-error jumped to the correct line as expected.
Regards,
Iker