Skip to content

✨ feat: Remove --project-root, auto-detect from config file location#14

Merged
heumsi merged 5 commits intomainfrom
feat/remove-project-root
Mar 30, 2026
Merged

✨ feat: Remove --project-root, auto-detect from config file location#14
heumsi merged 5 commits intomainfrom
feat/remove-project-root

Conversation

@heumsi
Copy link
Copy Markdown
Owner

@heumsi heumsi commented Mar 30, 2026

Summary

  • Remove --project-root CLI argument
  • Auto-discover config file by searching upward from cwd (.python-dependency-linter.yaml, pyproject.toml)
  • Use config file's parent directory as project root (like ruff/pytest)
  • Add find_config() to config.py with upward directory traversal
  • Extract shared TOML loading helper to reduce duplication

Test plan

  • 54 tests pass (uv run pytest -v)
  • ruff lint and format clean
  • Auto-discovery: YAML in cwd, YAML in parent, pyproject.toml, YAML preferred over TOML
  • --config explicit path uses config file's parent as root
  • Config not found returns exit code 2 with descriptive error

🤖 Generated with Claude Code

heumsi and others added 5 commits March 30, 2026 18:13
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ct root

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move find_config import to top-level
- Remove unreachable FileNotFoundError handler
- Add .resolve() for consistency in auto-discovery path
- Add test for explicit --config with nonexistent file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@heumsi heumsi changed the title ♻️ refactor: Remove --project-root, auto-detect from config file location ✨ feat: Remove --project-root, auto-detect from config file location Mar 30, 2026
@heumsi heumsi merged commit 500276d into main Mar 30, 2026
5 checks passed
@heumsi heumsi deleted the feat/remove-project-root branch March 30, 2026 09:25
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.

1 participant