forbidigo icon indicating copy to clipboard operation
forbidigo copied to clipboard

Configuration file

Open mcandre opened this issue 4 years ago • 1 comments

Please provide a standard file like forbidgo.yml that the tool looks for in ., .., ../.., etc. up to either $HOME or /. This way, users can check their patterns on a project by project (or team by team) basis right into git.

There are few portable options for reusing command line flags between multiple projects. The user is then forced to declare their build tasks in terms of individual .mf (GNU make), .sh (POSIX sh), etc. scripts. These may be difficult to write and maintain, compared to a standard forbigdo.yml or such file.

Additionally, native Windows users may experience problems with escape syntax for the Go regexp's. Escaping strings in PowerShell is not intuitive. And so, offering configuration in terms of a text file like YAML, can help to promote portability even further.

mcandre avatar May 11 '21 16:05 mcandre

Thanks for the feedback @mcandre . For now, I'd recommend using this linter through https://github.com/golangci/golangci-lint for file-based configuration. I'd also be happy to take a pull request that uses viper to address this issue until I get around to it myself.

ashanbrown avatar May 11 '21 16:05 ashanbrown