Skip to content

Conversation

zhangshanwen
Copy link
Contributor

Removed unused selectedItems variable from user role component functions in user_config.go and user.go. Improved error handling in TOTP setup page by checking for errors from otp.NewKeyFromURL and returning appropriate error messages. Simplified buffer handling and error return in OSS file retrieval handler.

Removed unused selectedItems variable from user role component functions in user_config.go and user.go. Improved error handling in TOTP setup page by checking for errors from otp.NewKeyFromURL and returning appropriate error messages. Simplified buffer handling and error return in OSS file retrieval handler.
cursor[bot]

This comment was marked as outdated.

Copy link

deepsource-io bot commented Oct 21, 2025

Here's the code health analysis summary for commits 4ae3c8d..8178857. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Go LogoGo❌ Failure
❗ 7 occurences introduced
🎯 83 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 54.60993% with 64 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
login/views.go 4.54% 21 Missing ⚠️
worker/cron.go 0.00% 15 Missing ⚠️
microsite/utils/utils.go 0.00% 7 Missing ⚠️
example/admin/data_init.go 0.00% 4 Missing ⚠️
example/admin/order_config.go 0.00% 4 Missing ⚠️
media/oss/oss.go 20.00% 4 Missing ⚠️
publish/list_publish_builder.go 76.92% 2 Missing and 1 partial ⚠️
l10n/config.go 0.00% 2 Missing ⚠️
activity/timeline.go 0.00% 1 Missing ⚠️
example/admin/category_config.go 0.00% 1 Missing ⚠️
... and 2 more
Files with missing lines Coverage Δ
activity/admin.go 85.00% <100.00%> (ø)
activity/builder.go 64.37% <100.00%> (ø)
activity/log_diff.go 90.50% <100.00%> (ø)
activity/note.go 63.73% <100.00%> (ø)
example/admin/user_config.go 70.45% <100.00%> (+0.62%) ⬆️
media/base/media.go 50.00% <ø> (+10.00%) ⬆️
pagebuilder/editor.go 93.63% <100.00%> (-0.04%) ⬇️
pagebuilder/model_events.go 84.87% <100.00%> (ø)
pagebuilder/settings.go 91.95% <ø> (-0.08%) ⬇️
publish/version_compo.go 87.77% <100.00%> (ø)
... and 18 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Replaces all instances of 'len(str) > 0' with 'str != ""' for string emptiness checks in editing.go and simplifies variable initialization in list_publish_builder.go. This improves code readability and consistency.
@theplant-ci theplant-ci added size/M and removed size/S labels Oct 21, 2025
zhangshanwen and others added 2 commits October 21, 2025 17:18
Replaces nil with http.NoBody in HTTP request creation across tests for clarity and future compatibility. Refactors some variable initializations, improves error wrapping with fmt.Errorf, simplifies string concatenations, and removes unnecessary return statements. Also includes minor logic improvements and code style adjustments in several modules.
This commit fixes the style issues introduced in 333b895 according to the output
from Gofumpt.

Details: #1038
@theplant-ci theplant-ci added size/L and removed size/M labels Oct 21, 2025
Replaces usage of %v with %w in error wrapping for better error propagation in data_init.go. Refactors several functions in login/views.go, publish/list_publish_builder.go, and seo/seo.go to remove unnecessary else branches and simplify control flow, improving readability and maintainability.
Replaces explicit empty slice initializations (e.g., []Type{}) with 'var' declarations for slices and maps across multiple files. This improves code readability and consistency, and in some cases sets slices/maps to nil instead of empty, which can be more idiomatic in Go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants