dev #31

Merged
vikingowl merged 2 commits from dev into main 2025-10-05 02:33:03 +02:00
Owner

Add pre-commit workflow and fix linting issues

Summary

  • Add pre-commit framework with automated code quality checks
  • Update CONTRIBUTING.md with detailed pre-commit setup instructions for Arch Linux and other platforms
  • Fix clippy warnings to ensure clean builds
  • Clean up formatting inconsistencies (EOF newlines, trailing whitespace, etc.)

Changes

Pre-commit Setup:

  • Created .pre-commit-config.yaml with hooks for:
    • Code formatting (cargo fmt)
    • Compilation checks (cargo check)
    • Linting (cargo clippy --all-features with warnings as errors)
    • General file hygiene (trailing whitespace, EOF newlines, YAML/TOML validation)
  • Updated contribution guidelines with installation steps and workflow

Code Quality Fixes:

  • Fixed clippy::manual-ok-err in chat_app.rs:1174 by using .ok() method
  • Fixed clippy::useless-format in chat_app.rs:1783 by using .to_string()
  • Fixed clippy::useless-vec in ui.rs:1152 by converting to array literal
  • Standardized EOF newlines across all files
  • Cleaned up formatting and spacing in examples and UI code

Test Plan

  • Run pre-commit run --all-files - all hooks pass
  • Run cargo check - compiles successfully
  • Run cargo clippy --all-features -- -D warnings - no warnings
  • Run cargo fmt --check - all files properly formatted
  • Verify pre-commit hooks run automatically on commit
## Add pre-commit workflow and fix linting issues ### Summary - Add pre-commit framework with automated code quality checks - Update CONTRIBUTING.md with detailed pre-commit setup instructions for Arch Linux and other platforms - Fix clippy warnings to ensure clean builds - Clean up formatting inconsistencies (EOF newlines, trailing whitespace, etc.) ### Changes **Pre-commit Setup:** - Created `.pre-commit-config.yaml` with hooks for: - Code formatting (`cargo fmt`) - Compilation checks (`cargo check`) - Linting (`cargo clippy --all-features` with warnings as errors) - General file hygiene (trailing whitespace, EOF newlines, YAML/TOML validation) - Updated contribution guidelines with installation steps and workflow **Code Quality Fixes:** - Fixed `clippy::manual-ok-err` in `chat_app.rs:1174` by using `.ok()` method - Fixed `clippy::useless-format` in `chat_app.rs:1783` by using `.to_string()` - Fixed `clippy::useless-vec` in `ui.rs:1152` by converting to array literal - Standardized EOF newlines across all files - Cleaned up formatting and spacing in examples and UI code ### Test Plan - [x] Run `pre-commit run --all-files` - all hooks pass - [x] Run `cargo check` - compiles successfully - [x] Run `cargo clippy --all-features -- -D warnings` - no warnings - [x] Run `cargo fmt --check` - all files properly formatted - [x] Verify pre-commit hooks run automatically on commit
vikingowl added 2 commits 2025-10-05 02:32:58 +02:00
- Add `.pre-commit-config.yaml` with hooks for formatting, linting, and general file checks.
- Update `CONTRIBUTING.md` to include pre-commit setup instructions and emphasize automated checks during commits.
- Provide detailed steps for installing and running pre-commit hooks.
- Standardize array and vector formatting for clarity.
- Adjust spacing and indentation in examples and TUI code.
- Ensure proper newline usage across files (e.g., LICENSE, TOML files, etc.).
- Simplify `.to_string()` and `.ok()` calls for brevity.
vikingowl merged commit 5fd4abb0b2 into main 2025-10-05 02:33:03 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Owlibou/owlen#31