Skip to content

Add Broma formatter tool#1311

Open
LPuehringerStudent wants to merge 1 commit intogeode-sdk:mainfrom
LPuehringerStudent:add-broma-formatter
Open

Add Broma formatter tool#1311
LPuehringerStudent wants to merge 1 commit intogeode-sdk:mainfrom
LPuehringerStudent:add-broma-formatter

Conversation

@LPuehringerStudent
Copy link
Copy Markdown

Fixes #20

This PR adds a Python-based code formatter for .bro binding files.

Features

  • Preserves comments
  • Consistent tab indentation
  • Normalizes spacing around operators
  • Adds blank lines between classes
  • Handles platform-specific addresses (win, imac, m1, ios, android)

Usage

python tools/broma_formatter.py file.bro              # Print to stdout
python tools/broma_formatter.py --inplace file.bro    # Format in place
python tools/broma_formatter.py --inplace --recursive .  # Format all files
python tools/broma_formatter.py --check file.bro      # CI check mode

The formatter is intentionally conservative - it only changes whitespace and formatting, not the actual structure of the bindings.

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.

Create a broma formatter

1 participant