This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a change to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


    from d67c7e2c fix: footer layout adjustment
     add f723d120 feat: add golangci-lint into lint target
     add 9540ef60 refactor(goimports): add goimports to golangci-lint 
configuration #1432
     add 5e705a12 refactor(lint): improve error handling and code consistency 
across multiple files
     add 670aa323 refactor(lint): add new linters and fix their issues
     new 26ded221 Merge remote-tracking branch 'origin/dev' into test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |  2 +-
 .golangci.yaml                                     | 49 +++++++++++++
 Makefile                                           | 17 ++++-
 cmd/wire.go                                        |  3 +-
 docs/docs.go                                       |  7 +-
 docs/swagger.json                                  |  7 +-
 docs/swagger.yaml                                  |  6 +-
 i18n/cs_CZ.yaml                                    |  2 +-
 i18n/cy_GB.yaml                                    |  2 +-
 i18n/da_DK.yaml                                    |  2 +-
 i18n/de_DE.yaml                                    |  2 +-
 i18n/en_US.yaml                                    |  2 +-
 i18n/es_ES.yaml                                    |  2 +-
 i18n/fa_IR.yaml                                    |  2 +-
 i18n/fr_FR.yaml                                    |  2 +-
 i18n/hi_IN.yaml                                    |  2 +-
 i18n/id_ID.yaml                                    |  2 +-
 i18n/it_IT.yaml                                    |  2 +-
 i18n/ja_JP.yaml                                    |  2 +-
 i18n/ko_KR.yaml                                    |  2 +-
 i18n/ml_IN.yaml                                    |  2 +-
 i18n/pl_PL.yaml                                    |  2 +-
 i18n/pt_PT.yaml                                    |  2 +-
 i18n/ro_RO.yaml                                    |  2 +-
 i18n/ru_RU.yaml                                    |  2 +-
 i18n/sk_SK.yaml                                    |  2 +-
 i18n/sv_SE.yaml                                    | 10 +--
 i18n/te_IN.yaml                                    |  2 +-
 i18n/tr_TR.yaml                                    |  2 +-
 i18n/uk_UA.yaml                                    |  2 +-
 i18n/vi_VN.yaml                                    |  2 +-
 i18n/zh_CN.yaml                                    |  2 +-
 i18n/zh_TW.yaml                                    |  2 +-
 internal/base/conf/conf.go                         |  4 +-
 internal/base/constant/ctx_flag.go                 |  7 ++
 internal/base/data/data.go                         |  2 +-
 internal/base/handler/handler.go                   |  9 +--
 internal/base/handler/lang.go                      |  2 +-
 internal/base/handler/response.go                  |  4 +-
 internal/base/handler/short_id.go                  |  2 +-
 internal/base/middleware/accept_language.go        |  3 +-
 internal/base/middleware/avatar.go                 |  1 -
 internal/base/middleware/rate_limit.go             |  1 +
 internal/base/pager/pager.go                       |  2 +-
 internal/base/pager/pagination.go                  |  6 +-
 internal/base/reason/reason.go                     |  2 +-
 internal/base/server/http.go                       |  1 -
 internal/base/server/http_funcmap.go               | 19 +++--
 internal/base/translator/provider.go               |  8 +--
 internal/base/validator/validator.go               |  6 +-
 internal/cli/build.go                              | 52 --------------
 internal/cli/config.go                             |  7 +-
 internal/cli/dump.go                               |  4 +-
 internal/cli/i18n.go                               |  7 +-
 internal/cli/install_check.go                      |  8 ++-
 internal/cli/reset_password.go                     |  4 +-
 internal/controller/question_controller.go         |  3 +-
 internal/controller/template_controller.go         | 51 +++++---------
 internal/controller/template_render/comment.go     |  2 +-
 internal/controller/template_render/controller.go  | 11 ++-
 internal/controller/user_controller.go             |  8 +--
 internal/controller/user_plugin_controller.go      |  3 +-
 internal/entity/badge_entity.go                    |  3 +-
 internal/entity/collection_entity.go               |  4 +-
 internal/entity/config_entity.go                   |  1 +
 internal/install/install_from_env.go               |  5 +-
 internal/install/install_req.go                    |  9 +--
 internal/migrations/init.go                        | 10 +--
 internal/migrations/init_data.go                   |  2 +-
 internal/migrations/migrations.go                  |  4 +-
 internal/migrations/v1.go                          |  1 +
 internal/migrations/v12.go                         |  1 -
 internal/migrations/v13.go                         |  5 +-
 internal/migrations/v14.go                         |  1 +
 internal/migrations/v15.go                         |  1 +
 internal/migrations/v16.go                         |  1 +
 internal/migrations/v17.go                         |  1 +
 internal/migrations/v18.go                         |  1 +
 internal/migrations/v19.go                         |  1 +
 internal/migrations/v2.go                          |  1 +
 internal/migrations/v21.go                         |  1 +
 internal/migrations/v22.go                         |  4 ++
 internal/migrations/v24.go                         |  4 +-
 internal/migrations/v25.go                         |  2 +-
 internal/migrations/v6.go                          |  2 +-
 internal/repo/activity/answer_repo.go              |  3 +-
 internal/repo/activity/follow_repo.go              |  2 +-
 internal/repo/activity/user_active_repo.go         |  1 +
 internal/repo/activity_common/follow.go            |  6 +-
 internal/repo/activity_common/vote.go              |  1 +
 internal/repo/answer/answer_repo.go                |  3 +-
 internal/repo/auth/auth.go                         |  1 +
 internal/repo/badge/badge_event_rule.go            |  3 +-
 internal/repo/badge/badge_repo.go                  |  1 +
 internal/repo/badge_award/badge_award_repo.go      |  1 +
 internal/repo/badge_group/badge_group_repo.go      |  1 +
 internal/repo/collection/collection_repo.go        |  5 +-
 internal/repo/export/email_repo.go                 |  3 +-
 internal/repo/limit/limit.go                       |  3 +-
 internal/repo/meta/meta_repo.go                    |  4 +-
 .../repo/plugin_config/plugin_user_config_repo.go  |  5 +-
 internal/repo/question/question_repo.go            |  8 +--
 internal/repo/rank/user_rank_repo.go               |  2 +-
 internal/repo/repo_test/auth_test.go               | 31 +++++----
 internal/repo/repo_test/captcha_test.go            | 11 +--
 internal/repo/repo_test/comment_repo_test.go       | 27 ++++----
 internal/repo/repo_test/email_repo_test.go         |  5 +-
 internal/repo/repo_test/meta_repo_test.go          | 31 +++++----
 internal/repo/repo_test/notification_repo_test.go  | 33 ++++-----
 internal/repo/repo_test/reason_repo_test.go        |  5 +-
 internal/repo/repo_test/recommend_test.go          | 27 ++++----
 internal/repo/repo_test/repo_main_test.go          |  4 +-
 internal/repo/repo_test/revision_repo_test.go      | 17 ++---
 internal/repo/repo_test/siteinfo_repo_test.go      |  9 +--
 internal/repo/repo_test/tag_rel_repo_test.go       | 25 +++----
 internal/repo/repo_test/tag_repo_test.go           | 33 ++++-----
 internal/repo/repo_test/user_backyard_repo_test.go | 15 ++--
 internal/repo/repo_test/user_repo_test.go          | 35 +++++-----
 internal/repo/revision/revision_repo.go            |  2 +-
 internal/repo/role/user_role_rel_repo.go           |  2 +-
 internal/repo/search_common/search_repo.go         | 30 ++++----
 internal/repo/search_sync/search_sync.go           |  1 +
 internal/repo/tag/tag_rel_repo.go                  |  1 +
 internal/repo/user/user_repo.go                    |  2 +-
 .../user_notification_config_repo.go               |  1 +
 internal/schema/backyard_user_schema.go            |  2 +-
 internal/schema/email_template.go                  |  1 +
 internal/schema/meta_schema.go                     | 16 ++---
 internal/schema/notification_schema.go             |  9 +--
 internal/schema/question_schema.go                 | 28 ++++----
 internal/schema/revision_schema.go                 |  4 +-
 internal/schema/siteinfo_schema.go                 | 16 ++---
 internal/schema/tag_schema.go                      |  2 +-
 internal/schema/user_notification_schema.go        |  1 +
 internal/schema/user_schema.go                     |  2 +-
 internal/service/action/captcha_service.go         |  7 +-
 internal/service/action/captcha_strategy.go        | 48 ++++++-------
 internal/service/activity/activity.go              |  2 +-
 .../service/activity/answer_activity_service.go    |  1 +
 internal/service/auth/auth.go                      |  2 +-
 internal/service/badge/badge_award_service.go      |  1 +
 internal/service/badge/badge_event_handler.go      |  2 +-
 internal/service/badge/badge_group_service.go      |  1 +
 internal/service/badge/badge_service.go            | 29 +++-----
 internal/service/comment/comment_service.go        | 15 ++--
 internal/service/content/answer_service.go         | 13 ++--
 .../service/content/question_hottest_service.go    |  6 +-
 internal/service/content/question_service.go       | 80 ++++++++++------------
 internal/service/content/revision_service.go       |  6 +-
 internal/service/content/search_service.go         | 17 +++--
 internal/service/content/user_service.go           |  7 +-
 internal/service/content/vote_service.go           |  4 +-
 internal/service/dashboard/dashboard_service.go    | 22 +++---
 internal/service/export/email_service.go           |  3 +-
 .../service/file_record/file_record_service.go     |  1 -
 internal/service/importer/importer_service.go      |  5 +-
 internal/service/meta/meta_service.go              | 15 ++--
 .../notification/invite_answer_notification.go     |  5 +-
 .../notification/new_answer_notification.go        |  5 +-
 .../notification/new_comment_notification.go       |  5 +-
 .../notification/new_question_notification.go      |  5 +-
 .../service/notification/notification_service.go   | 18 +++--
 .../service/notification_common/notification.go    |  5 +-
 internal/service/permission/answer_permission.go   |  1 +
 internal/service/permission/question_permission.go |  1 +
 .../service/plugin_common/plugin_common_service.go |  1 -
 internal/service/provider.go                       |  2 +-
 internal/service/question_common/question.go       | 13 ++--
 internal/service/report/report_service.go          |  1 +
 internal/service/report_handle/report_handle.go    |  6 ++
 internal/service/review/review_service.go          |  1 -
 internal/service/search_parser/search_parser.go    |  3 +-
 internal/service/siteinfo/siteinfo_service.go      |  6 +-
 .../service/siteinfo_common/siteinfo_service.go    |  4 +-
 .../siteinfo_common/siteinfo_service_test.go       |  5 +-
 internal/service/tag/tag_service.go                |  4 +-
 internal/service/tag_common/tag_common.go          |  8 +--
 internal/service/uploader/upload.go                | 30 +++++---
 internal/service/user_admin/user_backyard.go       | 34 ++++-----
 internal/service/user_common/user.go               |  4 +-
 .../user_notification_config_service.go            | 11 +--
 pkg/checker/file_type.go                           | 12 ++--
 pkg/checker/password.go                            |  3 +-
 pkg/checker/path_ignore.go                         | 15 +---
 pkg/checker/question_link.go                       | 11 ++-
 pkg/converter/markdown.go                          | 25 +++----
 pkg/converter/str.go                               |  5 +-
 pkg/day/day.go                                     |  7 +-
 pkg/day/day_test.go                                |  3 +-
 pkg/dir/dir.go                                     | 16 ++---
 pkg/gravatar/gravatar_test.go                      |  3 +-
 pkg/htmltext/htmltext.go                           | 18 ++---
 pkg/htmltext/htmltext_test.go                      |  4 +-
 plugin/kv_storage.go                               |  6 +-
 plugin/plugin_test/plugin_main_test.go             | 15 ++--
 ui/static.go                                       |  1 -
 196 files changed, 789 insertions(+), 756 deletions(-)
 create mode 100644 .golangci.yaml

Reply via email to