openimsdk / open-im-server

IM Chat
https://openim.io
Apache License 2.0
13.72k stars 2.42k forks source link

Resolving "make lint" Issues Across Three Repositories: Openim Server, Core, and Chat #775

Closed cubxxw closed 2 weeks ago

cubxxw commented 1 year ago

Introduction

This design document outlines the process of resolving linting issues across three critical repositories: Openim Server, Core, and Chat. The errors are identified using the "make lint" command, and the goal is to rectify them for cleaner, efficient, and error-free codebases.

The tasks will be subdivided according to the repositories, focusing on specific directories within each. The primary targets are the /pkg and /internal directories in both Chat and Server repositories, along with all other directories outside these two.

Install make lint tools:

make tools

Task Breakdown

We'll divide this work into six modules, two each for the Chat and Server repositories, and one for each "other" directory in these two repositories. Here's how we would partition the work:

1. Chat Repository - /pkg Directory

./_output/tools/golangci-lint run -color always -c ./.golangci.yml ./pkg/...

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves openimsdk/open-im-server#776
Link openimsdk/open-im-server#775

2. Chat Repository - /internal Directory

./_output/tools/golangci-lint run -color always -c ./.golangci.yml ./internal/...

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves openimsdk/open-im-server#777
Link openimsdk/open-im-server#775

3. Chat Repository - Other Directories

make lint

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves openimsdk/open-im-server#778
Link openimsdk/open-im-server#775

4. Server Repository - /pkg Directory

./_output/tools/golangci-lint run -color always -c ./.golangci.yml ./pkg/...

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves #779
Link #775

5. Server Repository - /internal Directory

./_output/tools/golangci-lint run -color always -c ./.golangci.yml ./internal/...

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves #780
Link #775

6. Server Repository - Other Directories

make lint

PR Link:

In PR, replace Fixed with the following way of linking:

Resolves #781
Link #775

Workflow

The workflow for each of these tasks would involve the following steps:

  1. Identification of Errors: Run the make lint command to identify all linting errors.
  2. Error Rectification: Based on the linting output, proceed to rectify the code.
  3. Validation: Run the make lint command again to verify if all linting errors are resolved.
  4. Documentation: Document the changes, issues faced, and their resolutions.
  5. Code Review and Merge: Submit the changes for code review. Upon approval, merge the changes.

This strategy ensures a systematic and efficient process to resolve linting errors, improve the code quality and maintainability. It will be necessary to prioritize these tasks based on their impact on the overall projects and business requirements.

kubbot commented 1 year ago

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles: Join slack 🤖 to connect and communicate with our developers. If you wish to accept this assignment, please leave a comment in the comments section: /accept.🎯

kubbot commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.