-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stan.html
16 lines (15 loc) · 46.2 KB
/
stan.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE HTML>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Stan Report"><meta name="keywords" content="Haskell, Static Analysis"><meta name="author" content="Kowainik"><title>Stan Report</title><style>html,body{height:100%;width:100%;margin:0% 0% 0% 0%;padding:0% 0% 0% 0%;left:0%;top:0%;font-family:sans-serif;font-size:100%;color:#616161;line-height:1.5}h1{font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.375rem}h4{font-size:1.125rem}h5{font-size:1rem}h6{font-size:0.875rem}p{font-size:1.125rem;font-weight:200;line-height:1.8}.centre{text-align:center;margin-left:auto;margin-right:auto}.container{width:90%;margin-left:auto;margin-right:auto}.row{position:relative;width:100%}.row [class^='col']{float:left;margin-top:0.5rem;margin-bottom:0.5rem;margin-left:2%;margin-right:2%;min-height:0.125rem}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{width:96%}.col-1-sm{width:4.33%}.col-2-sm{width:12.66%}.col-3-sm{width:21%}.col-4-sm{width:29.32999%}.col-5-sm{width:37.65999%}.col-6-sm{width:46%}.col-7-sm{width:54.32999%}.col-8-sm{width:62.65999%}.col-9-sm{width:71%}.col-10-sm{width:79.32999%}.col-11-sm{width:87.65999%}.col-12-sm{width:96%}.row::after{content:"";display:table;clear:both}.hidden-sm{display:none}.grey-bg{background-color:#616161;color:#ffffff}.very-light-bg{background-color:#f1f1f1}main{margin-left:auto;margin-right:auto}nav{background-color:#616161;color:#ffff00;padding:1% 0% 1% 0%}a{text-decoration:none;color:#ffff00}a[href]{text-decoration:underline}a[href]:hover{font-weight:bold}footer,header{display:block;text-align:center;width:100%;max-width:100%;background-color:#bdbdbd;border-top:solid 15px #616161}footer{margin-top:2%}footer > .container{margin-top:20px;margin-bottom:20px}.footer-link a:hover{font-weight:normal;text-decoration:none}.ins-link{text-decoration:none !important;padding:2px 10px 2px 10px;background-color:#616161;color:#ffffff}.ins-link:hover{color:#616161;background-color:rgba(0,0,0,0.0)}pre,code{background-color:#4e342e;color:#ffffff;padding:1px 2px 1px 2px}pre{margin-top:2%;margin-bottom:2%;margin-left:10%;margin-right:10%;padding:2% 2% 2% 2%;overflow-x:auto}.solutions{margin-top:1%;margin-bottom:1%;margin-left:10%;margin-right:10%;padding:1% 1% 1% 1%;background-color:rgba(255,246,143,0.4);border-radius:4px 4px 4px 4px !important}.solutions ul,.config-warnings ul{list-style-type:none}.solutions li::before{content:"💡"}.config-warnings li::before{content:"⚙️"}table{width:100%;border-radius:4px 4px 4px 4px !important;border-collapse:collapse}th:first-child{border-radius:4px 0px 0px 0px}th:last-child{border-radius:0px 4px 0px 0px}td,th{padding:0 8px 0 8px}.observation tr,.observation td,.observation th,#configurations tr,#configurations td,#configurations th,#stan-info tr,#stan-info td,#stan-info th,#severity tr,#severity td,#severity th{border:solid 1px #bdbdbd}.border-shadow{-webkit-box-shadow:0px 0px 4px 4px rgba(97,97,97,0.3);-moz-box-shadow:0px 0px 4px 4px rgba(97,97,97,0.3);-ms-box-shadow:0px 0px 4px 4px rgba(97,97,97,0.3);-o-box-shadow:0px 0px 4px 4px rgba(97,97,97,0.3);box-shadow:0px 0px 4px 4px rgba(97,97,97,0.3);border-style:hidden}.info-name{font-style:italic}.info-data{font-weight:bold}#stan-info table{margin-left:auto;margin-right:auto}blockquote{padding-left:2%;border-left:solid 4px #616161;-webkit-box-shadow:-4px 0px #bdbdbd;-moz-box-shadow:-4px 0px #bdbdbd;-ms-box-shadow:-4px 0px #bdbdbd;-o-box-shadow:-4px 0px #bdbdbd;box-shadow:-4px 0px #bdbdbd}.obs-li{margin:0% 0% 0% 0% !important}#file > h3{padding-left:5px}#file > ul{list-style-type:none}.cats{list-style-type:none;overflow:hidden;padding:0% 0% 0% 0%}.inline{display:inline}.cats > li{float:left}td > .cats > li{margin-top:2px;margin-bottom:2px}.cat{background-color:#ffc0cb;border-radius:3px 0px 0px 3px;display:inline-block;padding:0px 20px 0px 23px;text-decoration:none;position:relative;transition-property:color;transition-duration:0.2s}.cat::before{background-color:#ffffff;border-radius:10px 10px 10px 10px;-webkit-box-shadow:inset 0px 1px rgba(0,0,0,0.25);-moz-box-shadow:inset 0px 1px rgba(0,0,0,0.25);-ms-box-shadow:inset 0px 1px rgba(0,0,0,0.25);-o-box-shadow:inset 0px 1px rgba(0,0,0,0.25);box-shadow:inset 0px 1px rgba(0,0,0,0.25);content:"";height:6px;left:10px;position:absolute;width:6px;top:10px}.cat::after{background-color:#f1f1f1;border-bottom:solid 13px rgba(0,0,0,0.0);border-left:solid 10px #ffc0cb;border-top:solid 13px rgba(0,0,0,0.0);content:"";position:absolute;right:0%;top:0%}.inline > .cat::after{background-color:#ffffff}.severity{display:inline-block;padding:1px 0px 0px 0px;border:solid 1px #616161;border-radius:4px 4px 4px 4px;line-height:1}.severityText{padding:0px 15px 0px 15px}.severityStyle{padding:0px 15px 0px 15px;height:100%;background-color:#00ffff;background-clip:padding-box;border-radius:4px 0px 0px 4px;border-right:solid 1px #616161}.severityPerformance{padding:0px 15px 0px 15px;height:100%;background-color:#0000ff;background-clip:padding-box;border-radius:4px 0px 0px 4px;border-right:solid 1px #616161}.severityPotentialBug{padding:0px 15px 0px 15px;height:100%;background-color:#ff00ff;background-clip:padding-box;border-radius:4px 0px 0px 4px;border-right:solid 1px #616161}.severityWarning{padding:0px 15px 0px 15px;height:100%;background-color:#ffff00;background-clip:padding-box;border-radius:4px 0px 0px 4px;border-right:solid 1px #616161}.severityError{padding:0px 15px 0px 15px;height:100%;background-color:#ff0000;background-clip:padding-box;border-radius:4px 0px 0px 4px;border-right:solid 1px #616161}.remove{color:#000000;background-color:rgba(255,0,0,0.5)}.include{color:#000000;background-color:rgba(0,128,0,0.5)}.exclude{color:#000000;background-color:rgba(255,255,0,0.5)}.ignore{color:#000000;background-color:rgba(255,165,0,0.5)}.sum{display:block;clear:both;position:relative}.sum::before{content:"";width:4rem;height:4rem;float:left;margin:0px 1.5rem 0.75rem 0px;background-image:-webkit-linear-gradient(to bottom right,#616161 25%,#f1f1f1 100%);background-image:-moz-linear-gradient(to bottom right,#616161 25%,#f1f1f1 100%);background-image:-ms-linear-gradient(to bottom right,#616161 25%,#f1f1f1 100%);background-image:-o-linear-gradient(to bottom right,#616161 25%,#f1f1f1 100%);background-image:linear-gradient(to bottom right,#616161 25%,#f1f1f1 100%);text-shadow:0px 0px 2px #616161;border-radius:50% 50% 50% 50%;display:inline-flex;align-items:center;justify-content:center;shape-outside:ellipse();z-index:1}.sum::after{width:2rem;height:2rem;position:absolute;top:0px;left:0px;content:"";background-color:#616161;z-index:-1;border-top-left-radius:3px 3px}.collapsible{width:100%;font-size:1.125rem;margin-left:0% !important;margin-bottom:0% !important;margin-right:0% !important;background-color:#616161;color:#ffffff;cursor:pointer;text-align:left}.active,.collapsible:hover{background-color:#bdbdbd}.collapsible::after{content:"\002B";color:#ffffff;font-weight:bold;float:right;margin-left:5px}.active::after{content:"\2212"}.content{max-height:0;overflow:hidden;transition-property:max-height;transition-timing-function:ease-out;transition-duration:0.2s;background-color:#f1f1f1}.content > div{padding:0px 0px 0px 18px}@media screen and (min-width: 33.75em){.container{width:80%}}@media screen and (min-width: 45em){.col-1{width:4.33%}.col-2{width:12.66%}.col-3{width:21%}.col-4{width:29.32999%}.col-5{width:37.65999%}.col-6{width:46%}.col-7{width:54.32999%}.col-8{width:62.65999%}.col-9{width:71%}.col-10{width:79.32999%}.col-11{width:87.65999%}.col-12{width:96%}}@media screen and (min-width: 60em){.container{width:75%;max-width:60rem}}</style></head><body><header class="centre"><div class="row"><h1>Stan Report</h1></div><nav class="row"><div class="col-3 nav-item"><a href="#general-info">General Info</a></div><div class="col-3 nav-item"><a href="#observations">Observations</a></div><div class="col-3 nav-item"><a href="#configurations">Configurations</a></div><div class="col-3 nav-item"><a href="#report-explained">Report Explained</a></div></nav></header><main class="container"><div class="row"><p>This is the Haskell Static Analysis report generated by <a href="https://kowainik.github.io/projects/stan" class="ins-link">Stan</a></p></div><div id="stan-info" class="row"><h2>Stan Info</h2><div class="row"><blockquote><p>In this section, you can find the general information about the used Stan tool, compile-time and run-time environment variables and settings, including build information, system data and execution configurations.</p></blockquote></div><div class="col-10"><table class="border-shadow" style="table-layout:fixed"><colgroup><col style="width:25%"><col></colgroup><tr><td colspan="2" class="centre grey-bg"><strong>Stan Version</strong></td></tr><tr><td class="info-name">Version</td><td class="info-data very-light-bg">0.0.1.0</td></tr><tr><td class="info-name">Git Revision</td><td class="info-data very-light-bg">UNKNOWN</td></tr><tr><td class="info-name">Release Date</td><td class="info-data very-light-bg">UNKNOWN</td></tr><tr><td colspan="2" class="centre grey-bg"><strong>System Info</strong></td></tr><tr><td class="info-name">Operating System</td><td class="info-data very-light-bg">linux</td></tr><tr><td class="info-name">Architecture</td><td class="info-data very-light-bg">x86_64</td></tr><tr><td class="info-name">Compiler</td><td class="info-data very-light-bg">ghc</td></tr><tr><td class="info-name">Compiler Version</td><td class="info-data very-light-bg">8.10</td></tr><tr><td colspan="2" class="centre grey-bg"><strong>Environment</strong></td></tr><tr><td class="info-name">Environment Variables</td><td class="info-data very-light-bg">STAN_USE_DEFAULT_CONFIG=True</td></tr><tr><td class="info-name">TOML configuration files</td><td class="info-data very-light-bg">/home/kamil-adam/git/helvm/helct/.stan.toml</td></tr><tr><td class="info-name">CLI arguments</td><td class="info-data very-light-bg">-s --hide-solution report</td></tr></table></div></div><div id="general-info" class="row"><div id="project-info" class="col-6"><h2>Project Info</h2><div class="row"><blockquote><p>Information about the analysed project</p></blockquote></div><table class="border-shadow "><colgroup><col class="info-name"><col class="info-data"></colgroup><tr><td class="info-name">Project name</td><td class="info-data very-light-bg">helct</td></tr><tr><td class="info-name">Cabal Files</td><td class="info-data very-light-bg">helct.cabal</td></tr><tr><td class="info-name">HIE Files Directory</td><td class="info-data very-light-bg">.hie</td></tr><tr><td class="info-name">Files Number</td><td class="info-data very-light-bg">4</td></tr></table></div><div id="analysis-info" class="col-6"><h2>Analysis Info</h2><div class="row"><blockquote><p>Summary stats from the static analysis</p></blockquote></div><table class="border-shadow "><tr><td class="info-name">Modules</td><td class="info-data very-light-bg">4</td></tr><tr><td class="info-name">LoC</td><td class="info-data very-light-bg">14</td></tr><tr><td class="info-name">Extensions</td><td class="info-data very-light-bg">29</td></tr><tr><td class="info-name">SafeHaskell Extensions</td><td class="info-data very-light-bg">0</td></tr><tr><td class="info-name">Available inspections</td><td class="info-data very-light-bg">44</td></tr><tr><td class="info-name">Checked inspections</td><td class="info-data very-light-bg">44</td></tr><tr><td class="info-name">Found Observations</td><td class="info-data very-light-bg">0</td></tr><tr><td class="info-name">Ignored Observations</td><td class="info-data very-light-bg">0</td></tr></table></div></div><div id="static-analysis-summary" class="row"><h2>Static Analysis Summary</h2><div class="row"><blockquote><p>Here you can find the overall conclusion based on the various metadata and gathered information during the work of Stan on this project.</p></blockquote></div><ul class="col-10"><li class="sum"><h4>Project health: 100%</h4><span>This number was calculated based on the total number of used inspections and the number of triggered inspections in the project. The calculated number also defines the overall project health status.</span></li><li class="sum"><h4>The project is healthy</h4><span>Excellent work! Stan haven't found any vulnerabilities in the code.</span></li><li class="sum"><h4>Congratulations! Your project has zero vulnerabilities!</h4><span>Stan carefully run all configured inspection and found 0 observations and vulnerabilities to the project.</span></li></ul></div><div id="observations" class="row"><h2>Observations</h2><div class="row"><blockquote><p>Based on the analysis results, Stan found different vulnerabilities distributed among the analysed files. In Stan terminology, we call such vulnerability as Observation. Below you can see the more detailed information about each observation, and find the possible ways to fix them for your project.</p></blockquote></div></div><div id="configurations" class="row"><h2>Configurations</h2><div class="col-12"><div class="row"><blockquote><p>This section describes the final Stan configuration that was used on the project and explains how this result was assembled. Stan runtime settings have many parts, and each of them can come from different configuration sources. Stan is using Environment variables, TOML configuration file and CLI arguments to get the final results. If some option is specified through the multiple sources, the most prioritized one is used. </p></blockquote></div><div class="row"><table><tr><th>Action</th><th>Filter</th><th>Scope</th></tr></table></div><div class="ignored-observations row"></div><div class="config-warnings row"><h4>Configuration Process Information</h4><p>Information and warnings that were gathered during the configuration assemble process. This helps to understand how different parts of the configurations were retrieved.</p><ul><li>No TOML value is specified for key: check</li><li>No CLI option specified for: checks</li><li>configChecks is set through the source: TOML</li><li>No TOML value is specified for key: remove</li><li>No CLI option specified for: remove</li><li>configRemoved is set through the source: TOML</li><li>No TOML value is specified for key: ignore</li><li>No CLI option specified for: ignore</li><li>configIgnored is set through the source: TOML</li></ul></div></div></div><div id="report-explained" class=""><h2>Report Explained</h2><div id="inspections" class="row"><h2>Inspections</h2><div class="row"><blockquote><p>List of Inspections used for analysing the project</p></blockquote></div><div><button class="collapsible" id="STAN-0001">Explore Inspection STAN-0001</button><div class="content row"><div id="STAN-0001-content" class="inspection col-12"><h3>Inspection STAN-0001</h3><p><strong>Partial: base/head</strong></p><p><em>Usage of partial function 'head' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0002">Explore Inspection STAN-0002</button><div class="content row"><div id="STAN-0002-content" class="inspection col-12"><h3>Inspection STAN-0002</h3><p><strong>Partial: base/tail</strong></p><p><em>Usage of partial function 'tail' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0003">Explore Inspection STAN-0003</button><div class="content row"><div id="STAN-0003-content" class="inspection col-12"><h3>Inspection STAN-0003</h3><p><strong>Partial: base/init</strong></p><p><em>Usage of partial function 'init' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0004">Explore Inspection STAN-0004</button><div class="content row"><div id="STAN-0004-content" class="inspection col-12"><h3>Inspection STAN-0004</h3><p><strong>Partial: base/last</strong></p><p><em>Usage of partial function 'last' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0005">Explore Inspection STAN-0005</button><div class="content row"><div id="STAN-0005-content" class="inspection col-12"><h3>Inspection STAN-0005</h3><p><strong>Partial: base/!!</strong></p><p><em>Usage of partial function '!!' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div></div></div><button class="collapsible" id="STAN-0006">Explore Inspection STAN-0006</button><div class="content row"><div id="STAN-0006-content" class="inspection col-12"><h3>Inspection STAN-0006</h3><p><strong>Partial: base/cycle</strong></p><p><em>Usage of partial function 'cycle' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0007">Explore Inspection STAN-0007</button><div class="content row"><div id="STAN-0007-content" class="inspection col-12"><h3>Inspection STAN-0007</h3><p><strong>Partial: base/genericIndex</strong></p><p><em>Usage of partial function 'genericIndex' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div></div></div><button class="collapsible" id="STAN-0008">Explore Inspection STAN-0008</button><div class="content row"><div id="STAN-0008-content" class="inspection col-12"><h3>Inspection STAN-0008</h3><p><strong>Partial: base/fromJust</strong></p><p><em>Usage of partial function 'fromJust' for 'Maybe'</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Use explicit pattern-matching over Maybe</li><li>Use one of the standard functions: 'maybe', 'fromMaybe'</li></ul></div></div></div><button class="collapsible" id="STAN-0009">Explore Inspection STAN-0009</button><div class="content row"><div id="STAN-0009-content" class="inspection col-12"><h3>Inspection STAN-0009</h3><p><strong>Partial: base/read</strong></p><p><em>Usage of partial function 'read' for parsing 'String'</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Use 'readMaybe' or 'readEither' to handle failed parsing</li></ul></div></div></div><button class="collapsible" id="STAN-0010">Explore Inspection STAN-0010</button><div class="content row"><div id="STAN-0010-content" class="inspection col-12"><h3>Inspection STAN-0010</h3><p><strong>Partial: base/succ</strong></p><p><em>Usage of partial function 'succ' for enumerable types</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Use '(+ 1)' for integral types (but be aware of arithmetic overflow)</li><li>{Extra dependency} Use 'next' from 'Relude.Extra.Enum' in 'relude'</li></ul></div></div></div><button class="collapsible" id="STAN-0011">Explore Inspection STAN-0011</button><div class="content row"><div id="STAN-0011-content" class="inspection col-12"><h3>Inspection STAN-0011</h3><p><strong>Partial: base/pred</strong></p><p><em>Usage of partial function 'pred' for enumerable types</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Use '(- 1)' for integral types (but be aware of arithmetic overflow)</li><li>{Extra dependency} Use 'prev' from 'Relude.Extra.Enum' in 'relude'</li></ul></div></div></div><button class="collapsible" id="STAN-0012">Explore Inspection STAN-0012</button><div class="content row"><div id="STAN-0012-content" class="inspection col-12"><h3>Inspection STAN-0012</h3><p><strong>Partial: base/toEnum</strong></p><p><em>Usage of partial function 'toEnum' for enumerable types</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Use 'safeToEnum' from 'Relude.Extra.Enum' in 'relude'</li></ul></div></div></div><button class="collapsible" id="STAN-0013">Explore Inspection STAN-0013</button><div class="content row"><div id="STAN-0013-content" class="inspection col-12"><h3>Inspection STAN-0013</h3><p><strong>Partial: base/maximum</strong></p><p><em>Usage of partial function 'maximum' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0014">Explore Inspection STAN-0014</button><div class="content row"><div id="STAN-0014-content" class="inspection col-12"><h3>Inspection STAN-0014</h3><p><strong>Partial: base/minimum</strong></p><p><em>Usage of partial function 'minimum' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0015">Explore Inspection STAN-0015</button><div class="content row"><div id="STAN-0015-content" class="inspection col-12"><h3>Inspection STAN-0015</h3><p><strong>Partial: base/maximumBy</strong></p><p><em>Usage of partial function 'maximumBy' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0016">Explore Inspection STAN-0016</button><div class="content row"><div id="STAN-0016-content" class="inspection col-12"><h3>Inspection STAN-0016</h3><p><strong>Partial: base/minimumBy</strong></p><p><em>Usage of partial function 'minimumBy' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0017">Explore Inspection STAN-0017</button><div class="content row"><div id="STAN-0017-content" class="inspection col-12"><h3>Inspection STAN-0017</h3><p><strong>Partial: base/foldl1</strong></p><p><em>Usage of partial function 'foldl1' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0018">Explore Inspection STAN-0018</button><div class="content row"><div id="STAN-0018-content" class="inspection col-12"><h3>Inspection STAN-0018</h3><p><strong>Partial: base/foldl1'</strong></p><p><em>Usage of partial function 'foldl1'' for lists</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace list with 'NonEmpty' from 'Data.List.NonEmpty'</li><li>Use explicit pattern-matching over lists</li></ul></div></div></div><button class="collapsible" id="STAN-0019">Explore Inspection STAN-0019</button><div class="content row"><div id="STAN-0019-content" class="inspection col-12"><h3>Inspection STAN-0019</h3><p><strong>Partial: base/foldr1</strong></p><p><em>Usage of partial function 'foldr1' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0020">Explore Inspection STAN-0020</button><div class="content row"><div id="STAN-0020-content" class="inspection col-12"><h3>Inspection STAN-0020</h3><p><strong>Partial: base/fromList</strong></p><p><em>Usage of partial function 'fromList' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0021">Explore Inspection STAN-0021</button><div class="content row"><div id="STAN-0021-content" class="inspection col-12"><h3>Inspection STAN-0021</h3><p><strong>Partial: base/fromInteger</strong></p><p><em>Usage of partial function 'fromInteger' for </em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">Partial</li></ul></div></div></div><button class="collapsible" id="STAN-0101">Explore Inspection STAN-0101</button><div class="content row"><div id="STAN-0101-content" class="inspection col-12"><h3>Inspection STAN-0101</h3><p><strong>Infinite: base/reverse</strong></p><p><em>Usage of the 'reverse' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'reverse' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0102">Explore Inspection STAN-0102</button><div class="content row"><div id="STAN-0102-content" class="inspection col-12"><h3>Inspection STAN-0102</h3><p><strong>Infinite: base/isSuffixOf</strong></p><p><em>Usage of the 'isSuffixOf' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'isSuffixOf' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0103">Explore Inspection STAN-0103</button><div class="content row"><div id="STAN-0103-content" class="inspection col-12"><h3>Inspection STAN-0103</h3><p><strong>Infinite: base/length</strong></p><p><em>Usage of the 'length' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'length' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0104">Explore Inspection STAN-0104</button><div class="content row"><div id="STAN-0104-content" class="inspection col-12"><h3>Inspection STAN-0104</h3><p><strong>Infinite: base/genericLength</strong></p><p><em>Usage of the 'genericLength' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'genericLength' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0105">Explore Inspection STAN-0105</button><div class="content row"><div id="STAN-0105-content" class="inspection col-12"><h3>Inspection STAN-0105</h3><p><strong>Infinite: base/sum</strong></p><p><em>Usage of the 'sum' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'sum' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0106">Explore Inspection STAN-0106</button><div class="content row"><div id="STAN-0106-content" class="inspection col-12"><h3>Inspection STAN-0106</h3><p><strong>Infinite: base/product</strong></p><p><em>Usage of the 'product' function that hangs on infinite lists</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">Infinite</li><li class="cat">List</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Don't use 'product' if you expect your function to work with infinite lists</li><li>{Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists</li></ul></div></div></div><button class="collapsible" id="STAN-0201">Explore Inspection STAN-0201</button><div class="content row"><div id="STAN-0201-content" class="inspection col-12"><h3>Inspection STAN-0201</h3><p><strong>Anti-pattern: [0 .. length xs]</strong></p><p><em>Creating a list with wrong number of indices</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace '[0 .. length xs]' with '[0 .. length xs - 1]'</li><li>Use 'zip [0 ..] xs` to work with list of pairs: index and element</li></ul></div></div></div><button class="collapsible" id="STAN-0202">Explore Inspection STAN-0202</button><div class="content row"><div id="STAN-0202-content" class="inspection col-12"><h3>Inspection STAN-0202</h3><p><strong>Anti-pattern: foldl</strong></p><p><em>Usage of space-leaking function 'foldl'</em></p><div><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></div><div><ul class="cats "><li class="cat">SpaceLeak</li><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Replace 'foldl' with 'foldl''</li><li>Use 'foldr (flip . f)` instead of 'foldl f'</li></ul></div></div></div><button class="collapsible" id="STAN-0203">Explore Inspection STAN-0203</button><div class="content row"><div id="STAN-0203-content" class="inspection col-12"><h3>Inspection STAN-0203</h3><p><strong>Anti-pattern: Data.ByteString.Char8.pack</strong></p><p><em>Usage of 'pack' function that doesn't handle Unicode characters</em></p><div><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Convert to 'Text' and use 'encodeUtf8' from 'Data.Text.Encoding'</li><li>{Extra dependency} Use 'encodeUtf8' from 'relude'</li><li>{Extra dependency} Use the 'utf8-string' package</li></ul></div></div></div><button class="collapsible" id="STAN-0204">Explore Inspection STAN-0204</button><div class="content row"><div id="STAN-0204-content" class="inspection col-12"><h3>Inspection STAN-0204</h3><p><strong>Anti-pattern: HashMap size</strong></p><p><em>Usage of 'size' or 'length' for 'HashMap' that runs in linear time</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Switch to 'Map' from 'containers'</li></ul></div></div></div><button class="collapsible" id="STAN-0205">Explore Inspection STAN-0205</button><div class="content row"><div id="STAN-0205-content" class="inspection col-12"><h3>Inspection STAN-0205</h3><p><strong>Anti-pattern: HashSet size</strong></p><p><em>Usage of 'size' or 'length' for 'HashSet' that runs in linear time</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Switch to 'Set' from 'containers'</li></ul></div></div></div><button class="collapsible" id="STAN-0206">Explore Inspection STAN-0206</button><div class="content row"><div id="STAN-0206-content" class="inspection col-12"><h3>Inspection STAN-0206</h3><p><strong>Data types with non-strict fields</strong></p><p><em>Defining lazy fields in data types can lead to unexpected space leaks</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">SpaceLeak</li><li class="cat">Syntax</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Add '!' before the type, e.g. !Int or !(Maybe Bool)</li><li>Enable the 'StrictData' extension: {-# LANGUAGE StrictData #-}</li></ul></div></div></div><button class="collapsible" id="STAN-0207">Explore Inspection STAN-0207</button><div class="content row"><div id="STAN-0207-content" class="inspection col-12"><h3>Inspection STAN-0207</h3><p><strong>Anti-pattern: Foldable methods on possibly error-prone structures</strong></p><p><em>Usage of Foldable methods on (,), Maybe, Either</em></p><div><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Use more explicit functions with specific monomorphic types</li></ul></div></div></div><button class="collapsible" id="STAN-0208">Explore Inspection STAN-0208</button><div class="content row"><div id="STAN-0208-content" class="inspection col-12"><h3>Inspection STAN-0208</h3><p><strong>Anti-pattern: Slow 'length' for Text</strong></p><p><em>Usage of 'length' for 'Text' that runs in linear time</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Switch to 'ByteString' from 'bytestring'</li></ul></div></div></div><button class="collapsible" id="STAN-0209">Explore Inspection STAN-0209</button><div class="content row"><div id="STAN-0209-content" class="inspection col-12"><h3>Inspection STAN-0209</h3><p><strong>Anti-pattern: Slow 'nub' for lists</strong></p><p><em>Usage of 'nub' on lists that runs in quadratic time</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Switch list to 'Set' from 'containers'</li><li>{Extra dependency} Use 'ordNub/hashNub/sortNub/unstableNub' from 'relude'</li><li>{Extra dependency} Use 'nubOrd' from 'containers'</li><li>{Extra dependency} Use 'nubOrd' from 'extra'</li></ul></div></div></div><button class="collapsible" id="STAN-0210">Explore Inspection STAN-0210</button><div class="content row"><div id="STAN-0210-content" class="inspection col-12"><h3>Inspection STAN-0210</h3><p><strong>Anti-pattern: Slow 'for_' on ranges</strong></p><p><em>Usage of 'for_' or 'forM_' on numerical ranges is slow</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Use 'loop' library for fast monadic looping</li></ul></div></div></div><button class="collapsible" id="STAN-0211">Explore Inspection STAN-0211</button><div class="content row"><div id="STAN-0211-content" class="inspection col-12"><h3>Inspection STAN-0211</h3><p><strong>Anti-pattern: '</>' for URLs</strong></p><p><em>Usage of '</>' for URLs results in the errors on Windows</em></p><div><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Use type-safe library for URLs</li><li>Concatenate URLs with slashes '/'</li></ul></div></div></div><button class="collapsible" id="STAN-0212">Explore Inspection STAN-0212</button><div class="content row"><div id="STAN-0212-content" class="inspection col-12"><h3>Inspection STAN-0212</h3><p><strong>Anti-pattern: unsafe functions</strong></p><p><em>Usage of unsafe functions breaks referential transparency</em></p><div><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></div><div><ul class="cats "><li class="cat">Unsafe</li><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Remove 'undefined' or at least replace with 'error' to give better error messages</li><li>Replace 'unsafeCoerce' with 'coerce'</li><li>Rewrite the code to avoid using 'unsafePerformIO' and other unsafe IO functions</li></ul></div></div></div><button class="collapsible" id="STAN-0213">Explore Inspection STAN-0213</button><div class="content row"><div id="STAN-0213-content" class="inspection col-12"><h3>Inspection STAN-0213</h3><p><strong>Anti-pattern: Pattern matching on '_'</strong></p><p><em>Pattern matching on '_' for sum types can create maintainability issues</em></p><div><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Pattern match on each constructor explicitly</li><li>Add meaningful names to holes, e.g. '_anyOtherFailure'</li></ul></div></div></div><button class="collapsible" id="STAN-0214">Explore Inspection STAN-0214</button><div class="content row"><div id="STAN-0214-content" class="inspection col-12"><h3>Inspection STAN-0214</h3><p><strong>Anti-pattern: use 'compare'</strong></p><p><em>Usage of multiple comparison operators instead of single 'compare'</em></p><div><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Rewrite code to use single 'compare' instead of many comparison operators</li></ul></div></div></div><button class="collapsible" id="STAN-0215">Explore Inspection STAN-0215</button><div class="content row"><div id="STAN-0215-content" class="inspection col-12"><h3>Inspection STAN-0215</h3><p><strong>Anti-pattern: Slashes in paths</strong></p><p><em>Usage of '/' or '\' in paths results in the errors on different operation systems</em></p><div><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>{Extra dependency} Use '</>' operator from 'filepath'</li></ul></div></div></div><button class="collapsible" id="STAN-0301">Explore Inspection STAN-0301</button><div class="content row"><div id="STAN-0301-content" class="inspection col-12"><h3>Inspection STAN-0301</h3><p><strong>Missing fixity declaration for operator</strong></p><p><em>Using the implicit default fixity for operator: infixl 9</em></p><div><span class="severity"><span class="severityStyle"></span><span class="severityText">Style</span></span></div><div><ul class="cats "><li class="cat">Syntax</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Add 'infix[l|r]' declaration to the operator with explicit precedence</li></ul></div></div></div><button class="collapsible" id="STAN-0302">Explore Inspection STAN-0302</button><div class="content row"><div id="STAN-0302-content" class="inspection col-12"><h3>Inspection STAN-0302</h3><p><strong>Big tuples</strong></p><p><em>Using tuples of big size (>= 4) can decrease code readability</em></p><div><span class="severity"><span class="severityStyle"></span><span class="severityText">Style</span></span></div><div><ul class="cats "><li class="cat">AntiPattern</li><li class="cat">Syntax</li></ul></div><div class="solutions border-shadow"><h4>Possible solutions</h4><ul><li>Consider defining and using a custom data type to improve code comprehension</li></ul></div></div></div></div></div><div id="severity" class="row"><h2>Severity</h2><div class="col-5"><blockquote><p>We are using the following severity system to indicate the observation level</p></blockquote></div><table class="border-shadow col-7"><tr class="grey-bg"><th>Severity</th><th>Description</th></tr><tr><td><span class="severity"><span class="severityStyle"></span><span class="severityText">Style</span></span></td><td>Code style issues. Usually harmless.</td></tr><tr><td><span class="severity"><span class="severityPerformance"></span><span class="severityText">Performance</span></span></td><td>Serious defects that could cause slowness and space leaking.</td></tr><tr><td><span class="severity"><span class="severityPotentialBug"></span><span class="severityText">PotentialBug</span></span></td><td>Human errors in code.</td></tr><tr><td><span class="severity"><span class="severityWarning"></span><span class="severityText">Warning</span></span></td><td>Potential runtime errors on some inputs.</td></tr><tr><td><span class="severity"><span class="severityError"></span><span class="severityText">Error</span></span></td><td>Dangerous behaviour.</td></tr></table></div></div></main><footer><div class="container"><div class="row footer-link"><span>This report was generated by </span><a href="https://github.com/kowainik/stan">Stan — Haskell Static Analysis Tool.</a></div><div class="row footer-link"><span>Stan is created and maintained by </span><a href="https://kowainik.github.io">Kowainik</a></div></div><nav class="row centre"><h3><strong>© Kowainik 2020</strong></h3></nav></footer><script>var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
</script></body></html>