Skip to content

Conversation

@sttlr
Copy link
Contributor

@sttlr sttlr commented Dec 26, 2025

This PR adds the ability to set review_code_include_paths and review_code_exclude_paths in config file.

Options are used when review_code is invoked.

It allows to run focused reviews and do it much faster:

  • metis woudn't waste time on reviewing definition files (dtos, types...) or tests
  • metis woudn't report "issues" with definition files (dtos, types...) or tests - which probably in 100% of the cases I don't care about

Why not use metisignore

I treat metisignore file as a global ignore file - essentially .gitignore clone. It lists files that model should never see or interact with (e.g. .venv, node_modules...)

But it lacks the ability to set files and folders that I'd like to include or exclude from code review process:

  • changing --codebase-path is not an option because it changes the base directory and messes with metisignore file (it will not be loaded)
  • defining paths to exclude in metisignore file is a bad design choice because I only want to exclude paths from review_code (to not run review_file on them) but not completely. Because those files might be useful in Relevant Context (gathered via embeddings or tools).

Example Usage

metis_engine:
  review_code_include_paths:
    - 'backend/'
  review_code_exclude_paths:
    - 'dto/'
    - '*.d.ts'
    - '*.spec.ts'
    - '*.fixture.ts'
    - '*.dto.ts'
    - '*.const.ts'
    - '*.interface.ts'
    - '*.model.ts'
    - '*.type.ts'
    - '*.request.ts'
    - '*.response.ts'
    - '*.response.api.ts'
    - '*.params.ts'
    - '*.schema.ts'
    - '*.mapper.ts'
    - '*.store.ts'
    - 'e2e_ssr/'
    - 'e2e/'
    - '*.e2e-spec.ts'
    - 'backend/test'
    - 'schema.ts'

It configures to run review_code only in the backend/ folder and defines files and folders to exclude from individual review.

Excluded files are not important and shoudn't be reviewed individually - BUT they could and should be used for Relevant Context. That's why the need for these options.

Testing

Passes pre-commit and tests.

Run review_code on actual project to test that it works accordingly.

@mpekatsoula
Copy link
Contributor

mpekatsoula commented Dec 30, 2025

Can you also document this and maybe add an example in the examples folder?
Other than that your code makes sense, nice addition thanks @sttlr

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.

2 participants