Skip to content

Conversation

KaranChadha10
Copy link
Contributor

@KaranChadha10 KaranChadha10 commented Sep 7, 2025

Description

This PR contains the following points:

  • Introduced GlobalUsings.cs to centralize common namespaces across the solution
  • Improved readability and reduced boilerplate by removing redundant using statements

NOTE: These Changes are only done for the Algorithms folder as the file changes were more than 100 files.

Issue link: #520

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Comments in areas I changed are up to date
  • I have added comments to hard-to-understand areas of my code
  • I have made corresponding changes to the README.md

@KaranChadha10 KaranChadha10 force-pushed the global_using_implementation/issue-520 branch from 1402cbe to cba8abb Compare September 7, 2025 10:00
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.15%. Comparing base (1b9aa7e) to head (d4bc12a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #522      +/-   ##
==========================================
- Coverage   95.19%   95.15%   -0.04%     
==========================================
  Files         272      272              
  Lines       10921    10921              
  Branches     1536     1536              
==========================================
- Hits        10396    10392       -4     
- Misses        400      403       +3     
- Partials      125      126       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siriak siriak requested a review from Copilot September 7, 2025 10:40
Copilot

This comment was marked as outdated.

@siriak siriak requested a review from Copilot September 8, 2025 10:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a global using directives file for the Algorithms folder to centralize common namespaces and reduce boilerplate code across the solution. The changes remove redundant using statements from source files while maintaining functionality through the global imports.

  • Adds GlobalUsings.cs to centralize using directives for the Algorithms folder
  • Removes redundant using statements from 100+ files in the Algorithms directory
  • Improves code readability and maintainability by eliminating boilerplate
Comments suppressed due to low confidence (5)

Algorithms/Strings/Similarity/OptimalStringAlignment.cs:1

  • ArgumentNullException.ThrowIfNull expects the parameter value, not the parameter name. It should be ArgumentNullException.ThrowIfNull(firstString) and ArgumentNullException.ThrowIfNull(secondString).
namespace Algorithms.Strings.Similarity

Algorithms/Other/SieveOfEratosthenes.cs:1

  • [nitpick] Consider adding a space after 'for' keyword for consistency with the project's formatting style, as seen in the corrected line 41 in MakeChangeSequence.cs.
namespace Algorithms.Other;

Algorithms/Other/SieveOfEratosthenes.cs:1

  • [nitpick] Consider adding a space after 'for' keyword for consistency with the project's formatting style, as seen in the corrected line 41 in MakeChangeSequence.cs.
namespace Algorithms.Other;

Algorithms/Other/SieveOfEratosthenes.cs:1

  • [nitpick] Consider adding a space after 'for' keyword for consistency with the project's formatting style, as seen in the corrected line 41 in MakeChangeSequence.cs.
namespace Algorithms.Other;

Algorithms/Knapsack/BranchAndBoundKnapsackSolver.cs:1

  • [nitpick] Consider adding a space after 'if' keyword for consistency with the project's formatting style, as seen in similar corrections throughout the codebase.
namespace Algorithms.Knapsack;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit 767c45a into TheAlgorithms:master Sep 8, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants