40 Ants

How to improve your Lisp code? Launch linters! [EN Subs]


Listen Later

In this video I show how to run linters for Common Lisp code and get constructive criticism from them.

We will look at 3 types of checks: warnings from the compiler, checking for unspecified or unnecessary dependencies, and analyzing the idiomaticity of the code.

As a bonus, I will tell you about the 40ANTS-CI system, which simplifies the launch of linters, tests and the assembly of documentation for Common Lisp projects. I use it on all my projects and it greatly simplifies my life in terms of setting up GitHub Actions.

Commands for installing linters:

ros install 40ants-asdf-system 40ants-critic

ros install 40ants-asdf-system 40ants-linter

Before installing, you need to add a distribution kit to the quicklisp client settings Ultralisp.org:

(ql-dist:install-dist "http://dist.ultralisp.org/"

:prompt nil)

Links

What I use under the hood:

  • Lisp Critic: https://github.com/g000001/lisp-critic
  • SBLint: https://github.com/cxxxr/sblint
  • My wrappers:

    • https://40ants.com/linter/
    • https://40ants.com/40ants-critic/
    • And more:

      • why I love Roswell: https://www.youtube.com/watch?v=eLXBpB8fuoI
      • about package-inferred ASDF systems: https://www.youtube.com/watch?v=e1_VDtlStVo
      • 40ants-ci system for working with GitHub Actions: https://40ants.com/ci/
      • Timecodes

        00:00 About Linters

        02:20 Installation
        03:35 Linter Launch
        06:10 Checking Imports
        08:24 Lisp Critic
        11:14 CI Pipeline
        15:01 Conclusion

        Tags

        #commonlisp #linters #codequality #programming #lisp

        ...more
        View all episodesView all episodes
        Download on the App Store

        40 AntsBy