<?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>NDepend</title><link>http://blogs.wankuma.com/masaru/category/2203.aspx</link><description>NDepend</description><managingEditor>まさる（高野 将、TAKANO Sho）</managingEditor><dc:language>ja-JP</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>まさる</dc:creator><title>NDepend：First Impression</title><link>http://blogs.wankuma.com/masaru/archive/2009/07/02/176936.aspx</link><pubDate>Thu, 02 Jul 2009 05:15:00 GMT</pubDate><guid>http://blogs.wankuma.com/masaru/archive/2009/07/02/176936.aspx</guid><wfw:comment>http://blogs.wankuma.com/masaru/comments/176936.aspx</wfw:comment><comments>http://blogs.wankuma.com/masaru/archive/2009/07/02/176936.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.wankuma.com/masaru/comments/commentRss/176936.aspx</wfw:commentRss><trackback:ping>http://blogs.wankuma.com/masaru/services/trackbacks/176936.aspx</trackback:ping><description>&lt;h3&gt;ことの始まり&lt;/h3&gt; &lt;p&gt;先日、blogの「連絡をする」から1通の英文メールが届きました。それは「NDepend」のLead Developerである&lt;a href="http://codebetter.com/blogs/patricksmacchia/"&gt;Patrick Smacchia&lt;/a&gt;さんからで、「NDependのProライセンス使わない？」といった内容でした。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;このメールで思い出したのが、ナオキさんのこのエントリ。&lt;/p&gt; &lt;p&gt;&lt;a href="http://cs.gogo-asp.net/blogs/naoki/archive/2008/02/25/NDepend_08FF59978476B330FC30C930E3899067C430FC30EB3009FF6E30_-Professional-_E930A430BB30F330B9304C306167F64ED84E4D30673021719965D0639B4F2D4E_.aspx"&gt;ナオキにASP.NET（仮） : NDepend（静的コード解析ツール）の Professional ライセンスが条件付きで無料提供中&lt;/a&gt;&lt;/p&gt; &lt;p&gt;NDependには興味もあったので、せっかくなので私もProライセンスを頂くことにしました。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;＃NDependってなんぞや？については、上のナオキさんのエントリや以下のInfoQの記事などをどうぞ。&lt;/p&gt; &lt;p&gt;＃&lt;a href="http://www.infoq.com/jp/news/2008/07/ndepend-tutorial"&gt;InfoQ: NDependおよびコードメトリクスの理解向上&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;んで、返事を書こうにもTOEIC350点を叩き出したことがある程度の英語力。どうしよっかなーということで、twitter経由でナオキさん（&lt;a href="http://twitter.com/naoki0311"&gt;@naoki0311&lt;/a&gt;）に「どんな返事書きました？」って聞いたら、テンプレートみたいなのを頂けることに。お陰である程度ちゃんとした返事が書けました。ナオキさん、ありがとうございました。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;返事を書いてしばらくしたら、NDependのインストール方法とライセンスキーがメールで届いたので、さっそくインストールしてみました。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;NDependの起動&lt;/h3&gt; &lt;p&gt;NDependを起動すると、まず以下のような画面が表示されます。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb.png" width="759" height="605"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;ナオキさんも書いてましたが、Ribbonインターフェイスにすることも可能です。&lt;/p&gt; &lt;p&gt;[Tool]メニュー-[Option]を開きます。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_3.png" width="399" height="195"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_4.png" width="648" height="362"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;[Menu\Bar\Ribbon Preference]を選択します。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_5.png" width="648" height="362"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;ラジオボタンで[Ribbon]を選択します。そうすると、次のようなダイアログが表示されます。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_6.png" width="465" height="217"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;「この変更は次に起動したときに反映されます」ということなので、Optionsダイアログを[OK]をクリックして閉じた後、NDependを再起動します。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_7.png" width="759" height="685"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;なんかかっちょいい感じになりました。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h3&gt;NDependを使ってアセンブリを解析する&lt;/h3&gt; &lt;p&gt;では、さっそくNDependを使ってみましょう。&lt;/p&gt; &lt;p&gt;まずは[Start Page]の[Recent Project]から[Analyze: a set of .NET assemblies]をクリックします。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_8.png" width="716" height="378"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;解析したいアセンブリを[Brows]ボタンをクリックして選択します。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_9.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_9.png" width="746" height="520"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;適当なのが見つからなかったので、とりあえずF#のFSharp.Core.dllを食わせてみました。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_10.png" width="716" height="378"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;[OK]をクリックします。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_11.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_11.png" width="759" height="685"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;解析が始まり、終了すると既定のWebブラウザに解析結果のページが表示されます。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_12.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_12.png" width="702" height="533"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_13.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_13.png" width="702" height="533"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;NDepend本体にも解析結果が表示されます。&lt;/p&gt; &lt;p&gt;&lt;a href="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://masaru.wankuma.com/img/blogimg/NDependFirstImpression_4386/image_thumb_14.png" width="759" height="685"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;色々な解析結果がグラフィカルに表示されているのが分かります。&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;今回はここまで。次回以降、実際どのような解析結果があり、どう使えるのか、私自身学びながら紹介できればと思います。&lt;/p&gt;&lt;img src ="http://blogs.wankuma.com/masaru/aggbug/176936.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>