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

Fix linter checks #113

Open
hanzei opened this issue Apr 18, 2024 · 1 comment · May be fixed by #114
Open

Fix linter checks #113

hanzei opened this issue Apr 18, 2024 · 1 comment · May be fixed by #114
Labels
Difficulty/1:Easy Easy ticket Good First Issue Suitable for first-time contributors Help Wanted Community help wanted Tech/Go Up For Grabs Ready for help from the community. Removed when someone volunteers

Comments

@hanzei
Copy link
Contributor

hanzei commented Apr 18, 2024

The CI linter checks are broken. The CI job fails with:

golangci-lint run ./...
Error: server/plugin.go:39:28: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
func (p *Plugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) {
                           ^
Error: server/plugin.go:90:82: unused-parameter: parameter 'mmUserID' seems to be unused, consider removing or renaming it as _ (revive)
func (p *Plugin) httpMeetingSaveSettings(w http.ResponseWriter, r *http.Request, mmUserID string) {
                                                                                 ^
Error: server/plugin.go:115:81: unused-parameter: parameter 'mmUserID' seems to be unused, consider removing or renaming it as _ (revive)
func (p *Plugin) httpMeetingGetSettings(w http.ResponseWriter, r *http.Request, mmUserID string) {
                                                                                ^
Error: server/command.go:44:33: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
                                ^
Error: server/command.go:219:37: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
func (p *Plugin) executeCommandHelp(args *model.CommandArgs) *model.CommandResponse {
                                    ^
make: *** [Makefile:46: check-style] Error 1
Error: Process completed with exit code 2.

See https://github.com/mattermost/mattermost-plugin-agenda/actions/runs/8660923579/job/23749777528?pr=112

@hanzei hanzei added Help Wanted Community help wanted Good First Issue Suitable for first-time contributors Difficulty/1:Easy Easy ticket Tech/Go Up For Grabs Ready for help from the community. Removed when someone volunteers labels Apr 18, 2024
@webstradev
Copy link

I'll pick this one up.

Only question is what you want to do with the unused function.
the unused params are easily ignored with _

But the getConfiguration function is currently not used. Removing it doesn't break anything but maybe its better to set a lintignore there to keep the functionality?

@webstradev webstradev linked a pull request May 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/1:Easy Easy ticket Good First Issue Suitable for first-time contributors Help Wanted Community help wanted Tech/Go Up For Grabs Ready for help from the community. Removed when someone volunteers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants