ci: add pre-commit config with ruff linting and formatting#130
Merged
ErikBjare merged 2 commits intoActivityWatch:masterfrom Feb 27, 2026
Merged
Conversation
Add .pre-commit-config.yaml with: - ruff: lint checking with auto-fix (matches CI lint.yml) - ruff-format: code formatting - Standard file checks: trailing whitespace, end-of-file, TOML/YAML validity, merge conflict markers
Auto-formatted by ruff-format: - aw_core/util.py - tests/test_query2.py - tests/utils.py
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 3def291 in 9 seconds. Click for details.
- Reviewed
82lines of code in4files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_GXQRCbGTlU06NFm8
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryThis PR adds pre-commit configuration to enable local linting and formatting checks before commits, reducing CI round-trips. The setup properly integrates with the existing ruff configuration in
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 3def291 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pre-commit-config.yamlwith ruff (lint + format) hooks matching the existing CI lint checksaw_core/util.py,tests/test_query2.py,tests/utils.py)This lets developers catch lint and formatting issues locally before pushing, saving CI round-trips.
Setup
pip install pre-commit # or: pipx install pre-commit pre-commit installThen ruff lint + format runs automatically on each commit.
Test plan
ruff check .passes on current masterruff formatto fix 3 files with minor formatting differencesImportant
Adds pre-commit configuration with ruff for linting and formatting, and auto-formats three files for consistency.
.pre-commit-config.yamlwith ruff hooks for linting and formatting.aw_core/util.py,tests/test_query2.py, andtests/utils.pyfor minor inconsistencies.ruff check .passes on current master.ruff formatto fix formatting in 3 files.This description was created by
for 3def291. You can customize this summary. It will automatically update as commits are pushed.