whitesmith / whitesmith/rubycritic
Error during analysis - Unknown revision or path not in the working tree
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.5k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
I have setup rubycritic for my project with base branch in rubycritic.yml for comparison. On CI for the feature branches, I have setup rubycritic analysis to be run for all the modified files only(instead of running on all files in app or lib folders), which runs the analysis for the identified files on main branch, the feature branch and produces the report with comparison (main vs feature branch). However, if there was a new file added as part of feature branch, the analysis produces an error while running on main branch as:
running churn
fatal: ambiguous argument 'app/models/<file>.rb': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I understand that the new file is not part of main branch and hence this error. The analysis continues to run on feature branch and also produces a report.
Is there a way to skip running compare/analysis on main for the new files?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the base-branch setting in rubycritic.yml and the CI path that analyzes modified files, then reproduce the comparison with a feature branch containing a new file. Done means analysis no longer fails when that file is absent from main, while comparison still runs for files present on both branches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100