A faster alternative to the JavaScript eclint written in Go.
Tarballs are signed (.minisig) using the following public key:
RWRP3/Z4+t+iZk1QU6zufn6vSDlvd76FLWhGCkt5kE7YqW3mOtSh7FvE
Which can be verified using minisig or signify.
$ go install gitlab.com/greut/eclint/cmd/eclint
$ eclint -version
Excluding some files using the EditorConfig matcher
$ eclint -exclude "testdata/**/*"
charsetend_of_lineindent_sizeindent_styleinsert_final_newlinemax_line_length(when using tabs, specify thetab_widthorindent_size)- by default, UTF-8 charset is assumed and multi-byte characters should be counted as one. However, combining characters won't.
trim_trailing_whitespace- domain-specific properties
line_commentblock_comment_start,block_comment,block_comment_end
- minimal magic bytes detection (currently for PDF)
- when no path is given, it searches for files via
git ls-files -excludeto filter out some files- unset / alter properties via the
eclint_prefix - Docker images (also on Quay.io, GitHub and GitLab registries)
- colored output (use
-color:neverto disable andalwaysto skip detection) -summarymode showing only the number of errors per file- only the first X errors are shown (use
-show_all_errorsto disable) - binary file detection (however quite basic)
-fixto modify files in place rather than showing the errors currently:- only basic
unix2dos,dos2unix - space to tab and tab to space conversion
- trailing whitespaces
- only basic
max_line_lengthcounting UTF-32 characters- more tests
- etc.
NB benchmarks matter at feature parity (which is also hard to measure).
The contenders are the following.
- editorconfig-checker, also in Go.
- eclint, in Node.
The methodology is to run the linter against some big repositories time eclint -show_all_errors.
| Repository | editorconfig-checker |
jedmao/eclint |
greut/eclint |
|---|---|---|---|
| Roslyn | 37s | 1m5s | 4s |
| SaltStack | 7s | 1m9s | <1s |
Two options: -cpuprofile <file> and -memprofile <file>, will produce the appropriate pprof files.
- aurora, colored output
- chardet, charset detection
- editorconfig-core-go,
.editorconfigparsing - go-colorable, colored output on Windows (too soon)
- go-mod-outdated
- golangci-lint, Go linters
- goreleaser
- klogr
- nancy