forbidigo is a linter for Go code that checks source files for identifiers and expressions you want to forbid.
It is designed to help stop debugging calls and other temporary or undesirable usages from being left in a codebase, and it can be used either through golangci-lint or as a standalone command-line tool.
This is free and open source software.
Key Features
- Matches forbidden identifiers and expressions using regular expression patterns.
- Uses a default rule that catches
fmt.Print,print, andprintlnstatements. - Supports type-aware analysis with the
analyze_typesoption to resolve aliases and referenced types. - Accepts richer JSON or YAML pattern definitions with custom messages and package path matching.
- Excludes Godoc examples by default and can be configured to include or exclude test files.
- Can return a non-zero exit status when issues are found, which makes it suitable for CI workflows.
Website: github.com/ashanbrown/forbidigo
Support:
Developer: Andrew Shannon Brown
License: Apache License 2.0
forbidigo is written in Go. Learn Go with our recommended free books and free tutorials.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

