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

chore: format code about exported function should have comment #183

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

chaosi-zju
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

chore: format code about exported function should have comment

Which issue(s) this PR fixes:

Fixes part of karmada-io/karmada#6078

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jan 26, 2025
@karmada-bot karmada-bot requested review from jhnine and samzong January 26, 2025 07:21
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 26, 2025
@chaosi-zju
Copy link
Member Author

chaosi-zju commented Jan 26, 2025

@seanlaii thanks for reviewing

besides, here may still be some revive type error other than exported function should have comment, would you like to continue to handle those revive type lint error?

so sorry that I tagged the wrong person !

@chaosi-zju
Copy link
Member Author

@warjiang thanks for reviewing

besides, here may still be some revive type error other than exported function should have comment, would you like to continue to handle those revive type lint error?

@warjiang
Copy link
Contributor

@warjiang thanks for reviewing

besides, here may still be some revive type error other than exported function should have comment, would you like to continue to handle those revive type lint error?

glad to handle kind of lint errors reported by revive, may be we can split the huge task into small tasks,

dashboard/.golangci.yml

Lines 54 to 85 in 5648666

revive:
rules:
# Disable if-return as it is too strict and not always useful.
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
- name: if-return
disabled: true
- name: package-comments
- name: superfluous-else
arguments:
- preserveScope
- name: error-strings
- name: error-return
- name: receiver-naming
- name: increment-decrement
- name: range
- name: error-naming
- name: dot-imports
- name: errorf
- name: exported
- name: var-declaration
- name: blank-imports
- name: indent-error-flow
- name: unreachable-code
- name: var-naming
- name: redefines-builtin-id
- name: unused-parameter
- name: context-as-argument
- name: context-keys-type
- name: unexported-return
- name: time-naming
- name: empty-block

like splitting task by rule name

@chaosi-zju
Copy link
Member Author

like splitting task by rule name

good advice !

@warjiang
Copy link
Contributor

/assign

@warjiang
Copy link
Contributor

I've just reviewed the PR, a great deal of contributions 🔥

@chaosi-zju chaosi-zju force-pushed the staticcheck2 branch 2 times, most recently from 16699b8 to 8baaee1 Compare February 5, 2025 02:37
@chaosi-zju
Copy link
Member Author

@warjiang is the failed CI build-frontend related to this PR?

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

@warjiang is the failed CI build-frontend related to this PR?

I'm checking the build log, wait for a while~

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

@swc/core installed failed, not caused by this PR,
image

and the following build command failed too.

I think maybe something wrong with github action network, because I check the code in my local enviroment and in github codebase environment twice, the next is the screenshot of github codebase, the enviroment should be clean as the github action ci:
image

@chaosi-zju can you retry to run the build-frontend job again.

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

/retest

@chaosi-zju
Copy link
Member Author

still failed

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

still failed

em, I metioned that the some updates of @swc/core a day ago, i'll solved the build problem
image

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

I can reproduce the problem 😭

npm install -g [email protected] 
pnpm install 
pnpm run build

and the error occurs:
image

log @karmada/dashboard:build: cache miss, executing 7cb8028c72204dfd indicates that pnpm-lock.yaml not compatible with pnpm in github ci.

log in github ci can also prove that:
image

if pnpm ignore pnpm-lock file, the default behaviour of pnpm is that the pnpm will ignore pnpm cache and install the latest dependencies. It seems something wrong between vite and the latest @swc/core package, and it will cause the ci build error.

the solution is just upgrade the pnpm version in the ci.yml file, and I just submit the pr to solve the problem

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

BTW, the ci in the forked repo is ok
image

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

/reopen

@karmada-bot karmada-bot reopened this Feb 5, 2025
@karmada-bot
Copy link
Collaborator

@warjiang: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

@chaosi-zju sorry for close this pr by bot, can you rebase main branch?

Signed-off-by: chaosi-zju <[email protected]>
@chaosi-zju
Copy link
Member Author

done, comments fixed~

@warjiang
Copy link
Contributor

warjiang commented Feb 5, 2025

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2025
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: warjiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2025
@karmada-bot karmada-bot merged commit a69df28 into karmada-io:main Feb 5, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants