Skip to content

Commit 6d13332

Browse files
chore(test): ignore commented lines in riot requirements (#6033)
Add an option in the diff script to ignore commented lines that can be different due to different versions of pip-tools ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
1 parent 4bf927f commit 6d13332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/check-diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
directory=${1:-"."}
44
message=${2:-"Files were changed or added."}
5-
changed_files="$(git diff -- ${directory})"
5+
changed_files="$(git diff -I '^#' -- ${directory})"
66
new_files="$(git ls-files -o --exclude-standard -- ${directory})"
77

8-
if [[ "$(git diff --exit-code -- ${directory})" || -n $new_files ]]
8+
if [[ "$(git diff -I '^#' --exit-code -- ${directory})" || -n $new_files ]]
99
then
1010
echo "${changed_files}"
1111
echo "${new_files}"

0 commit comments

Comments
 (0)