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/**/*"
charset
end_of_line
indent_size
indent_style
insert_final_newline
max_line_length
(when using tabs, specify thetab_width
orindent_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_comment
block_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
-exclude
to 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
:never
to disable andalways
to skip detection) -summary
mode showing only the number of errors per file- only the first X errors are shown (use
-show_all_errors
to disable) - binary file detection (however quite basic)
-fix
to 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_length
counting 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,
.editorconfig
parsing - go-colorable, colored output on Windows (too soon)
- go-mod-outdated
- golangci-lint, Go linters
- goreleaser
- klogr
- nancy