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

Integrate GolangCI-Lint #30

Closed
hanzei opened this issue Apr 23, 2020 · 2 comments · Fixed by #44
Closed

Integrate GolangCI-Lint #30

hanzei opened this issue Apr 23, 2020 · 2 comments · Fixed by #44
Assignees
Labels
Difficulty/2:Medium Medium ticket Good First Issue Suitable for first-time contributors Hacktoberfest Help Wanted Community help wanted Tech/Go Type/Task A general task

Comments

@hanzei
Copy link
Contributor

hanzei commented Apr 23, 2020

Mattermost is currently in the process of using golangci-lint as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:

  1. Copy .golangci.yml from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  2. Copy Makefile from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  3. Copy build/ from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.
  4. Run go mod tidy and make dist to ensure the build system works fine.
  5. Update linters-settings.goimports.local-prefixes to the go module path i.e. to github.com/mattermost/mattermost-plugin-jenkins.
  6. Run make golangci-lint and fix all issues that arise.

Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules is needed. If you don't know how to resolve an error, please reach out to @hanzei on the Mattermost Community Server or ask the question here.

@hanzei hanzei added Help Wanted Community help wanted Up For Grabs Ready for help from the community. Removed when someone volunteers Difficulty/2:Medium Medium ticket Tech/Go labels Apr 23, 2020
@hanzei hanzei added the Type/Task A general task label May 9, 2020
@hanzei hanzei added the Good First Issue Suitable for first-time contributors label Sep 15, 2020
@hectorgabucio
Copy link
Contributor

Hello! Can i work on this?

hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 4, 2020
@hanzei hanzei removed the Up For Grabs Ready for help from the community. Removed when someone volunteers label Oct 7, 2020
@hanzei
Copy link
Contributor Author

hanzei commented Oct 7, 2020

Sure, assigned you to the issue @hectorgabucio 👍

hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 9, 2020
hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 9, 2020
hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 9, 2020
hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 16, 2020
hectorgabucio added a commit to hectorgabucio/mattermost-plugin-jenkins that referenced this issue Oct 21, 2020
mattermod pushed a commit that referenced this issue Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/2:Medium Medium ticket Good First Issue Suitable for first-time contributors Hacktoberfest Help Wanted Community help wanted Tech/Go Type/Task A general task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants