Skip to content

Support appending to existing code-climate .json file #4216

Open
@mitar

Description

@mitar

Your feature request related to a problem? Please describe.

I have a bunch of separate example files in a directory, each is runnable on its own using go run but the directory is not really a Go package and files have conflicting types if you look at them all together. This is why I run:

find _examples -name '*.go' -exec golangci-lint run --timeout 4m --out-format colored-line-number,code-climate:codeclimate.json {} ';'

But the issue is that codeclimate.json gets just the output from the last run of the tool.

Describe the solution you'd like.

That if codeclimate.json output file already exists, additional entries are appended to it.

Describe alternatives you've considered.

To generate individual files first and then with some other JSON processing tool merge them together.

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: outputRelated to issue outputenhancementNew feature or improvementno decisionNo decision to fix or not

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions