Support for directory level config files
Feature request
For more complex projects, a directory level config file would solve cases where you need specific instructions for different parts of the code. The closer the config file is to the file that is being reviewed/handled, the higher its priority is for the actual review.
Challenges could be to 1) determine which config files are relevant for which file to be reviewed and 2) do per file config handling and review (as one PR could touch files in multiple different subdirectories with different config files).
Motivation
For very large projects (e.g. monorepos) you need some module specific configs to handle different standards.
:bulb: Auto-generated documentation-based answer:
Currently, PR-Agent/Qodo Merge doesn't directly support directory-level configuration files with hierarchical priority based on proximity to the reviewed file.
The current configuration system supports three levels of configuration:
- Wiki configuration - Stored in the repository's wiki
-
Local configuration - A
.pr_agent.tomlfile in the repository root -
Global configuration - A configuration file in a dedicated
pr-agent-settingsrepository at the organization level
In terms of precedence, wiki configurations override local configurations, and local configurations override global configurations.
For your use case with monorepos and module-specific configurations, you could:
- Use the existing configuration options to ignore certain files or folders using the
ignore.globorignore.regexsettings - Provide module-specific guidance through the
extra_instructionsparameter for specific tools - Create module-specific best practices in a
best_practices.mdfile
I recommend submitting this as a feature request to the PR-Agent GitHub repository, as hierarchical configuration files would indeed be valuable for large monorepo projects.
Relevant Sources:
- https://qodo-merge-docs.qodo.ai//usage-guide/configuration_options
- https://qodo-merge-docs.qodo.ai//usage-guide/additional_configurations#ignoring-files-from-analysis
Supporting configuration files in multiple possible locations is a significant challenge, as each location (given that you know where to look) is a separate API call, and it can add significant usage to the API rate limit.
In any case, these kinds of features are prioritized to Qodo Merge (the paid product) We plan to introduce more granularity for configuration files in Qodo Merge in the near future.