lll-fixer

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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 --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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL