-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
linborland has created PR #2428: GODRIVER-3957 Fix long lines in bson/decoder_example_test.go and expand check-fmt to cover both *_example_test.go and *_examples_test.go files in mongo-go-driver
Issue Text:
GODRIVER-3957
-
- Summary
The check-fmt tool is updated to check both *_examples_test.go and *_example_test.go files.
All lines in bson/decoder_example_test.go are wrapped at 80 characters or fewer, excluding lines containing URI-like strings in comments (e.g. // https://(https://github.com/mongodb/mongo-go-driver/compare/master...linborland:godriver3957?expand=1)...) or testable example output markers (e.g. // Output: ...), which are intentionally exempt from the line length limit.
-
- Background & Motivation
The check-fmt tool checks that example test files have lines wrapped at 80 characters to keep them readable when rendered on pkg.go.dev. Currently, as part of the migration of check_fmt.sh to a Go program (GODRIVER-3936(https://jira.mongodb.org/browse/GODRIVER-3936)), the check only covers files matching the plural form *_examples_test.go. It should also cover the singular form *_example_test.go, as both are used in the repo for example tests. Expanding the check to cover *_example_test.go also exposes existing line length violations in bson/decoder_example_test.go.
- duplicates
-
GODRIVER-3957 Fix long lines in bson/decoder_example_test.go and expand check-fmt to cover both *_example_test.go and *_examples_test.go files
-
- Closed
-