<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Do you want to create your own static analysis rules or just use an existing checker? If it’s the latter you could use PTVS’s analyzer (I can point you to some example code if so). If it’s the former we eventually
want to add it to PTVS and when we do that we should pick up IronPython support for free. We’d also accept it as a contribution ;)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Ironpython-users [mailto:ironpython-users-bounces+dinov=microsoft.com@python.org]
<b>On Behalf Of </b>Joseph Mortensen<br>
<b>Sent:</b> Tuesday, September 30, 2014 10:29 AM<br>
<b>To:</b> ironpython-users@python.org<br>
<b>Subject:</b> [Ironpython-users] static analysis tool<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to static analysis on python code that has very heavy usage of .NET libraries. I’ve seen pyflakes, pylint, and pychecker as the main tools to do this stuff in python, but I haven’t gotten any of them working properly with IronPython
in windows. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Are there any recommendations for something that could analyze:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue">import</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> clr<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black">clr.AddReference(</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">"System"</span><span style="font-size:10.0pt;font-family:Consolas;color:black">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue">from</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> System </span><span style="font-size:10.0pt;font-family:Consolas;color:blue">import</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> String<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black">stuff = String(</span><span style="font-size:10.0pt;font-family:Consolas;color:#A31515">"my string"</span><span style="font-size:10.0pt;font-family:Consolas;color:black">)<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:blue">print</span><span style="font-size:10.0pt;font-family:Consolas;color:black"> stuff<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:Consolas;color:black">stuff.ThisDoesntExist()<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="background:white">without tripping up on the System and String imports and find that “<span style="font-size:10.0pt;font-family:Consolas;color:black">stuff.ThisDoesntExist()”</span> doesn’t actually exist?<o:p></o:p></p>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
<p class="MsoNormal" style="background:white">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="background:white">Joe<span style="font-size:10.0pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>