💡 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 – Ethlint
Ethlint comes with the popular slogan “yet another Solidity linting tool”.
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.
You can install it using the following expression:
npm install -g solhint
Here’s how you’d run this:
solhint [options] <file> […other_files]
💡 Learn More: Ethlint Linting Tool
Solidity Linter #2 – Solhint
Solhint is a linter for Solidity that provides security and a style guide validations.
You can install the Linter using this command:
npm install -g ethlintsolium -V
After initial configuration, the execution is as simple as running this command in your shell:
> npm run solhint
💡 Learn More: Solhint Linting Tool
I would recommend more but I think those are the two best tools at this point.
If you want to learn Soldity, I’d applause you because this means you rely less on Linters (a goal worth pursuing)! 🙂
You can check out our in-depth tutorial here:
Learn Solidity Course
Solidity is the programming language of the future.
It gives you the rare and sought-after superpower to program against the “Internet Computer”, i.e., against decentralized Blockchains such as Ethereum, Binance Smart Chain, Ethereum Classic, Tron, and Avalanche – to mention just a few Blockchain infrastructures that support Solidity.
In particular, Solidity allows you to create smart contracts, 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 decentralized autonomous organizations (DAOs) that run on Blockchains without being subject to centralized control.
NFTs, DeFi, DAOs, and Blockchain-based games are all based on smart contracts.
This course is a simple, low-friction introduction to creating your first smart contract using the Remix IDE on the Ethereum testnet – without fluff, significant upfront costs to purchase ETH, or unnecessary complexity.
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com that has taught exponential skills to millions of coders worldwide. He’s the author of the best-selling programming books Python One-Liners (NoStarch 2020), The Art of Clean Code (NoStarch 2022), and The Book of Dash (NoStarch 2022). Chris also coauthored the Coffee Break Python series of self-published books. He’s a computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.