Skip to content

Support repos "without source code" #1580

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

Merged
merged 11 commits into from
Jun 10, 2025
Merged

Support repos "without source code" #1580

merged 11 commits into from
Jun 10, 2025

Conversation

o2sh
Copy link
Owner

@o2sh o2sh commented Jun 7, 2025

fix for #1578 (opened by @Kajiih)

With this PR, we can now display project information even if no source code is detected.

I have added a PrinterFactory that handles the logic of creating the appropriate printer depending on the context:

  • JsonPrinter and YamlPrinter printers if --output is used
  • PlainPrinter (no ASCII art, just info lines) when the --no-art option is used, or when no source code is detected and no --ascii-input is provided
  • ImagePrinter if --image is provided and the terminal supports it
  • AsciiPrinter as the default case, displaying the dominant language (or override), or if --ascii-input is provided

@o2sh o2sh added the fix label Jun 7, 2025
@o2sh o2sh marked this pull request as ready for review June 7, 2025 22:46
Copy link
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

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

LGTM! Just some nitpicks and thoughts.

Copy link
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

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

LGTM (again)!

@o2sh o2sh merged commit c38a6b5 into main Jun 10, 2025
4 checks passed
@o2sh o2sh deleted the fix/no-code-repo branch June 10, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants