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

Improve readability and maintainability of nested conditionals in brave_shields_tab_helper.cc (lines 300-330) #44395

Open
shushannap opened this issue Mar 4, 2025 · 0 comments

Comments

@shushannap
Copy link

Description

The function in brave-core/browser/brave_shields/brave_shields_tab_helper.cc (lines 300-330) long function with deep nesting using too many if-else statements. This violates the long function and complexity code smells in the guidebooks. This is an issue as it affects maintainability and readability.

Possible fix:

  1. Break the function into smaller helper functions to improve modularity.
  2. Consider using a mapping structure instead of multiple if-else blocks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant