Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golang-ci revive.exported doesn't work #8458

Closed
okJiang opened this issue Jul 30, 2024 · 1 comment · Fixed by #8563
Closed

golang-ci revive.exported doesn't work #8458

okJiang opened this issue Jul 30, 2024 · 1 comment · Fixed by #8563
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@okJiang
Copy link
Member

okJiang commented Jul 30, 2024

situation

we have been enabled revive.exported

pd/.golangci.yml

Lines 119 to 125 in 9af28fc

- name: exported
severity: warning
disabled: false
exclude: [""]
arguments:
- "checkPrivateReceivers"
- "sayRepetitiveInsteadOfStutters"

but it doesn't work, such as

pd/pkg/core/region_tree.go

Lines 446 to 452 in 9af28fc

func (t *regionTree) TotalWriteRate() (bytesRate, keysRate float64) {
if t.length() == 0 {
return 0, 0
}
return t.totalWriteBytesRate, t.totalWriteKeysRate
}

How to fix it

add

issues:
  include:
    - EXC0012
    - EXC0014

ref u-root/uio#14 (comment)

@okJiang okJiang added the type/enhancement The issue or PR belongs to an enhancement. label Jul 30, 2024
@okJiang
Copy link
Member Author

okJiang commented Jul 30, 2024

ref #4322

ti-chi-bot bot added a commit that referenced this issue Jul 31, 2024
…rted (#8459)

ref #8458

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot added a commit that referenced this issue Aug 5, 2024
…ported (#8481)

ref #8458

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot pushed a commit that referenced this issue Aug 9, 2024
…ported (#8507)

ref #8458

add comments for exported and update some exported-function to unexported

Signed-off-by: okJiang <819421878@qq.com>
@ti-chi-bot ti-chi-bot bot closed this as completed in 61a85e5 Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant