Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ldemailly/lll-fixer
Fix lll (line length limit) lines too long linter errors in go files
https://github.com/ldemailly/lll-fixer
Last synced: 2 months ago
JSON representation
Fix lll (line length limit) lines too long linter errors in go files
- Host: GitHub
- URL: https://github.com/ldemailly/lll-fixer
- Owner: ldemailly
- License: apache-2.0
- Created: 2024-03-21T03:30:43.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-03T07:27:30.000Z (3 months ago)
- Last Synced: 2024-10-10T14:31:03.480Z (2 months ago)
- Language: Go
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lll-fixer
Fix lll (line length limit) lines too long linter errors in go files## Installation
From source
```
go install github.com/ldemailly/lll-fixer@latest
```Or see the numerous binaries in https://github.com/ldemailly/lll-fixer/releases
Or docker `fortio/lll-fixer:latest`
Or brew `brew install fortio/tap/lll-fixer`
(I manage the fortio org and usually put everything there but this one is a bit unrelated so for now it is hosted here in `ldemailly` yet uses fortio's org for docker and brew)
## Example
Test on itself:
```
$ go run . lll_fixer.go
``````diff
diff --git a/lll_fixer.go b/lll_fixer.go
index c5edf97..30452c3 100644
--- a/lll_fixer.go
+++ b/lll_fixer.go
@@ -43,7 +43,8 @@ func main() {
}
}-// process modifies the file filename to split long comments at maxlen. making this line longer than 80 characters to test.
+// process modifies the file filename to split long comments at maxlen. making
+// this line longer than 80 characters to test.
func process(fset *token.FileSet, filename string, maxlen int) string {
log.Infof("Processing file %q", filename)
// Parse the Go file
```