Skip to content

Commit 3d1f800

Browse files
committed
wip
1 parent a1c1a9d commit 3d1f800

File tree

5 files changed

+615
-39
lines changed

5 files changed

+615
-39
lines changed

.github/actions/clippy-annotation-reporter/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ env_logger = "0.10"
1717

1818
# TODO: Remove this when move to separate repo
1919
[workspace]
20+
members = ["."]

.github/actions/clippy-annotation-reporter/action.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
description: 'Comma-separated list of clippy rules to track'
1212
required: false
1313
default: 'unwrap_used,expect_used,todo,unimplemented,panic,unreachable'
14+
base-branch:
15+
description: 'Base branch to compare against'
16+
required: false
17+
default: 'origin/main'
1418

1519
runs:
1620
using: 'composite'
@@ -19,11 +23,29 @@ runs:
1923
shell: bash
2024
run: rustup install stable && rustup default stable
2125

26+
- name: Fetch all branches
27+
shell: bash
28+
run: |
29+
git fetch --all
30+
echo "Available branches:"
31+
git branch -a
32+
2233
- name: Build annotation reporter
2334
shell: bash
2435
run: |
2536
cd ${{ github.action_path }}
2637
cargo build --release
38+
- name: Debug step
39+
shell: bash
40+
run: |
41+
FILE_PATH="data-pipeline/src/trace_exporter/mod.rs"
42+
43+
echo "Direct branch comparison for $FILE_PATH:"
44+
echo "==== BASE BRANCH ===="
45+
git show "origin/main:$FILE_PATH" | grep -c "#\[allow(clippy::unwrap_used"
46+
47+
echo "==== HEAD BRANCH ===="
48+
git show "HEAD:$FILE_PATH" | grep -c "#\[allow(clippy::unwrap_used"
2749
2850
- name: Run annotation reporter
2951
shell: bash
@@ -32,6 +54,7 @@ runs:
3254
--token "${{ inputs.github-token }}" \
3355
--rules "${{ inputs.allow-annotation-rules }}" \
3456
--repo "${{ github.repository }}" \
35-
--pr "${{ github.event.number }}"
57+
--pr "${{ github.event.number }}" \
58+
--base-branch "${{ inputs.base_branch }}"
3659
env:
3760
GITHUB_TOKEN: ${{ inputs.github-token }}

0 commit comments

Comments
 (0)