Hi, I’m Anner Portrait of Anner

Software Engineer in the Netherlands
focussing on testing and DevOps
Screenshot of a comment on GitHub showing the baseline reduced by 1

Gamifying Psalm baseline reduction

When using PHP static analysis tools like Psalm, how do we motivate a team to work on decreasing the baseline? Gamification! ❓ Static analysis? When writing modern PHP code, static analysis tools like Psalm and PHPStan are essential to prevent mistakes caused by PHP’s dynamic nature. They provide types not in the language, generics and much more. 📋 What’s a baseline? To introduce these tools into legacy code is quite a challenge: It’s a huge task to immediately fix all errors. This is why they allow you to create a baseline file: a file that lists all current errors and tells the tool to ignore them for now. This is great to ensure the quality of new code, and means you don’t have to refactor all existing code at once. ...

February 24, 2023 · Anner Visser

Testing a CLI tool using a web-based terminal

How do you test an interactive command line tool? 🤔 My answer: use the web! 🔌 Recently I’ve been porting my cli tool pr-cli from Go to Deno (Typescript). I wanted to take it one step further and also add tests for it. ❓ I got ready to write some tests and realized I had no idea how to go about it. For non-interactive CLI tools you can test input/output, but how do you check and interact with prompts halfway through the program? ...

November 4, 2022 · Anner Visser