Introduction to the

Code quality may seem like a metaphysical concept, but it can also be quantified. SonarLint is one such open source code quality checking plug-in that supports many major programming languages such as Java, Python, Kotlin, PHP, and more. SonarLint is an IDE extension that helps you detect and fix quality problems as you write code. Like a spell checker, SonarLint will point out errors so you can fix them before you submit your code. Although the IDE supported by the official website does not have phpStorm, after all, phpStorm and IDEA are the same company, and the interface and operation are basically in the same line, so it is not enough that phpStorm can be installed.

The installation

File -> Setting ->

configuration

If you want to disable automatic check, deselect it

use

Once you’ve opened the file, click SonarLint in the bottom toolbar to display errors, or click the green triangle to re-test

other

It’s important to note that it’s associated with an interesting concept called Cognitive Complexity. You can click on the blue text to jump to the detailed introduction, link. The more complex a function is, the more difficult it is to understand.

twitter

How to write good Code, I highly recommend Clean Code, also known as Clean Code, which I’m learning.