Comments (5)
Thank you and thank you for this useful tool! I was doing some testing locally, and managed to get it to work following issue #91 in the color library linked above. I am not sure if it breaks
on non-Windows so I have kept it local for now, but I will follow your recommendation to use the non-colored out format.
For reference, the modifications I made (there might be better ways to do this, but I was curious to see if I could get it to work at all):
changed fmt.Printf in the printLinterConfigs function at golangci-lint/blob/master/pkg/commands/linters.go:24
to:
fmt.Fprintf(color.Output, "%s: %s [fast: %t]\n", color.YellowString(lc.Linter.Name()), lc.Linter.Desc(), !lc.DoesFullImport)
and doing the same in the executeLinters function at golangci-lint/blob/master/pkg/commands/linters.go:51
fmt.Fprintf(color.Output, "%s: %s\n", color.YellowString(p), strings.Join(linterNames, ", "))
as well as similar changes in golangci\golangci-lint\pkg\printers\text.go:
fmt.Fprintln(stdOut, outStr)
to: fmt.Fprintln(color.Output, outStr)
fmt.Fprintf(stdOut, "%s: %s\n", pos, text)
to: fmt.Fprintf(color.Output, "%s: %s\n", pos, text)
fmt.Fprintf(stdOut, "%s%s\n", prefix, p.SprintfColored(color.FgYellow, "^"))
to: fmt.Fprintf(color.Output, "%s%s\n", prefix, p.SprintfColored(color.FgYellow, "^"))
from golangci-lint.
related, perhaps:
from golangci-lint.
@thegtproject @syncore thank you for reporting the issue!
while we're preparing the fix you can use option --out-format
to output issues without colors:
golangci-lint run --out-format=line-number
but it doesn't work with golangci-lint linters
from golangci-lint.
@syncore thank you, we fixed by the same way.
check it please
from golangci-lint.
@golangci tested. looks good on my end. thanks
from golangci-lint.
Related Issues (20)
- Add "govulncheck" to golangci-lint HOT 2
- Range-Over-Function is not supported HOT 2
- intrange causing panic HOT 4
- goanalysis_metalinter: failed to load package main: could not load export data HOT 4
- Add options to include/exclude paths HOT 4
- Improve experience of running linters with auto-fix capabilities on save events in editor HOT 9
- Offline config validation HOT 2
- New errors when upgrading bumping google.golang.org/protobuf from 1.31.0 to 1.33.0 in argo workflow related code HOT 2
- Custom plugin version is not actually supported HOT 1
- linters_context generating typechecking error about malformed import path for files and folders in issues.exclude-dirs HOT 5
- staticcheck: unhandled type *ir.ArrayConst HOT 5
- --out-format no longer overrides output->format in config file HOT 2
- Hope to add detection of overflow during integer conversion HOT 1
- staticcheck has false positives HOT 2
- docs: support sorting / filtering linters table HOT 2
- typecheck: lacks support of import path with version suffix (gopkg.in/yaml.v3) HOT 6
- Could not find file '/tmp/golangci-lint-action-problem-matchers.json' HOT 21
- gochecknoinits using undocumented name init HOT 1
- plugins: support passing environment variables for the custom command HOT 4
- with directive go 1.22.3 in go.mod docker golangci-lint failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golangci-lint.