Skip to content

Enforce code formatting with ruff format (#45)#46

Open
janhoy wants to merge 2 commits into
apache:mainfrom
janhoy:feature/ruff-format-enforcement
Open

Enforce code formatting with ruff format (#45)#46
janhoy wants to merge 2 commits into
apache:mainfrom
janhoy:feature/ruff-format-enforcement

Conversation

@janhoy
Copy link
Copy Markdown
Contributor

@janhoy janhoy commented May 29, 2026

First commit in this PR branch

  • Enable ruff format --check . in the make lint target (was commented out)
  • Add make format target as the canonical way to auto-format sources
  • Document make format / make lint workflow in DEVELOPER_GUIDE.md and AGENTS.md

Second commit

  • Result of ruff format . - reformats all source files

janhoy added 2 commits May 30, 2026 01:18
- Add `make format` target (runs `ruff format .`) as the canonical way
  to auto-format sources before committing
- Enable `ruff format --check .` in the `make lint` target
- Document the format/lint workflow in DEVELOPER_GUIDE.md and AGENTS.md
Purely mechanical reformatting via `make format` (ruff format .).
No logic changes — whitespace, quotes, and line wrapping only.
@janhoy janhoy requested review from Copilot and epugh May 29, 2026 23:20
Copy link
Copy Markdown

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@epugh
Copy link
Copy Markdown
Contributor

epugh commented May 30, 2026

Dunno... Do we use ruff format for other python code across Solr project? Does all of this reformatting ever prevent us from updating solr-orbit with innovations form any of it's upstream projects? Though we have renamed so much.. and AI tooling of course may make that less important....

@janhoy
Copy link
Copy Markdown
Contributor Author

janhoy commented May 30, 2026

Dunno... Do we use ruff format for other python code across Solr project?

Well, this is our largest python codebase, so I think it matters more than for the utility scripts we have in main repo.

We could surely maintain this tool with just loosely documented conventions, but I think we have good experience with code formatting both for java and go (operator).

If we do this, we should add a .git-blame-ignore-revs file with the commit sha of the reformatting, so git bisect won't get confused.

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.

3 participants