Author Topic: Configure Error Parsing  (Read 12324 times)

Exolon

  • Community Member
  • Posts: 21
  • Hero Points: 2
Configure Error Parsing
« on: June 29, 2006, 06:06:33 am »
Hi,

has anyone experiences with the new 'Configure Error Parsing' feature in V11?

I tried to configure PCLints messages by configure PCLint to print the messages in the same way as MS VC:

-"format=%(%f(%l)%) : error %n: (%t -- %m)"

the outcome of this is (e.g.):

D:\GUI\source\ImageViewer.cpp(503) : error 524: (Warning -- Loss of precision (arg. no. 1) (double to int))

The Error Parsing Validation command say me the line fits to the Visual Studio expression. But if I lint my Files (included as build tool) the output is not parsed.

Did I missed something.

Thanks

Exo



Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Configure Error Parsing
« Reply #1 on: June 29, 2006, 08:52:48 am »
@exo: have you already tried 11.0.1? I had a similar problem when parsing python errors on 11.0.0 but I was not able to reproduce it on 11.0.1.

Anyway I am still wondering if it is possible to parse multi-line errors - for me it seems like this option is not available so I am not able to parse full Python error messages like

Code: [Select]
Traceback (most recent call last):
  File "I:\CMonkey\test.py", line 4, in ?
    sdfsadf
NameError: name 'sdfsadf' is not defined

 :(

Additionally I find this red error markers very helpful but do they only appear on Java sources?



Cheers
Gary

Exolon

  • Community Member
  • Posts: 21
  • Hero Points: 2
Re: Configure Error Parsing
« Reply #2 on: June 29, 2006, 10:54:02 am »
Hi Gary,

I currently use 11.0.1 and the red error markers work more-or-less good here with c++ (both MinGW and MS-VC). Unfortunately the do not work with my PCLint output.

Thanx

Exo

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Configure Error Parsing
« Reply #3 on: June 29, 2006, 11:36:49 am »
...the red error markers work more-or-less good here with c++ (both MinGW and MS-VC). Unfortunately the do not work with my PCLint output.

I assume that the error markers only work when they are explicitly supported for a language - custom error parsers only enable the "Build > Go to Error or Include" functionality.

Can anybody confirm that?

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1013
  • Hero Points: 85
Re: Configure Error Parsing
« Reply #4 on: June 29, 2006, 09:02:08 pm »
The process of setting the error markers is done by parsing the text in the Build window, using all of the enabled regular expressions as seen from the Configure Error Parsing dialog.  You are be able to add your own regular expressions through that dialog, and "Build > Go to Error or Include" does work with any custom regular expressions that are enabled.

Also, the event that sets all the error markers is only done after a Build or Compile, it is not called for other build tools under the Build menu.

Gary

  • Community Member
  • Posts: 43
  • Hero Points: 5
Re: Configure Error Parsing
« Reply #5 on: June 29, 2006, 09:32:53 pm »
Also, the event that sets all the error markers is only done after a Build or Compile, it is not called for other build tools under the Build menu.

Thanks Lee - that was the thing I was not aware of.


Gary

Exolon

  • Community Member
  • Posts: 21
  • Hero Points: 2
Re: Configure Error Parsing
« Reply #6 on: July 04, 2006, 08:05:31 am »
Also, the event that sets all the error markers is only done after a Build or Compile, it is not called for other build tools under the Build menu.

How can I call this event after custom build tool or after a toolbar command?

Thanks

Exo


hs2

  • Senior Community Member
  • Posts: 2725
  • Hero Points: 281
Re: Configure Error Parsing
« Reply #7 on: July 04, 2006, 09:58:08 am »
set_error_markers(); in a macro
or
set-error-markers on cmdline

HS2

paladin

  • Community Member
  • Posts: 10
  • Hero Points: 0
Re: Configure Error Parsing
« Reply #8 on: July 07, 2006, 09:21:23 pm »
Just wondered if anyone has been able to make the this work in 11.0.1 (Win32)? I've been using the Pc-Lint 'env-sled.lnt' environment with 'some' success with 11.0.0 but the 11.0.1 update doesn't function at all... Using the 'process next error' button doesn't select any error lines (although it looks as though it is sequencing through the command invocation of 'build' capture).  Cutting and pasting the error buffer from the build window into the parser 'configuration validation' for the 'def1' parser finds and reports the errors and the correct line numbers (first parser in my list)... using the 'set-error-makers' lock the application up.... Waiting to hear back from support...

hs2

  • Senior Community Member
  • Posts: 2725
  • Hero Points: 281
Re: Configure Error Parsing
« Reply #9 on: July 11, 2006, 07:10:16 am »
Had a similar probllem. Really strange - everything was fine but error parsing didn't work...
Finally I tried a
Code: [Select]
reset_next_error(); // cmdline: reset-next-error and after that it worked !
Added this to my custom build macro before starting the related shell-command.
I tried a lot of things and I hope the workaround (?) above was the real solution ...

Good luck - HS2

PS: I thought this issue was just related to _my_ (patched) Slick config and therefore I didn't post this hint yet.

see http://community.slickedit.com/index.php?topic=130.msg518#msg518
Quote
Try Project -> Properties -> Open Tab to setup auto-execution of reset-next-error
Just enter the macros ( e.g. reset-next-error ) / shell commands you want to execute each time the project is opened / activated.
Note: These lines are imm. executed when quitting the dialog ('OK') ! I already did a related bug report ...
« Last Edit: July 19, 2006, 05:21:48 am by hs2 »

jbezem

  • Community Member
  • Posts: 80
  • Hero Points: 8
Re: Configure Error Parsing
« Reply #10 on: July 14, 2006, 06:29:11 am »
When I started with v11 I wasn't aware of the new ways, so I changed def_error_re2 as always. Didn't work.
The I added some regular expressions through 'Configure Error Parsing...' after I discovered that. Didn't work.
Upgrading to v11.0.1 made it work partly, but currently I have to recompile error.e after every restart of VS.
BTW, I compile outside of VS redirecting the output to a file. Loading the file in SE, and using 'cursor_error' to go places.
Can anyone confirm such behavior, or is it just my FUBAR installation?

Johan

hs2

  • Senior Community Member
  • Posts: 2725
  • Hero Points: 281
Re: Configure Error Parsing
« Reply #11 on: July 18, 2006, 08:04:55 am »
That's interesting - I also used to setup def_error_re2 for my custom build scripts.
And while trying to get my error parsing working again with v11 I also re-compiled error.e and it worked - but only for a while (curr. session ? ... I can't remember.)
Anyway - now I've to use a real external batch which is running under control of vsbuild instead of using my own Slick-C 'build'-macro (using concur_command calls internally).
With this configuration error parsing works and it's sync'd to the end of the custom build script.
Hope you can also adopt your build env. this way... Good luck.
HS2

jark

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: Configure Error Parsing
« Reply #12 on: September 05, 2006, 12:52:55 pm »
Hi,

I am experiencing the same error-markers-not-shown problem in SE 10.0.2 / VC++ / Win XP environment. Jumping to an error from build window works fine but error markers are not automatically shown in the editor window.

By issuing 'set-error-markers' command after a build, I can get an error marker to appear sometimes but not allways. Typically also only one marker is shown.

Does anybody have similar kind of symptons or know how to get it work?

Best regards,
Jari

tkadien

  • Junior Community Member
  • Posts: 4
  • Hero Points: 1
Re: Configure Error Parsing
« Reply #13 on: October 07, 2008, 05:07:58 pm »
Check Gimple.com  and search for env-sl3.lnt.  Give the whole scoop how to run & get the Red 'X's
The basic jist is put the following in your lint configuration file

-"format=%(%f %l %)error %n: (%t -- %m)"     //  Messages will contain
    //  file information (%f), the line number (%l), the
   //  message number (%n), message type (%t) and message text (%m).
    //  Notice that all messages are labeled 'error' but are then
    //  followed by a type (such as Warning, Info, Note, etc.)

-hF2    //  Make sure we ALWAYS provide file information ('F') and use 2
   //  lines (line in error plus message).

-width(0) //  don't break messages at any particular width