Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 1, 2025

This PR implements support for folder-based project discovery and glob pattern matching to select multiple projects for analysis, addressing the limitation where only exact solution or project file paths were supported.

New Features

📁 Folder-based Project Discovery

  • New --folder command line option for recursive project discovery
  • Automatically finds all .csproj files in the specified directory and subdirectories
  • Filters out test projects automatically (projects containing test package references)

🔍 Glob Pattern Support

  • Full glob pattern support for both relative and absolute paths
  • Intelligent base directory detection for complex patterns
  • Support for patterns like src/**/*.csproj, **/MyProject.csproj, etc.

🚫 Enhanced Exclusion Support

  • Existing --exclude option now works with folder selection
  • Fine-grained control to exclude specific projects from analysis

Usage Examples

# Analyze all projects in a folder
dendrodocs-analyze --folder /path/to/projects --output results.json

# Use glob patterns to select specific projects
dendrodocs-analyze --folder "src/**/*.csproj" --output matched.json

# Exclude specific projects when analyzing a folder
dendrodocs-analyze --folder /path/to/projects --exclude unwanted.csproj --output filtered.json

# Existing solution and project options continue to work
dendrodocs-analyze --solution MySolution.sln --output solution.json
dendrodocs-analyze --project MyProject.csproj --output project.json

Implementation Details

  • Minimal changes: Added new BuildFolderAnalyzer method to AnalyzerSetup class
  • Robust error handling: Clear error messages for invalid paths or patterns
  • Full backward compatibility: All existing functionality preserved
  • Test coverage: Comprehensive tests for folder discovery, exclusions, and glob patterns
  • Documentation: Updated README files with usage examples and improved help text

Technical Notes

  • Uses Microsoft.Extensions.FileSystemGlobbing for reliable glob pattern matching
  • Maintains existing test project filtering logic for consistency
  • Supports both Windows and Unix path separators
  • Handles edge cases like non-existent directories and invalid patterns gracefully

Fixes #16.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Support folder or glob pattern to select projects Add support for folder and glob pattern project selection Jul 1, 2025
Copilot finished work on behalf of eNeRGy164 July 1, 2025 07:46
@Copilot Copilot AI requested a review from eNeRGy164 July 1, 2025 07:46
@coveralls
Copy link

coveralls commented Jul 1, 2025

Pull Request Test Coverage Report for Build 16829906524

Details

  • 33 of 66 (50.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.6%) to 64.525%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/DendroDocs.Tool/Options.cs 0 1 0.0%
src/DendroDocs.Tool/Program.cs 0 3 0.0%
src/DendroDocs.Tool/AnalyzerSetup.cs 33 62 53.23%
Totals Coverage Status
Change from base Build 16786897845: -1.6%
Covered Lines: 487
Relevant Lines: 708

💛 - Coveralls

@Copilot Copilot AI requested a review from eNeRGy164 July 1, 2025 08:11
Copilot finished work on behalf of eNeRGy164 July 1, 2025 08:11
@eNeRGy164 eNeRGy164 marked this pull request as ready for review July 1, 2025 08:15
Copilot AI and others added 4 commits August 8, 2025 14:01
Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
Co-authored-by: eNeRGy164 <10671831+eNeRGy164@users.noreply.github.com>
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.

Support folder or glob pattern to select projects

3 participants