<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JB Enterprises – Johan Bezem &#187; Eclipse</title>
	<atom:link href="http://www.bezem.de/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bezem.de</link>
	<description>Development &#38; Project Management</description>
	<lastBuildDate>Tue, 24 Jan 2012 18:22:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Using PC Lint in Eclipse &#8211; no plug-ins required</title>
		<link>http://www.bezem.de/2009/08/using-pc-lint-in-eclipse-no-plug-ins-required/</link>
		<comments>http://www.bezem.de/2009/08/using-pc-lint-in-eclipse-no-plug-ins-required/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:51:02 +0000</pubDate>
		<dc:creator>Johan Bezem</dc:creator>
				<category><![CDATA[PC Lint / FlexeLint]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[ErrorParser]]></category>
		<category><![CDATA[Lint]]></category>

		<guid isPermaLink="false">http://www.bezem.de/?p=245</guid>
		<description><![CDATA[Using PC Lint from Eclipse doesn't require any plug-ins, just the proper configuration. Here's how!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been tinkering with Eclipse to see if I can make PC Lint run from inside Eclipse. Of course, running Lint as an external tool is always an option, but I couldn&#8217;t get Eclipse to recognize the Lint warnings and display them in the &#8216;Problems&#8217; tab. From my testing and what I could find in the Internet, it seems that the output of so-configured external tools is not run by the error parsers installed.</p>
<p>What I found in the Internet suggested that I have to use a special error parser, configure that, and then it would run. Now, I have nothing against using extra tools if that&#8217;s the way to achieve what I want, but if I can do without, I consider that a better solution, since every tool used is another tool to learn how to use. And delivering configurations to my customers,Â  it&#8217;s not my business model to make myself indispensable, on the contrary.</p>
<p>So, after experimenting some more, I have found a way to use PC Lint with Eclipse (I used Ganymede for testing) without resorting to additional tools or plug-ins. Be aware, I&#8217;m not an Eclipse expert in any sense, so there may be many more and possibly better ways to achieve this. I&#8217;d be happy to get some comments with further tips.</p>
<p>The key is to add a new &#8216;build target&#8217; for running PC Lint:</p>
<ol>
<li>On the properties dialog for the workspace (right-click and select &#8216;Properties&#8217;), in the &#8216;Builders&#8217; section, check that the &#8220;CDT Builder&#8221; is selected.</li>
<li>In the &#8216;C/C++ Build&#8217; section, click on &#8220;Manage Configurations&#8230;&#8221; and add a configuration for running Lint.</li>
<li>Select the configuration from the drop-down box.</li>
<li>On the &#8216;Builder Settings&#8217; tab, deselect the &#8220;Use default build command&#8221; and instead provide the path to the Lint executable, eg. &#8220;C:\Lint90\LINT-NT.EXE&#8221;. Specify the &#8216;Build location&#8217;, from which directory you want Lint to run, either absolute or using the buttons offered.</li>
<li>On the &#8216;Behaviour&#8217; tab, deselect &#8220;clean&#8221;, and provide the parameters to Lint in the (selected) &#8216;Build (Incremental build)&#8217; text box.</li>
<p>Be aware that these indications all assume some kind of a general build or make environment, so the names themselves do not indicate the possibility for running a single program. If you use a Makefile concept for running Lint, you may use that as well, and &#8216;clean&#8217; might even make sense.</p>
<li>In the &#8216;Settings&#8217; section of &#8216;C/C++ Build&#8217;, make sure that all CDT parsers (or at least the &#8220;CDT GNU C/C++ Error Parser&#8221;) are selected.</li>
</ol>
<p>And that&#8217;s it.</p>
<p>OK; one final thing remains. We now need to coerce Lint into providing warnings in a format similar to the GNU C/C++ compiler. This can be achieved by some Lint options in your option file. I use:</p>
<p><code> // Output options: One line, file info always; Use full path names</p>
<p>-hF1</p>
<p>+ffn</p>
<p>// Normally my format is defined as follows:</p>
<p>//-"format=%(\q%f\q %l %C%) %t %n: %m"</p>
<p>// For eclipse-usage, the GCC error format is necessary,</p>
<p>// since we have only the default eclipse error parser available.</p>
<p>-"format=%(%f:%l:%C:%) %t %n: %m"</code></p>
<p>// And also for eclipse, the reference locations provided by</p>
<p>// Lint, put into square brackets &#8220;[Reference: File: ... Line: ...]&#8221;</p>
<p>// are not correctly handled, therefore we switch them off.</p>
<p>// Enable warning 831 if you are interested.</p>
<p>-frl</p>
<p>// Do not break lines</p>
<p>-width(0)</p>
<p>// And make sure no foreign includes change the format</p>
<p>+flm</p>
<p>If you want to know more than my comments are telling you, check the Lint manual for details.</p>
<p>Now, don&#8217;t get me wrong: I will not switch from my trusted SlickEdit to Eclipse. But, as a consultant, I cannot always pick and choose. And running Lint from Eclipse, having a way to jump from warning to warning, definitely beats manual navigation.</p>
<p>Happy Linting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bezem.de/2009/08/using-pc-lint-in-eclipse-no-plug-ins-required/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

