apache / apache/lucene

"ant precommit -Dtop=N" support [LUCENE-7784]

Open
#8,835 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

It would be great to have support for something like `ant precommit -Dtop=3` which would look at the files changed by the last 3 (local) commits and then based on that information intelligently skip some of the precommit checks.

Examples:
- If the code changes are all in `lucene/analysis` then `lucene/core` need not be checked for forbidden API use.
- If the code changes are all in `solr` then the documentation checks need not be run for `lucene` code - is that correct?
- If the code changes consist of just code removals then forbidden API checks are not required but documentation lint checks would be needed.

The objective would be to intelligently reduce the time taken for precommit checks without impact on the quality of the checks done.

---
Migrated from [LUCENE-7784](https://issues.apache.org/jira/browse/LUCENE-7784) by Christine Poerschke (@cpoerschke)

Contributor guide

Open the contributing guide

Research direction

Start by locating the Ant precommit target and how it currently selects forbidden API and documentation checks. Examine how changed files from local commits could be mapped to lucene/analysis, lucene/core, and solr, including the code-removal case. Done means -Dtop=N is supported and reduces checks without omitting checks required for the changed areas.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.