Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Fix general linter errors #211

Merged
merged 3 commits into from
Feb 3, 2022
Merged

Fix general linter errors #211

merged 3 commits into from
Feb 3, 2022

Conversation

inancgumus
Copy link
Member

This PR fixes linter errors as reported by golang-ci-lint with its default settings.

@inancgumus inancgumus added the enhancement New feature or request label Feb 1, 2022
@inancgumus inancgumus requested a review from imiric February 1, 2022 12:06
@inancgumus inancgumus self-assigned this Feb 1, 2022
@inancgumus inancgumus force-pushed the fix/linter-general-errors branch from 0725e67 to 0f5948a Compare February 1, 2022 12:09
common/frame_session.go Outdated Show resolved Hide resolved
Copy link
Contributor

@imiric imiric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, it was starting to bug me too :)

Just some minor suggestions.

Also, let's remove the BASEREV and --new-from-rev option from the CI workflow:

BASEREV=$(git merge-base HEAD origin/main)
echo "Base revision: $BASEREV"
golangci-lint run --timeout=3m --out-format=tab --new-from-rev "$BASEREV" ./...

chromium/allocator.go Outdated Show resolved Hide resolved
common/element_handle.go Outdated Show resolved Hide resolved
common/frame.go Outdated Show resolved Hide resolved
common/frame_manager.go Outdated Show resolved Hide resolved
common/frame_session.go Outdated Show resolved Hide resolved
@inancgumus
Copy link
Member Author

Thanks for this, it was starting to bug me too :)

:)

let's remove the BASEREV and --new-from-rev option from the CI workflow:

Can you explain what will be the benefit of doing so?

inancgumus added a commit that referenced this pull request Feb 3, 2022
@imiric
Copy link
Contributor

imiric commented Feb 3, 2022

let's remove the BASEREV and --new-from-rev option from the CI workflow:

Can you explain what will be the benefit of doing so?

That option restricts errors for only new ones introduced in a PR, but it's not needed anymore now that all linter errors are fixed. We use it in k6 since there are hundreds of old ones we haven't gotten around to fixing.

@inancgumus
Copy link
Member Author

let's remove the BASEREV and --new-from-rev option from the CI workflow:

Is this change enough to do it?

- BASEREV=$(git merge-base HEAD origin/main)
- echo "Base revision: $BASEREV"
- golangci-lint run --timeout=3m --out-format=tab --new-from-rev "$BASEREV" ./...
+ golangci-lint run --timeout=3m --out-format=tab --new-from-rev ./...

@imiric
Copy link
Contributor

imiric commented Feb 3, 2022

Yeah, just drop --new-from-rev altogether.

@inancgumus inancgumus force-pushed the fix/linter-general-errors branch 2 times, most recently from 92c1451 to c08555e Compare February 3, 2022 11:29
Since now all linter errors are fixed, we don't need BASEREV and
--new-from-rev options. These options were for restricting errors for
only new ones introduced in a PR.
@inancgumus inancgumus force-pushed the fix/linter-general-errors branch from c08555e to 2a5a92c Compare February 3, 2022 11:41
@inancgumus inancgumus requested a review from imiric February 3, 2022 11:42
@inancgumus inancgumus added ci and removed enhancement New feature or request labels Feb 3, 2022
@imiric imiric mentioned this pull request Jan 30, 2025
60 tasks
@inancgumus inancgumus merged commit 0f2ba32 into main Feb 3, 2022
@inancgumus inancgumus deleted the fix/linter-general-errors branch February 3, 2022 12:01
@imiric imiric added this to the v0.2.0 milestone Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linter issues
2 participants