<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Auto checking SAS code for compliance with GPP? in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814629#M1447</link>
    <description>&lt;P&gt;fantastic! thanks for all the info, i look forward to checking it out. We will incorporate what we can into our workflow .. maybe i can give an update when we have done that. cheers&lt;/P&gt;</description>
    <pubDate>Sun, 22 May 2022 22:31:42 GMT</pubDate>
    <dc:creator>pmbrown</dc:creator>
    <dc:date>2022-05-22T22:31:42Z</dc:date>
    <item>
      <title>Auto checking SAS code for compliance with GPP?</title>
      <link>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814627#M1445</link>
      <description>&lt;P&gt;Are there any tools to test if a sas program conforms to "good programming practice" (defined by Phuse), or other autochecks that may be relevant?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Statisticians in the pharma industry have a traditional (arduous) approach to quality control. I wouldnt want to disrupt that. But can we learn something from the data scientists? Auto checks are inherent in their work flow, they even have a term for it -&amp;nbsp;&lt;A href="https://medium.com/python-pandemonium/what-is-flake8-and-why-we-should-use-it-b89bd78073f2" target="_self"&gt;“Linting” means running a basic quality tool against your code. The tool will check your code syntax and provide instructions on how to clean it.&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Github has checks built in (as a pre-commit) and there are add ons you can purchase: &lt;A href="https://github.com/marketplace/codefactor" target="_blank" rel="noopener"&gt;https://github.com/marketplace/codefactor&lt;/A&gt; . But if i search lexjansen's site and other sources I don't see relevant tools being developed by statistical programmers. Maybe I'm not looking in the right places?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would therefore like to develop such a tool but it's unlikely I could do it on my own. Is there any interest from others in the SAS community to develop something along these lines, as an open source project?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to give a very basic example, according to gpp this should not appear in your code:&lt;/P&gt;
&lt;PRE&gt;data a;
set a;&lt;/PRE&gt;
&lt;P&gt;it seems it should be easy to detect if this exists within a program, and many other deviations from gpp too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Let me know if my Q is better placed on a different board)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 21:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814627#M1445</guid>
      <dc:creator>pmbrown</dc:creator>
      <dc:date>2022-05-22T21:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Auto checking SAS code for compliance with GPP?</title>
      <link>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814628#M1446</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/308996"&gt;@pmbrown&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We (&lt;A href="https://sasapps.io" target="_self"&gt;4GL Apps&lt;/A&gt;) completely agree - you shouldn't be pushing SAS code to GIT without basic lint checks (and &lt;A href="https://cli.sasjs.io/test" target="_self"&gt;testing&lt;/A&gt;)!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which is why we built an MIT open source linter for SAS:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/lint" target="_blank" rel="noopener"&gt;https://github.com/sasjs/lint&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you point out, a linter is a fantastic tool to run as part of a git &lt;A href="https://github.com/sasjs/template_jobs/blob/main/.git-hooks/pre-commit" target="_self"&gt;pre-commit hook&lt;/A&gt;, or during a &lt;A href="https://github.com/sasjs/template_jobs/blob/main/.github/workflows/build.yml#L28" target="_self"&gt;CI/CID pipeline.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find it bundled already in the following SASjs tools:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Command Line Interface - &lt;A href="https://cli.sasjs.io/lint" target="_blank" rel="noopener"&gt;https://cli.sasjs.io/lint&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;VS Code Extension -&amp;nbsp;&lt;A href="https://github.com/sasjs/vscode-extension" target="_blank" rel="noopener"&gt;https://github.com/sasjs/vscode-extension&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Being MIT licensed, you can fork and include it within any tool you wish, no restrictions whatsoever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We're looking for partners and sponsors and contributors to improve the tool.&amp;nbsp; Just contact me here (PM) or on the website:&amp;nbsp; &lt;A href="https://sasapps.io/contact" target="_blank" rel="noopener"&gt;https://sasapps.io/contact&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The full list of rules can be found in this JSON file:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/lint#linting" target="_blank" rel="noopener"&gt;https://github.com/sasjs/lint#linting&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a video here:&amp;nbsp;&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Hacker-s-Hub/Hacker-tip-5-Linting-SAS-Code/td-p/801098" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Hacker-s-Hub/Hacker-tip-5-Linting-SAS-Code/td-p/801098&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone is free to contribute rules - we wrote a contributors guide here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/lint/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener"&gt;https://github.com/sasjs/lint/blob/main/CONTRIBUTING.md&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way - you can also fix a lot of issues (such as your example of avoiding basic REPLACEing of datasets) by simply running SAS in strict mode - see this macro (which runs at the start of ALL the apps my team produce):&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__init_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__init_8sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 22:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814628#M1446</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-05-22T22:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Auto checking SAS code for compliance with GPP?</title>
      <link>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814629#M1447</link>
      <description>&lt;P&gt;fantastic! thanks for all the info, i look forward to checking it out. We will incorporate what we can into our workflow .. maybe i can give an update when we have done that. cheers&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 22:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Auto-checking-SAS-code-for-compliance-with-GPP/m-p/814629#M1447</guid>
      <dc:creator>pmbrown</dc:creator>
      <dc:date>2022-05-22T22:31:42Z</dc:date>
    </item>
  </channel>
</rss>

