Skip to content

Conversation

KaranChadha10
Copy link
Contributor

@KaranChadha10 KaranChadha10 commented Sep 8, 2025

Description

This pull request contains the following changes

  • Converted block-scoped namespaces to file-scoped namespaces for consistency in Utilitites and Utilities.Tests folder
  • Removed redundant/unused global using directives to improve code clarity
  • Aligned code formatting with project conventions and C# 10+ style guidelines

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 globalUsing-utilities/issue-520 branch from 83cd53e to 3c4142a Compare September 8, 2025 15:59
@KaranChadha10 KaranChadha10 force-pushed the globalUsing-utilities/issue-520 branch from 3c4142a to 0fc1039 Compare September 8, 2025 15:59
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.19%. Comparing base (767c45a) to head (0fc1039).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #523   +/-   ##
=======================================
  Coverage   95.18%   95.19%           
=======================================
  Files         272      272           
  Lines       10921    10921           
  Branches     1536     1536           
=======================================
+ Hits        10395    10396    +1     
  Misses        400      400           
+ Partials      126      125    -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 16, 2025 21:09
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 global using directives to reduce boilerplate code across the Utilities and Utilities.Tests projects. The changes include adding GlobalUsings.cs files to centralize commonly used namespace imports and removing redundant using statements from individual files.

  • Added GlobalUsings.cs files to both Utilities and Utilities.Tests projects with core .NET namespaces
  • Removed redundant using statements from extension classes and test files
  • Maintained file-scoped namespace declarations for consistency with modern C# conventions

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Utilities/GlobalUsings.cs Defines global using directives for System, System.Collections.Generic, and System.Linq
Utilities.Tests/GlobalUsings.cs Defines global using directives including test-specific namespaces (FluentAssertions, NUnit.Framework)
Utilities/Extensions/*.cs Removed redundant using statements now covered by global usings
Utilities/Exceptions/ItemNotFoundException.cs Removed redundant System using statement
Utilities.Tests/Extensions/*.cs Removed redundant using statements now covered by global usings

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 d6c0553 into TheAlgorithms:master Sep 16, 2025
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