{"id":127052,"date":"2022-08-06T20:04:00","date_gmt":"2022-08-06T20:04:00","guid":{"rendered":"https:\/\/blog.finxter.com\/?p=550693"},"modified":"2022-08-06T20:04:00","modified_gmt":"2022-08-06T20:04:00","slug":"best-solidity-linter","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2022\/08\/06\/best-solidity-linter\/","title":{"rendered":"Best Solidity Linter"},"content":{"rendered":"\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\" data-payload=\"{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;550693&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}\">\n<div class=\"kksr-stars\">\n<div class=\"kksr-stars-inactive\">\n<div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<div class=\"kksr-star\" style=\"padding-right: 5px\">\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\"> <span class=\"kksr-muted\">Rate this post<\/span> <\/div>\n<\/div>\n<p class=\"has-global-color-8-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4a1.png\" alt=\"\ud83d\udca1\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> A <strong>code linter<\/strong> is a static code analysis tool to find programming errors, bugs, style mistakes, and suspicious constructs. <\/p>\n<p>The best Solidity Linter is Ethlint with a close second Solhint. Most other linters are not well qualified to compete with those early tools!<\/p>\n<h2>Solidity Linter #1 &#8211; Ethlint<\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.npmjs.com\/package\/ethlint\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"300\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2022\/08\/image-4.png\" alt=\"\" class=\"wp-image-550709\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2022\/08\/image-4.png 500w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2022\/08\/image-4-300x180.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/figure>\n<\/div>\n<p><a href=\"https:\/\/www.npmjs.com\/package\/ethlint\" data-type=\"URL\" data-id=\"https:\/\/www.npmjs.com\/package\/ethlint\" target=\"_blank\" rel=\"noreferrer noopener\">Ethlint<\/a> comes with the popular slogan <em>&#8220;yet another Solidity linting tool&#8221;<\/em>.<\/p>\n<p>I think the name is not well chosen because, due the fact that Solidity is super young, there is not a swamp of linting tools available, yet.<\/p>\n<p>You can install it using the following expression:<\/p>\n<pre class=\"wp-block-preformatted\"><code>npm install -g solhint<\/code><\/pre>\n<p>Here&#8217;s how you&#8217;d run this:<\/p>\n<pre class=\"wp-block-preformatted\"><code>solhint [options] &lt;file> [\u2026other_files]<\/code><\/pre>\n<p class=\"has-global-color-8-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4a1.png\" alt=\"\ud83d\udca1\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Learn More<\/strong>: <a href=\"https:\/\/www.npmjs.com\/package\/ethlint\" data-type=\"URL\" data-id=\"https:\/\/www.npmjs.com\/package\/ethlint\" target=\"_blank\" rel=\"noreferrer noopener\">Ethlint Linting Tool<\/a><\/p>\n<h2>Solidity Linter #2 &#8211; Solhint <\/h2>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"300\" height=\"85\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2022\/08\/image-5.png\" alt=\"\" class=\"wp-image-550712\"\/><\/figure>\n<\/div>\n<p><a href=\"https:\/\/github.com\/protofire\/solhint\" data-type=\"URL\" data-id=\"https:\/\/github.com\/protofire\/solhint\" target=\"_blank\" rel=\"noreferrer noopener\">Solhint<\/a> is a linter for Solidity that provides security and a style guide validations.<\/p>\n<p>You can install the Linter using this command:<\/p>\n<pre class=\"wp-block-preformatted\"><code>npm\u00a0install\u00a0-g\u00a0ethlintsolium\u00a0-V<\/code><\/pre>\n<p>After initial configuration, the execution is as simple as running this command in your shell:<\/p>\n<pre class=\"wp-block-preformatted\"><code>> npm run solhint<\/code><\/pre>\n<p class=\"has-global-color-8-background-color has-background\"><img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f4a1.png\" alt=\"\ud83d\udca1\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <strong>Learn More<\/strong>:<a href=\"https:\/\/github.com\/protofire\/solhint\"> Solhint L<\/a><a href=\"https:\/\/github.com\/protofire\/solhint\" target=\"_blank\" rel=\"noreferrer noopener\">inting Tool<\/a><\/p>\n<p>I would recommend more but I think those are the two best tools at this point.<\/p>\n<p>If you want to learn Soldity, I&#8217;d applause you because this means you rely less on Linters (a goal worth pursuing)! <img decoding=\"async\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/1f642.png\" alt=\"\ud83d\ude42\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n<p>You can check out our in-depth tutorial here:<\/p>\n<h2><a href=\"https:\/\/academy.finxter.com\/university\/solidity-basics\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"https:\/\/academy.finxter.com\/university\/solidity-basics\/\">Learn Solidity Course<\/a><\/h2>\n<p>Solidity is the programming language of the future.<\/p>\n<p>It gives you the rare and sought-after superpower to program against the &#8220;Internet Computer&#8221;, i.e., against decentralized Blockchains such as <em>Ethereum<\/em>, <em>Binance Smart Chain<\/em>, <em>Ethereum Classic<\/em>, <em>Tron<\/em>, and <em>Avalanche <\/em>&#8211; to mention just a few Blockchain infrastructures that support Solidity.<\/p>\n<p>In particular, Solidity allows you to<em> create smart contracts<\/em>, i.e., pieces of code that automatically execute on specific conditions in a completely decentralized environment. For example, smart contracts empower you to create your own <em>decentralized autonomous organizations<\/em> (DAOs) that run on Blockchains without being subject to centralized control.<\/p>\n<p>NFTs, DeFi, DAOs, and Blockchain-based games are all based on smart contracts.<\/p>\n<p><a href=\"https:\/\/academy.finxter.com\/university\/solidity-basics\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"https:\/\/academy.finxter.com\/university\/solidity-basics\/\">This course<\/a> is a simple, low-friction introduction to creating your first smart contract using the Remix IDE on the Ethereum testnet &#8211; without fluff, significant upfront costs to purchase ETH, or unnecessary complexity.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/academy.finxter.com\/university\/solidity-basics\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2021\/10\/image-121.png\" alt=\"\" class=\"wp-image-37299\" width=\"491\" height=\"287\" srcset=\"https:\/\/blog.finxter.com\/wp-content\/uploads\/2021\/10\/image-121.png 982w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2021\/10\/image-121-300x175.png 300w, https:\/\/blog.finxter.com\/wp-content\/uploads\/2021\/10\/image-121-768x448.png 768w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/a><\/figure>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Rate this post A code linter is a static code analysis tool to find programming errors, bugs, style mistakes, and suspicious constructs. The best Solidity Linter is Ethlint with a close second Solhint. Most other linters are not well qualified to compete with those early tools! Solidity Linter #1 &#8211; Ethlint Ethlint comes with the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[857],"tags":[73,468,528],"class_list":["post-127052","post","type-post","status-publish","format-standard","hentry","category-python-tut","tag-programming","tag-python","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/127052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=127052"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/127052\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=127052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=127052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=127052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}