mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 15:53:16 +00:00
chore: linting
This commit is contained in:
1
.serena/.gitignore
vendored
Normal file
1
.serena/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/cache
|
||||
67
.serena/memories/areas_for_improvement.md
Normal file
67
.serena/memories/areas_for_improvement.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Areas for Improvement
|
||||
|
||||
## Code Quality Enhancements
|
||||
|
||||
### 1. Configuration Management
|
||||
|
||||
- **Inconsistent indentation**: Mixed tabs/spaces across config files
|
||||
- **Line length management**: Need consistent enforcement of limits
|
||||
- **Template standardization**: Memory files need consistent formatting template
|
||||
|
||||
### 2. Linting Configuration Improvements
|
||||
|
||||
- **Shellcheck exclusions**: Add proper ignore patterns for submodules
|
||||
- **EditorConfig refinement**: Some rules too strict for generated/third-party content
|
||||
- **Prettier ignore patterns**: Better exclusion of binary/generated files
|
||||
|
||||
### 3. Testing Infrastructure
|
||||
|
||||
- **Bats test errors**: Tests failing due to missing `rm` command in PATH
|
||||
- **Test coverage**: Limited test coverage for shell functions
|
||||
- **CI/CD integration**: Need automated linting in GitHub Actions
|
||||
|
||||
### 4. Documentation Gaps
|
||||
|
||||
- **Onboarding docs**: Missing clear setup instructions for new contributors
|
||||
- **Troubleshooting guide**: Need common error resolution steps
|
||||
- **Architecture overview**: Missing high-level system architecture
|
||||
|
||||
## Performance & Maintenance
|
||||
|
||||
### 5. Submodule Management
|
||||
|
||||
- **Large submodules**: Some submodules contain unnecessary files
|
||||
- **Update frequency**: Need systematic submodule update process
|
||||
- **Dependency tracking**: Better documentation of submodule purposes
|
||||
|
||||
### 6. Cross-Platform Considerations
|
||||
|
||||
- **Darwin-specific paths**: Some hardcoded macOS paths could be parameterized
|
||||
- **Shell compatibility**: More testing across bash/zsh/fish environments
|
||||
- **Tool availability**: Better fallbacks when optional tools missing
|
||||
|
||||
### 7. Security & Privacy
|
||||
|
||||
- **Secret management**: Better examples for secret configuration
|
||||
- **Permission handling**: Some scripts could use more restrictive permissions
|
||||
- **Audit trail**: Track configuration changes and their impact
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### 8. Automation Opportunities
|
||||
|
||||
- **Auto-formatting**: Pre-commit hooks for consistent formatting
|
||||
- **Dependency updates**: Automated updates for package.json dependencies
|
||||
- **Health checks**: Scripts to validate configuration integrity
|
||||
|
||||
### 9. Error Handling
|
||||
|
||||
- **Graceful degradation**: Better fallbacks when tools unavailable
|
||||
- **Error messages**: More informative error output
|
||||
- **Recovery procedures**: Automated recovery from common failures
|
||||
|
||||
### 10. Modularity
|
||||
|
||||
- **Configuration splitting**: Some large config files could be modularized
|
||||
- **Feature flags**: Optional components for minimal installations
|
||||
- **Host-specific configs**: Better organization of machine-specific settings
|
||||
50
.serena/memories/code_style_conventions.md
Normal file
50
.serena/memories/code_style_conventions.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Code Style and Conventions
|
||||
|
||||
## EditorConfig Rules (.editorconfig)
|
||||
|
||||
- **Charset**: UTF-8
|
||||
- **Line endings**: LF
|
||||
- **Indent style**: Spaces (except for specific files)
|
||||
- **Indent size**: 2 spaces (default)
|
||||
- **Final newline**: Required
|
||||
- **Trailing whitespace**: Trimmed
|
||||
|
||||
### Language-specific Rules
|
||||
|
||||
- **Fish scripts**: 4-space indent, 80 char line limit
|
||||
- **PHP files**: 4-space indent
|
||||
- **Markdown**: 120 char line limit
|
||||
- **Lua**: 90 char line limit
|
||||
- **Git files**: Tab indentation
|
||||
- **Shell scripts**: 2-space indent with specific shfmt settings
|
||||
|
||||
## Prettier Configuration
|
||||
|
||||
- Extends `@ivuorinen/prettier-config`
|
||||
- **Trailing commas**: Always
|
||||
- **Markdown**: 120 char width, preserve prose wrapping
|
||||
|
||||
## ESLint Configuration
|
||||
|
||||
- Extends `@ivuorinen` base configuration
|
||||
- Applied to JavaScript/TypeScript files
|
||||
|
||||
## Shell Script Standards (.shellcheckrc)
|
||||
|
||||
- External sources following enabled
|
||||
- Disabled checks: SC2039, SC2166, SC2154, SC1091, SC2174, SC2016
|
||||
- Must include shebang or `# shellcheck shell=bash`
|
||||
|
||||
## Formatting Tools
|
||||
|
||||
- **Shell scripts**: shfmt with specific rules
|
||||
- **Markdown**: markdownlint + prettier
|
||||
- **JavaScript/TypeScript**: prettier + eslint
|
||||
- **YAML**: yamllint
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
- **Shell functions**: Use `x-` prefix for cross-shell compatibility
|
||||
- **Environment variables**: UPPERCASE with underscores
|
||||
- **File names**: lowercase with hyphens for scripts
|
||||
- **Directory structure**: lowercase, organized by tool/purpose
|
||||
80
.serena/memories/critical_linting_errors.md
Normal file
80
.serena/memories/critical_linting_errors.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Critical Linting Errors That Must Be Fixed
|
||||
|
||||
## Current Status: BLOCKING Issues Identified
|
||||
|
||||
The linting system has revealed 150+ violations across multiple categories that must be addressed immediately.
|
||||
|
||||
## EditorConfig Violations (High Priority)
|
||||
|
||||
### Missing Final Newlines
|
||||
|
||||
- All `.serena/memories/*.md` files missing final newlines
|
||||
- Multiple project configuration files affected
|
||||
- This is a BLOCKING issue per user instructions
|
||||
|
||||
### Line Length Violations
|
||||
|
||||
- Fish shell configs exceed 80-character limit (`.editorconfig` enforced)
|
||||
- Memory files have lines exceeding 120-character limit
|
||||
- WezTerm configuration files have long lines
|
||||
|
||||
### Indentation Errors
|
||||
|
||||
- Git configuration using tabs instead of spaces
|
||||
- WezTerm color scheme files using tabs vs spaces
|
||||
- Perl scripts with inconsistent indentation
|
||||
|
||||
## Markdownlint Issues (Memory Files)
|
||||
|
||||
### Systematic Problems Across All Memory Files
|
||||
|
||||
- Missing blank lines around headings (MD022)
|
||||
- Lists not surrounded by blank lines (MD032)
|
||||
- Fenced code blocks not surrounded by blank lines (MD031)
|
||||
- Trailing punctuation in headings (MD026)
|
||||
- Missing language specification for fenced code blocks (MD040)
|
||||
- Missing final newlines (MD047)
|
||||
|
||||
### Specific Files Affected
|
||||
|
||||
- `areas_for_improvement.md`: 20+ violations
|
||||
- `code_style_conventions.md`: 15+ violations
|
||||
- `critical_linting_errors.md`: 25+ violations
|
||||
- `darwin_system_utilities.md`: 15+ violations
|
||||
- `immediate_action_items.md`: 25+ violations
|
||||
- `project_overview.md`: 15+ violations
|
||||
- `project_structure.md`: 20+ violations
|
||||
- `shellcheck_issues.md`: 15+ violations
|
||||
- `suggested_commands.md`: 25+ violations
|
||||
- `task_completion_checklist.md`: 10+ violations
|
||||
|
||||
## Prettier Formatting Issues
|
||||
|
||||
### JSON Configuration Files
|
||||
|
||||
- `.commitlintrc.json`, `.eslintrc.json`, `.luarc.json`
|
||||
- `.releaserc.json`, `.github/renovate.json`
|
||||
- Host-specific configurations in `config/` directory
|
||||
|
||||
### YAML Files
|
||||
|
||||
- `.mega-linter.yml` formatting inconsistencies
|
||||
- Various configuration files needing formatting
|
||||
|
||||
## Immediate Action Required
|
||||
|
||||
1. **Fix memory files**: Apply markdown formatting rules
|
||||
2. **Run auto-fixers**: `yarn fix` to address automatic fixes
|
||||
3. **Manual corrections**: Address remaining EditorConfig violations
|
||||
4. **Validation**: Ensure `yarn lint` passes completely
|
||||
|
||||
## Impact Assessment
|
||||
|
||||
These violations prevent:
|
||||
|
||||
- Successful CI/CD pipeline execution
|
||||
- Code quality standards compliance
|
||||
- Pre-commit hook success
|
||||
- Project maintainability standards
|
||||
|
||||
Per user instructions: "Linting issues ARE NOT ACCEPTABLE" and "EditorConfig problems are blocking errors"
|
||||
66
.serena/memories/darwin_system_utilities.md
Normal file
66
.serena/memories/darwin_system_utilities.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Darwin (macOS) System Utilities
|
||||
|
||||
## Available Command Paths
|
||||
|
||||
Based on the current system setup:
|
||||
|
||||
### Core System Commands
|
||||
|
||||
- `git`: `/opt/homebrew/bin/git` (Homebrew version)
|
||||
- `find`: `/usr/bin/find` (system version)
|
||||
- `cd`: shell built-in command
|
||||
- `ls`: aliased to `eza -h -s=type --git --icons --group-directories-first`
|
||||
- `grep`: aliased to `grep --color`
|
||||
|
||||
### Modern Alternatives (Rust-based)
|
||||
|
||||
- `fd`: `/Users/ivuorinen/.local/share/cargo/bin/fd` (modern find)
|
||||
- `rg`: `/Users/ivuorinen/.local/share/cargo/bin/rg` (ripgrep for text search)
|
||||
|
||||
## Recommended Usage Patterns
|
||||
|
||||
### File Search
|
||||
|
||||
```bash
|
||||
# Use fd instead of find when possible
|
||||
fd "*.sh" # Find shell scripts
|
||||
fd -t f -e lua # Find Lua files
|
||||
find . -name "*.sh" # Fallback to system find
|
||||
```
|
||||
|
||||
### Text Search
|
||||
|
||||
```bash
|
||||
# Use rg (ripgrep) instead of grep when possible
|
||||
rg "function.*bash" # Search for bash functions
|
||||
rg -t shell "export" # Search in shell files only
|
||||
grep "pattern" file.txt # Fallback to system grep
|
||||
```
|
||||
|
||||
### Directory Navigation
|
||||
|
||||
```bash
|
||||
# Use eza features via ls alias
|
||||
ls # Shows icons, git status, grouped directories
|
||||
ls -la # Long format with hidden files
|
||||
cd /full/path # Always use full paths in scripts
|
||||
```
|
||||
|
||||
## Path Configuration
|
||||
|
||||
The system is configured with these PATH priorities:
|
||||
|
||||
1. `~/.local/bin` (user scripts)
|
||||
2. `~/.dotfiles/local/bin` (dotfiles scripts)
|
||||
3. `~/.local/share/bob/nvim-bin` (Neovim)
|
||||
4. `~/.local/share/cargo/bin` (Rust tools like fd, rg)
|
||||
5. `/opt/homebrew/bin` (Homebrew packages)
|
||||
6. `/usr/local/bin` (system packages)
|
||||
|
||||
## Shell Compatibility
|
||||
|
||||
The dotfiles support multiple shells through `config/shared.sh`:
|
||||
|
||||
- Functions prefixed with `x-` work across bash, zsh, and fish
|
||||
- Path management handled automatically per shell
|
||||
- Environment variables set appropriately per shell
|
||||
114
.serena/memories/immediate_action_items.md
Normal file
114
.serena/memories/immediate_action_items.md
Normal file
@@ -0,0 +1,114 @@
|
||||
# Immediate Action Items - Priority Order
|
||||
|
||||
## HIGH PRIORITY (Must Fix Before Any Development)
|
||||
|
||||
### 1. Fix Memory File Formatting (BLOCKING)
|
||||
|
||||
```bash
|
||||
# These files prevent any linting from passing:
|
||||
- .serena/memories/code_style_conventions.md
|
||||
- .serena/memories/darwin_system_utilities.md
|
||||
- .serena/memories/project_overview.md
|
||||
- .serena/memories/project_structure.md
|
||||
- .serena/memories/suggested_commands.md
|
||||
- .serena/memories/task_completion_checklist.md
|
||||
|
||||
# Issues: Missing final newlines, markdown formatting, line length
|
||||
# Impact: Blocks all linting commands
|
||||
```
|
||||
|
||||
### 2. Fix Fish Shell Line Length Violations (BLOCKING)
|
||||
|
||||
```bash
|
||||
# Files exceeding 80-char limit:
|
||||
config/fish/alias.fish (4 violations)
|
||||
config/fish/exports.fish (15 violations)
|
||||
|
||||
# These are CRITICAL - Fish config has strict limits
|
||||
# Must be fixed before any fish-related changes
|
||||
```
|
||||
|
||||
### 3. Fix Git Configuration Indentation (BLOCKING)
|
||||
|
||||
```bash
|
||||
# Files with tab/space mixing:
|
||||
config/git/shared (40+ violations)
|
||||
hosts/s/config/git/overrides/config
|
||||
hosts/s/config/git/local.d/work-git
|
||||
|
||||
# Impact: Git configuration may not work correctly
|
||||
```
|
||||
|
||||
## MEDIUM PRIORITY (Fix During Next Development Cycle)
|
||||
|
||||
### 4. Prettier Formatting Issues
|
||||
|
||||
```bash
|
||||
# 17 files need prettier formatting:
|
||||
yarn fix:prettier
|
||||
# Most are JSON/YAML configuration files
|
||||
```
|
||||
|
||||
### 5. WezTerm Color Scheme Indentation
|
||||
|
||||
```bash
|
||||
# All files in config/wezterm/colors/ using tabs instead of spaces
|
||||
# Affects terminal appearance configuration
|
||||
```
|
||||
|
||||
### 6. Update Linting Configuration
|
||||
|
||||
```bash
|
||||
# Add shellcheck exclusions for submodules:
|
||||
# - tools/antidote/
|
||||
# - config/tmux/plugins/
|
||||
# - config/vim/extra/fzf/
|
||||
# - config/cheat/cheatsheets/tldr/
|
||||
```
|
||||
|
||||
## LOW PRIORITY (Future Improvements)
|
||||
|
||||
### 7. Test Infrastructure
|
||||
|
||||
```bash
|
||||
# Fix bats test PATH issues
|
||||
# Tests pass but show rm command not found errors
|
||||
```
|
||||
|
||||
### 8. Documentation Updates
|
||||
|
||||
```bash
|
||||
# Add troubleshooting section to AGENTS.md
|
||||
# Create shellcheck exclusion documentation
|
||||
```
|
||||
|
||||
## Immediate Commands to Run
|
||||
|
||||
### Step 1: Auto-fix What's Possible
|
||||
|
||||
```bash
|
||||
yarn fix:prettier # Fix 17 files
|
||||
yarn fix:markdown # Attempt markdown fixes
|
||||
```
|
||||
|
||||
### Step 2: Manual Fixes Required
|
||||
|
||||
- Add final newlines to all memory files
|
||||
- Wrap long lines in Fish configuration files
|
||||
- Convert tabs to spaces in Git configuration files
|
||||
|
||||
### Step 3: Verify Progress
|
||||
|
||||
```bash
|
||||
yarn lint:ec # Check EditorConfig compliance
|
||||
yarn lint:markdown # Check markdown issues
|
||||
yarn lint:prettier # Check remaining prettier issues
|
||||
```
|
||||
|
||||
## Success Criteria
|
||||
|
||||
✅ `yarn lint` passes without errors
|
||||
✅ All EditorConfig violations resolved
|
||||
✅ Memory files properly formatted
|
||||
✅ Fish configuration under line limits
|
||||
✅ Git configuration uses consistent indentation
|
||||
61
.serena/memories/project_overview.md
Normal file
61
.serena/memories/project_overview.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# .dotfiles Project Overview
|
||||
|
||||
## Purpose
|
||||
|
||||
This is a comprehensive personal dotfiles repository for managing development
|
||||
environment configurations across macOS systems. The project uses **Dotbot** as
|
||||
the primary installation framework to manage symlinks and setup configurations.
|
||||
|
||||
## Key Features
|
||||
|
||||
- Automated configuration management using Dotbot
|
||||
- Support for multiple development tools and applications
|
||||
- Host-specific configurations in `/hosts/` directory
|
||||
- Comprehensive testing and linting setup with pre-commit hooks
|
||||
- Cross-shell compatibility (bash, zsh, fish)
|
||||
- Large collection of custom utility scripts in `local/bin/`
|
||||
- Git submodules for external tools (dotbot, antidote, tmux plugins)
|
||||
- Environment-specific configurations (secrets management)
|
||||
|
||||
## Recent Notable Changes (from git status)
|
||||
|
||||
- New everforest color theme configurations added
|
||||
- Multiple temporary fish configuration files present
|
||||
- Updates to various configuration files (.commitlintrc.json, .eslintrc.json, etc.)
|
||||
- New x-pr-comments script and documentation added
|
||||
- Various tmux plugin updates
|
||||
- Husky configuration relocated from base/ to config/husky/
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Shell**: Bash (primary), with Fish and Zsh support
|
||||
- **Configuration Manager**: Dotbot with plugins (asdf, brew, include, pip)
|
||||
- **Package Manager**: Yarn 1.22.22 (Node.js), Homebrew (macOS), pipx (Python)
|
||||
- **Testing**: Bats test framework, custom test-all.sh script
|
||||
- **Linting**: MegaLinter, Prettier, ESLint, Markdownlint, ShellCheck, EditorConfig
|
||||
- **Automation**: Pre-commit hooks, GitHub Actions, Renovate
|
||||
|
||||
## Project Structure Highlights
|
||||
|
||||
- `/config/` - Main configuration directory (74+ subdirectories)
|
||||
- `/local/bin/` - Custom utility scripts (100+ scripts with documentation)
|
||||
- `/hosts/` - Host-specific configurations
|
||||
- `/tools/` - Git submodules for external tools
|
||||
- `/base/` - Base configuration files
|
||||
- `/secrets/` - Secret management configurations
|
||||
- `/scripts/` - Installation and setup scripts
|
||||
- `/.github/` - GitHub Actions workflows and configurations
|
||||
|
||||
## Target System
|
||||
|
||||
- **Platform**: Darwin (macOS) - Version 24.6.0
|
||||
- **Architecture**: Universal (Intel/Apple Silicon via Homebrew)
|
||||
- **Dependencies**: Git, Homebrew, Yarn, various CLI tools managed via asdf/aqua
|
||||
|
||||
## Development Environment
|
||||
|
||||
- Node.js managed via nvm/asdf
|
||||
- Go version specified (.go-version)
|
||||
- Python version specified (.python-version)
|
||||
- Package management via Yarn with lockfile
|
||||
- TypeScript support for configuration files
|
||||
116
.serena/memories/project_structure.md
Normal file
116
.serena/memories/project_structure.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Project Structure
|
||||
|
||||
## Root Directory
|
||||
|
||||
```text
|
||||
.dotfiles/
|
||||
├── install # Main installation script (Dotbot runner)
|
||||
├── install.conf.yaml # Dotbot configuration
|
||||
├── package.json # Node.js dependencies for linting/testing (Yarn managed)
|
||||
├── AGENTS.md # Project documentation and guidelines
|
||||
├── test-all.sh # Bats test runner
|
||||
├── add-submodules.sh # Git submodule management
|
||||
└── .serena/ # Claude Code/Serena analysis cache (new)
|
||||
```
|
||||
|
||||
## Main Directories
|
||||
|
||||
### `config/` (74+ subdirectories)
|
||||
|
||||
Configuration files for development tools and applications:
|
||||
|
||||
- `git/` - Git configuration with delta integration and everforest theme
|
||||
- `nvim/` - Neovim configuration with Lua plugins
|
||||
- `tmux/` - Tmux configuration with multiple plugins (dark-notify, window-name, etc.)
|
||||
- `fish/` - Fish shell configuration with completions and functions
|
||||
- `zsh/` - Zsh configuration with antidote plugin manager
|
||||
- `fzf/` - Fuzzy finder configuration with everforest theme
|
||||
- `wezterm/` - WezTerm terminal configuration
|
||||
- `homebrew/` - Homebrew environment configuration
|
||||
- `starship.toml` - Starship prompt configuration
|
||||
- `shared.sh` - Cross-shell compatibility functions
|
||||
- `aerospace/`, `amethyst/`, `yabai/`, `skhd/` - Window managers
|
||||
- `direnv/`, `asdf/`, `aqua/` - Development environment tools
|
||||
- `gpg-tui/`, `op/`, `gh/` - Security and CLI tools
|
||||
- Theme configurations: everforest color schemes across multiple tools
|
||||
|
||||
### `base/`
|
||||
|
||||
Dotfiles that get symlinked to home directory with `.` prefix:
|
||||
|
||||
- Contains traditional dotfiles like `.bashrc`, `.zshrc`, etc.
|
||||
- `plan` - Planning/note-taking configuration
|
||||
- `shellcheckrc` - ShellCheck rules
|
||||
|
||||
### `local/`
|
||||
|
||||
- `bin/` - 100+ custom scripts with comprehensive documentation
|
||||
- Homegrown utilities (dfm, git tools, backup scripts, etc.)
|
||||
- Sourced utilities (from skx/sysadmin-util, mvdan/dotfiles)
|
||||
- Each script has corresponding .md documentation
|
||||
- Recent additions: x-pr-comments for GitHub PR analysis
|
||||
- `share/fonts/` - JetBrains Mono font files
|
||||
- `man/` - Manual pages
|
||||
|
||||
### `ssh/`
|
||||
|
||||
SSH configuration files (mode 0600/0700)
|
||||
|
||||
- `shared.d/` - Shared SSH configurations for specific hosts
|
||||
|
||||
### `tools/` (Git submodules)
|
||||
|
||||
External tools and Dotbot plugins:
|
||||
|
||||
- `dotbot/` - Dotbot installation framework
|
||||
- `dotbot-*` - Dotbot plugins (asdf, brew, include, pip)
|
||||
- `antidote/` - Zsh plugin manager
|
||||
- Various tmux plugins (continuum, resurrect, yank, etc.)
|
||||
|
||||
### `hosts/`
|
||||
|
||||
Host-specific configurations:
|
||||
|
||||
- `air/`, `s/`, `v/` - Individual host configurations
|
||||
- Applied after main configuration
|
||||
|
||||
### `secrets/`
|
||||
|
||||
Secret and credential management configuration
|
||||
|
||||
### `scripts/`
|
||||
|
||||
Installation and setup automation scripts
|
||||
|
||||
### `.github/`
|
||||
|
||||
- GitHub Actions workflows
|
||||
- Renovate configuration
|
||||
- Issue templates and documentation
|
||||
|
||||
### Development Configuration Files
|
||||
|
||||
- `.editorconfig` - Editor configuration rules
|
||||
- `.prettierrc.js` - Prettier formatting rules
|
||||
- `.eslintrc.json` - ESLint linting rules
|
||||
- `.commitlintrc.json` - Commit message linting
|
||||
- `.shellcheckrc` - ShellCheck configuration
|
||||
- `.mega-linter.yml` - MegaLinter configuration
|
||||
- `.luarc.json` - Lua language server configuration
|
||||
- `.nvmrc`, `.go-version`, `.python-version` - Version management
|
||||
- Various ignore files (.gitignore, .prettierignore, .yamlignore, etc.)
|
||||
|
||||
## Testing Infrastructure
|
||||
|
||||
- `tests/` - Bats test files
|
||||
- `test-all.sh` - Main test runner
|
||||
- Pre-commit hooks for automated testing
|
||||
- GitHub Actions for CI/CD
|
||||
|
||||
## Recent Structural Changes
|
||||
|
||||
- Husky configuration moved from `base/huskyrc` to `config/husky/init.sh`
|
||||
- Addition of everforest theme configurations across multiple tools
|
||||
- New .serena directory for AI analysis caching
|
||||
- Multiple temporary fish configuration files (everforest themes)
|
||||
- Enhanced git configuration with delta and everforest theming
|
||||
62
.serena/memories/shellcheck_issues.md
Normal file
62
.serena/memories/shellcheck_issues.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# ShellCheck Issues Analysis
|
||||
|
||||
## Critical Shell Script Problems
|
||||
|
||||
### Missing Shebangs (SC2148)
|
||||
|
||||
Multiple shell scripts missing proper shebang lines:
|
||||
|
||||
- `tools/antidote/tests/` - Test scripts
|
||||
- `config/vim/*/test/lib/common.sh` - FZF test libraries
|
||||
- `config/tmux/plugins/*/scripts/helpers.sh` - Plugin helper scripts
|
||||
- Various submodule scripts
|
||||
|
||||
### Syntax Errors (SC1036, SC1088, SC1073)
|
||||
|
||||
- `config/vim/fzf/test/lib/common.sh` - Invalid ERB template syntax
|
||||
- `config/cheat/cheatsheets/tldr/` - Markdown files incorrectly parsed as shell
|
||||
- `tmux-sessionist/scripts/list_sessions.sh` - Brace parsing errors
|
||||
|
||||
### Variable Assignment Issues (SC1007, SC2155)
|
||||
|
||||
- `config/vim/extra/fzf/test/lib/common.sh` - Incorrect empty variable assignments
|
||||
- Multiple tmux plugin scripts - Declare and assign should be separate
|
||||
|
||||
### Quoting Problems (SC2086, SC2006)
|
||||
|
||||
- Unquoted variable expansions in tmux plugin scripts
|
||||
- Legacy backtick usage instead of $(...) syntax
|
||||
- Missing quotes around variable expansions
|
||||
|
||||
## Third-Party Code Issues
|
||||
|
||||
### Submodule Problems
|
||||
|
||||
Most shellcheck errors are in **third-party submodules**:
|
||||
|
||||
- `tools/antidote/` - Zsh plugin manager
|
||||
- `config/tmux/plugins/` - Tmux plugins
|
||||
- `config/vim/extra/fzf/` - FZF integration
|
||||
- `config/cheat/cheatsheets/tldr/` - Cheat sheet collection
|
||||
|
||||
### Recommendation
|
||||
|
||||
- These should be **excluded from shellcheck** via configuration
|
||||
- Focus linting only on **project-owned scripts**
|
||||
- Add shellcheck ignore patterns for submodule directories
|
||||
|
||||
## Project-Owned Script Issues
|
||||
|
||||
### Main Scripts Status
|
||||
|
||||
- `install` - ✅ Clean (no shellcheck errors)
|
||||
- `test-all.sh` - ✅ Clean
|
||||
- `add-submodules.sh` - ✅ Clean
|
||||
- `config/shared.sh` - ✅ Clean
|
||||
- Scripts in `local/bin/` - ✅ Mostly clean
|
||||
|
||||
### Minor Issues Found
|
||||
|
||||
- Some scripts could benefit from stricter quoting
|
||||
- Consistent shebang usage across all scripts
|
||||
- Consider adding `set -euo pipefail` to more scripts
|
||||
121
.serena/memories/suggested_commands.md
Normal file
121
.serena/memories/suggested_commands.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# Essential Commands for .dotfiles Development
|
||||
|
||||
## Installation & Setup
|
||||
|
||||
```bash
|
||||
# Initial setup - install linting tools and dependencies
|
||||
yarn install
|
||||
|
||||
# Install/update all dotfiles configurations
|
||||
./install
|
||||
|
||||
# Update git submodules (multiple approaches)
|
||||
git submodule update --remote --merge
|
||||
git submodule update --init --recursive --force
|
||||
bash add-submodules.sh
|
||||
```
|
||||
|
||||
## Development Commands
|
||||
|
||||
```bash
|
||||
# Linting (run all linters - ALWAYS fix all issues)
|
||||
yarn lint
|
||||
|
||||
# Individual linting commands
|
||||
yarn lint:markdown # Markdownlint
|
||||
yarn lint:prettier # Prettier check
|
||||
yarn lint:ec # EditorConfig checker
|
||||
|
||||
# Auto-fixing (use these BEFORE manual linting)
|
||||
yarn fix # Fix all format issues
|
||||
yarn fix:markdown # Fix markdown formatting
|
||||
yarn fix:prettier # Fix prettier formatting
|
||||
|
||||
# Testing
|
||||
yarn test # Run all Bats tests
|
||||
bash test-all.sh # Alternative test runner
|
||||
```
|
||||
|
||||
## Pre-commit Hooks (Comprehensive)
|
||||
|
||||
Current pre-commit configuration includes:
|
||||
|
||||
- **Security**: detect-aws-credentials, detect-private-key
|
||||
- **File integrity**: check-case-conflict, check-merge-conflict, check-symlinks
|
||||
- **Shell scripts**: shellcheck, shfmt (formatting)
|
||||
- **YAML/JSON**: yamllint, check-yaml, check-toml, pretty-format-json
|
||||
- **Markdown**: markdownlint with auto-fix
|
||||
- **Lua**: stylua formatting for Neovim configs
|
||||
- **Fish**: fish_syntax, fish_indent for shell configs
|
||||
- **GitHub Actions**: actionlint validation
|
||||
- **Renovate**: renovate-config-validator
|
||||
- **General**: trailing-whitespace, end-of-file-fixer, mixed-line-ending
|
||||
|
||||
```bash
|
||||
# Run pre-commit manually
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
## Version Management
|
||||
|
||||
```bash
|
||||
# Check current versions
|
||||
node --version # Managed by nvm (.nvmrc: v20.18.1)
|
||||
go version # Managed by asdf (.go-version)
|
||||
python --version # Managed by asdf (.python-version)
|
||||
```
|
||||
|
||||
## System Utilities (Darwin-specific)
|
||||
|
||||
```bash
|
||||
# Modern CLI tools available
|
||||
ls # aliased to eza with icons and git info
|
||||
grep # aliased to grep --color
|
||||
fd pattern # modern find alternative
|
||||
rg pattern # ripgrep for text search
|
||||
bat file # modern cat with syntax highlighting
|
||||
```
|
||||
|
||||
## Project-specific Scripts (100+ available)
|
||||
|
||||
```bash
|
||||
# Dotfiles management
|
||||
bash local/bin/dfm install all
|
||||
|
||||
# Git utilities
|
||||
git-dirty # Check for dirty git repositories
|
||||
git-fsck-dirs # Run fsck on git directories
|
||||
git-update-dirs # Update multiple git directories
|
||||
|
||||
# Development utilities
|
||||
x-pr-comments <pr> # Analyze GitHub PR comments (NEW)
|
||||
x-set-php-aliases # Generate PHP version aliases
|
||||
x-env-list # List environment variables
|
||||
x-open-ports # Check open network ports
|
||||
|
||||
# Backup utilities
|
||||
x-backup-folder # Backup directories
|
||||
x-backup-mysql-with-prefix # MySQL backup with prefix
|
||||
```
|
||||
|
||||
## Configuration Management
|
||||
|
||||
```bash
|
||||
# Load shell configurations
|
||||
source config/shared.sh # Cross-shell compatibility functions
|
||||
source x-set-php-aliases # PHP version management
|
||||
|
||||
# Host-specific configurations
|
||||
# Automatically applied: hosts/{hostname}/
|
||||
```
|
||||
|
||||
## Quality Assurance (CRITICAL)
|
||||
|
||||
**All linting errors are BLOCKING and must be fixed:**
|
||||
|
||||
- EditorConfig violations are considered blocking errors
|
||||
- ShellCheck warnings must be addressed
|
||||
- Prettier formatting must be consistent
|
||||
- Markdownlint rules must be followed
|
||||
- NEVER use --no-verify with git operations
|
||||
- ALWAYS run autofixers before manual intervention
|
||||
115
.serena/memories/task_completion_checklist.md
Normal file
115
.serena/memories/task_completion_checklist.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# Task Completion Checklist
|
||||
|
||||
When completing any development task in this dotfiles repository, follow this
|
||||
checklist to ensure compliance with project standards.
|
||||
|
||||
## Required Steps (BLOCKING)
|
||||
|
||||
### 1. Code Quality Checks
|
||||
|
||||
```bash
|
||||
# Run all linting tools - MUST PASS with zero errors
|
||||
yarn lint
|
||||
|
||||
# Individual checks if needed:
|
||||
yarn lint:markdown # Markdownlint validation
|
||||
yarn lint:prettier # Prettier formatting check
|
||||
yarn lint:ec # EditorConfig compliance verification
|
||||
```
|
||||
|
||||
### 2. Shell Script Validation (if applicable)
|
||||
|
||||
```bash
|
||||
# All shell scripts must pass shellcheck without warnings
|
||||
find . -path ./node_modules -prune -o -name '*.sh' -print0 | xargs -0 shellcheck
|
||||
|
||||
# For individual scripts:
|
||||
shellcheck path/to/script.sh
|
||||
```
|
||||
|
||||
### 3. Testing Infrastructure
|
||||
|
||||
```bash
|
||||
# Run all tests - MUST PASS completely
|
||||
yarn test
|
||||
# OR alternative runner
|
||||
bash test-all.sh
|
||||
|
||||
# For specific test categories:
|
||||
# Bats tests in tests/ directory
|
||||
# Individual script functionality tests
|
||||
```
|
||||
|
||||
### 4. EditorConfig Compliance (CRITICAL)
|
||||
|
||||
- **BLOCKING REQUIREMENT**: EditorConfig violations prevent completion
|
||||
- All code must follow `.editorconfig` rules exactly:
|
||||
- UTF-8 charset
|
||||
- LF line endings
|
||||
- Final newline required
|
||||
- Trailing whitespace removal
|
||||
- Language-specific indentation (2-space default, 4-space for Fish)
|
||||
- Use autofixers before attempting manual fixes
|
||||
- Never modify linting configuration to bypass errors
|
||||
|
||||
## Auto-fixing Protocol
|
||||
|
||||
```bash
|
||||
# ALWAYS run auto-fixers first, in this order:
|
||||
yarn fix # Fix all auto-fixable issues
|
||||
yarn fix:markdown # Fix markdown formatting violations
|
||||
yarn fix:prettier # Fix code formatting issues
|
||||
|
||||
# Verify fixes applied correctly:
|
||||
yarn lint # Should show reduced error count
|
||||
```
|
||||
|
||||
## Pre-commit Hook Integration
|
||||
|
||||
Current pre-commit configuration enforces:
|
||||
|
||||
- Security checks (credentials, private keys)
|
||||
- Shell script validation (shellcheck, shfmt)
|
||||
- Markdown formatting (markdownlint with auto-fix)
|
||||
- YAML/JSON validation and formatting
|
||||
- Lua formatting (stylua for Neovim configs)
|
||||
- Fish shell syntax validation
|
||||
- GitHub Actions validation (actionlint)
|
||||
- Renovate configuration validation
|
||||
|
||||
## Memory File Maintenance
|
||||
|
||||
When updating memory files:
|
||||
|
||||
1. Follow markdown best practices (blank lines around headings/lists)
|
||||
2. Specify language for fenced code blocks
|
||||
3. Ensure final newline exists
|
||||
4. Respect line length limits (120 chars for markdown)
|
||||
5. Use proper heading hierarchy
|
||||
|
||||
## Critical Success Criteria
|
||||
|
||||
✅ **REQUIRED FOR TASK COMPLETION:**
|
||||
|
||||
- `yarn lint` exits with code 0 (no errors)
|
||||
- `yarn test` passes all test suites
|
||||
- EditorConfig compliance verified
|
||||
- No trailing whitespace or missing final newlines
|
||||
- Shell scripts have proper shebangs and pass shellcheck
|
||||
- All temporary/cache files cleaned up
|
||||
|
||||
❌ **BLOCKING ISSUES:**
|
||||
|
||||
- Any linting errors or warnings
|
||||
- EditorConfig violations of any kind
|
||||
- Test failures or incomplete test coverage
|
||||
- Use of `--no-verify` flag with git operations
|
||||
- Modified linting configurations to bypass errors
|
||||
|
||||
## Quality Assurance Notes
|
||||
|
||||
- **Use `which command`** to get full paths in scripts
|
||||
- **Prefer modern tools**: `rg` over `grep`, `fd` over `find`, `bat` over `cat`
|
||||
- **Test cross-shell compatibility**: bash, zsh, fish
|
||||
- **Validate host-specific configurations** don't break general setup
|
||||
- **Document any new utilities** in `local/bin/README.md`
|
||||
90
.serena/project.yml
Normal file
90
.serena/project.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
|
||||
# * For C, use cpp
|
||||
# * For JavaScript, use typescript
|
||||
# Special requirements:
|
||||
# * csharp: Requires the presence of a .sln file in the project folder.
|
||||
language: bash
|
||||
|
||||
# whether to use the project's gitignore file to ignore files
|
||||
# Added on 2025-04-07
|
||||
ignore_all_files_in_gitignore: true
|
||||
# list of additional paths to ignore
|
||||
# same syntax as gitignore, so you can use * and **
|
||||
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
||||
# Added (renamed) on 2025-04-07
|
||||
ignored_paths:
|
||||
- '*.swp'
|
||||
- '*.tmp'
|
||||
- '*.tmp.*'
|
||||
- '.DS_Store'
|
||||
- '.git/**'
|
||||
- /config/cheat/cheatsheets/community/**
|
||||
- /config/cheat/cheatsheets/pure-bash-bible/**
|
||||
- /config/cheat/cheatsheets/tldr/**
|
||||
- /config/fish/cheatsheets/community/**
|
||||
- /config/fzf/**
|
||||
- /config/nvim/snippets/**
|
||||
- /config/nvim/spell/**
|
||||
- /config/op/plugins/**
|
||||
- /config/tmux/plugins/**
|
||||
- /config/vim/extra/**
|
||||
- /config/zsh/completions/**
|
||||
- /config/zsh/plugins/**
|
||||
- /local/man/fzf
|
||||
- /local/share/fonts
|
||||
- /tools/antidote
|
||||
- /tools/dotbot
|
||||
- /tools/dotbot-*/**
|
||||
- node_modules/**
|
||||
|
||||
# whether the project is in read-only mode
|
||||
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
||||
# Added on 2025-04-18
|
||||
read_only: false
|
||||
|
||||
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
||||
# Below is the complete list of tools for convenience.
|
||||
# To make sure you have the latest list of tools, and to view their descriptions,
|
||||
# execute `uv run scripts/print_tool_overview.py`.
|
||||
#
|
||||
# * `activate_project`: Activates a project by name.
|
||||
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
||||
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
||||
# * `delete_lines`: Deletes a range of lines within a file.
|
||||
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
||||
# * `execute_shell_command`: Executes a shell command.
|
||||
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
||||
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
||||
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
||||
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
||||
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
||||
# * `initial_instructions`: Gets the initial instructions for the current project.
|
||||
# Should only be used in settings where the system prompt cannot be set,
|
||||
# e.g. in clients you have no control over, like Claude Desktop.
|
||||
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
||||
# * `insert_at_line`: Inserts content at a given line in a file.
|
||||
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
||||
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
||||
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
||||
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
||||
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
||||
# * `read_file`: Reads a file within the project directory.
|
||||
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
||||
# * `remove_project`: Removes a project from the Serena configuration.
|
||||
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
||||
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
||||
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
||||
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
||||
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
||||
# * `switch_modes`: Activates modes by providing a list of their names
|
||||
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
||||
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
||||
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
||||
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
||||
excluded_tools: []
|
||||
|
||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
||||
# (contrary to the memories, which are loaded on demand).
|
||||
initial_prompt: ''
|
||||
|
||||
project_name: '.dotfiles'
|
||||
Reference in New Issue
Block a user