We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
read about it here: https://dev.to/marcello_h/solve-code-complexity-in-go-56hg It is up to you what you want to do with this knowledge.
My report: litecart/internal/app.go:34:1 - NewApp has complexity: 27 complexity = 1
litecart/internal/handlers/private/setting.go:19:1 - Version has complexity: 14 complexity = 1
litecart/internal/handlers/public/cart.go:17:1 - Checkout has complexity: 13 complexity = 1
litecart/internal/queries/cart.go:21:1 - Carts has complexity: 17 complexity = 1
litecart/internal/queries/cart.go:151:1 - CartSendMail has complexity: 74 complexity = 1
litecart/internal/queries/install.go:19:1 - Install has complexity: 17 complexity = 1
litecart/internal/queries/pages.go:26:1 - ListPages has complexity: 13 complexity = 1
litecart/internal/queries/products.go:22:1 - ListProducts has complexity: 21 complexity = 1
litecart/internal/queries/products.go:111:1 - Product has complexity: 13 complexity = 1
litecart/internal/queries/products.go:350:1 - ProductDigital has complexity: 31 complexity = 1
litecart/internal/queries/products.go:492:1 - DeleteDigital has complexity: 16 complexity = 1
litecart/internal/queries/setting.go:25:1 - Settings has complexity: 21 complexity = 1
litecart/internal/queries/setting.go:100:1 - UpdateSettings has complexity: 26 complexity = 1
litecart/internal/queries/setting.go:306:1 - SettingStripe has complexity: 13 complexity = 1
litecart/internal/queries/setting.go:341:1 - ListSocials has complexity: 19 complexity = 1
litecart/internal/queries/setting.go:384:1 - SettingMail has complexity: 18 complexity = 1
litecart/pkg/archive/tar.go:63:1 - ExtractTar has complexity: 17 complexity = 1
litecart/pkg/archive/zip.go:51:1 - ExtractZip has complexity: 16 complexity = 1
litecart/pkg/update/update.go:28:1 - Init has complexity: 19 complexity = 1
54 = files 177 = functions 74 = highest complexity 4.84 = overall average complexity per function
All the code with high numbers can hide bugs because of the complex structure. These can be candidates for refactoring.
Simple code, that's easy to maintain.
latest on github
No response
The text was updated successfully, but these errors were encountered:
@marcelloh Thank you for the comment. This does not pertain to bugs. I find some of the comments strange and misleading.
Sorry, something went wrong.
No branches or pull requests
Bug Description
read about it here:
https://dev.to/marcello_h/solve-code-complexity-in-go-56hg
It is up to you what you want to do with this knowledge.
My report:
litecart/internal/app.go:34:1 - NewApp has complexity: 27
complexity = 1
litecart/internal/handlers/private/setting.go:19:1 - Version has complexity: 14
complexity = 1
litecart/internal/handlers/public/cart.go:17:1 - Checkout has complexity: 13
complexity = 1
litecart/internal/queries/cart.go:21:1 - Carts has complexity: 17
complexity = 1
litecart/internal/queries/cart.go:151:1 - CartSendMail has complexity: 74
complexity = 1
litecart/internal/queries/install.go:19:1 - Install has complexity: 17
complexity = 1
litecart/internal/queries/pages.go:26:1 - ListPages has complexity: 13
complexity = 1
litecart/internal/queries/products.go:22:1 - ListProducts has complexity: 21
complexity = 1
litecart/internal/queries/products.go:111:1 - Product has complexity: 13
complexity = 1
litecart/internal/queries/products.go:350:1 - ProductDigital has complexity: 31
complexity = 1
litecart/internal/queries/products.go:492:1 - DeleteDigital has complexity: 16
complexity = 1
litecart/internal/queries/setting.go:25:1 - Settings has complexity: 21
complexity = 1
litecart/internal/queries/setting.go:100:1 - UpdateSettings has complexity: 26
complexity = 1
litecart/internal/queries/setting.go:306:1 - SettingStripe has complexity: 13
complexity = 1
litecart/internal/queries/setting.go:341:1 - ListSocials has complexity: 19
complexity = 1
litecart/internal/queries/setting.go:384:1 - SettingMail has complexity: 18
complexity = 1
litecart/pkg/archive/tar.go:63:1 - ExtractTar has complexity: 17
complexity = 1
litecart/pkg/archive/zip.go:51:1 - ExtractZip has complexity: 16
complexity = 1
litecart/pkg/update/update.go:28:1 - Init has complexity: 19
complexity = 1
54 = files
177 = functions
74 = highest complexity
4.84 = overall average complexity per function
How to Reproduce
All the code with high numbers can hide bugs because of the complex structure. These can be candidates for refactoring.
Expected Behavior
Simple code, that's easy to maintain.
litecart Version
latest on github
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: