Skip to content

Feature request: improved per-file logging after recursive directory support #227

Description

@DevTwilight

Since recursive directory formatting was added in commit 88a6ea7, it would be great to improve the logging behavior when working on full projects.

Right now, CI usage typically relies on explicit per-file iteration, for example:

name: Check Code
run: |
  find "addons/messagebox" -name "*.gd" -print0 | while IFS= read -r -d '' file; do
    echo "Checking: $file"
    gdscript-formatter --check "$file" || echo "Found formatting issue in $file"
  done

- name: Lint Code
run: |
  find "addons/messagebox" -name "*.gd" -print0 | while IFS= read -r -d '' file; do
    echo "Linting: $file"
    gdscript-formatter lint --pretty "$file" || echo "Found Linting issue in $file"
  done

- name: Format Code
if: github.event_name == 'push'
run: |
  find "addons/messagebox" -name "*.gd" -print0 | while IFS= read -r -d '' file; do
    echo "Formatting: $file"
    gdscript-formatter --safe "$file" || echo "Code formatting failed in $file"
  done

- name: Reorder Code
if: github.event_name == 'push'
run: |
  find "addons/messagebox" -name "*.gd" -print0 | while IFS= read -r -d '' file; do
    echo "Reordering: $file"
    gdscript-formatter --reorder-code "$file" || echo "Reordering failed in $file"
  done

This works well, but now that recursive directory support exists, it feels like the tool is moving toward handling multi-file/project-wide workflows natively.

Proposed improvement

I propose a better default per-file logging format when processing multiple files (recursive mode or folder input) that matches the existing CI pattern.

Suggested output style

  Checking: addons/messagebox/core/parser.gd
  OK
  
  Checking: addons/messagebox/core/tokenizer.gd
  Found formatting issue in addons/messagebox/core/tokenizer.gd

Or depending on the command:

  Formatting: file.gd
  OK
  
  Linting: file.gd
  Found linting issue in file.gd
  Reordering: file.gd
  OK

Why this improvement helps

  • Matches existing CI expectations (same “Checking/Linting/Formatting” style)
  • Keeps logs grep-friendly and readable in GitHub Actions
  • Reduces duplication when moving from find ... | while read to native folder mode
  • Makes recursive execution feel like a natural extension of current behavior, not a different system

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions