From bfa3ee96e327ac214f99f199e56ad411101b5b2e Mon Sep 17 00:00:00 2001 From: Bracken Dawson Date: Thu, 7 Mar 2024 00:13:49 +0000 Subject: [PATCH 1/3] Link out to the excellent testifylint --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index edb260abc..268bfdd5b 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,9 @@ Get started: * Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date) * For an introduction to writing test code in Go, see https://go.dev/doc/code#Testing * Check out the API Documentation https://pkg.go.dev/github.com/stretchr/testify + * Use [testifylint](https://github.com/Antonboom/testifylint) to avoid common mistakes * A little about [Test-Driven Development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development) - - [`assert`](https://pkg.go.dev/github.com/stretchr/testify/assert "API documentation") package ------------------------------------------------------------------------------------------- From 1dedc83b8fac5f9b7f81e3fa9023ea6bf15676ff Mon Sep 17 00:00:00 2001 From: Bracken Dawson Date: Thu, 7 Mar 2024 15:09:29 +0000 Subject: [PATCH 2/3] Add testifylint to godocs too I checked the render locally. --- doc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc.go b/doc.go index aac5ef34b..96407f3be 100644 --- a/doc.go +++ b/doc.go @@ -8,4 +8,9 @@ // The mock package provides a system by which it is possible to mock your objects and verify calls are happening as expected. // // The suite package provides a basic structure for using structs as testing suites, and methods on those structs as tests. It includes setup/teardown functionality in the way of interfaces. +// +// A [golangci-lint] compatible linter for testify is available called [testifylint]. +// +// [golangci-lint]: https://golangci-lint.run/ +// [testifylint]: https://github.com/Antonboom/testifylint package testify From 740a5e83face407acb51e8b3020d6db2360dee75 Mon Sep 17 00:00:00 2001 From: Bracken Date: Wed, 20 Mar 2024 12:51:19 +0000 Subject: [PATCH 3/3] Suggest golangci-lint in README.md as well as doc.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Olivier Mengué --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 268bfdd5b..0250c3e6d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Get started: * Install testify with [one line of code](#installation), or [update it with another](#staying-up-to-date) * For an introduction to writing test code in Go, see https://go.dev/doc/code#Testing * Check out the API Documentation https://pkg.go.dev/github.com/stretchr/testify - * Use [testifylint](https://github.com/Antonboom/testifylint) to avoid common mistakes + * Use [testifylint](https://github.com/Antonboom/testifylint) (via [golanci-lint](https://golangci-lint.run/)) to avoid common mistakes * A little about [Test-Driven Development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development) [`assert`](https://pkg.go.dev/github.com/stretchr/testify/assert "API documentation") package