Skip to content

Commit b6ab3a7

Browse files
committed
CI test
1 parent 33a6590 commit b6ab3a7

File tree

6 files changed

+33
-8
lines changed

6 files changed

+33
-8
lines changed

.github/workflows/clippy_dev.yml

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
# Setup
1818
- name: Checkout
1919
uses: actions/checkout@v4
20+
with:
21+
# Unsetting this would make so that any malicious package could get our Github Token
22+
persist-credentials: false
2023

2124
# Run
2225
- name: Build

.github/workflows/clippy_mq.yml

+10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
uses: actions/checkout@v4
2424
with:
2525
ref: ${{ github.ref }}
26+
# Unsetting this would make so that any malicious package could get our Github Token
27+
persist-credentials: false
2628

2729
# Run
2830
- name: Check Changelog
@@ -63,6 +65,8 @@ jobs:
6365
# Setup
6466
- name: Checkout
6567
uses: actions/checkout@v4
68+
with:
69+
persist-credentials: false
6670

6771
- name: Install i686 dependencies
6872
if: matrix.host == 'i686-unknown-linux-gnu'
@@ -121,6 +125,8 @@ jobs:
121125
# Setup
122126
- name: Checkout
123127
uses: actions/checkout@v4
128+
with:
129+
persist-credentials: false
124130

125131
- name: Install toolchain
126132
run: rustup show active-toolchain
@@ -136,6 +142,8 @@ jobs:
136142
# Setup
137143
- name: Checkout
138144
uses: actions/checkout@v4
145+
with:
146+
persist-credentials: false
139147

140148
- name: Install toolchain
141149
run: rustup show active-toolchain
@@ -188,6 +196,8 @@ jobs:
188196
# Setup
189197
- name: Checkout
190198
uses: actions/checkout@v4
199+
with:
200+
persist-credentials: false
191201

192202
- name: Install toolchain
193203
run: rustup show active-toolchain

.github/workflows/clippy_pr.yml

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
# Setup
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
with:
29+
# Unsetting this would make so that any malicious package could get our Github Token
30+
persist-credentials: false
2831

2932
- name: Install toolchain
3033
run: rustup show active-toolchain

.github/workflows/deploy.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@ env:
1616
jobs:
1717
deploy:
1818
runs-on: ubuntu-latest
19-
if: github.repository == 'rust-lang/rust-clippy'
19+
if: github.repository == 'blyxyas/rust-clippy'
2020

2121
steps:
2222
# Setup
2323
- name: Checkout
2424
uses: actions/checkout@v4
25+
with:
26+
# Unsetting this would make so that any malicious package could get our Github Token
27+
persist-credentials: false
2528

2629
- name: Checkout
2730
uses: actions/checkout@v4
2831
with:
2932
ref: ${{ env.TARGET_BRANCH }}
3033
path: 'out'
34+
# Unsetting this would make so that any malicious package could get our Github Token
35+
persist-credentials: false
3136

3237
# Run
3338
- name: Set tag name
@@ -58,9 +63,3 @@ jobs:
5863

5964
- name: cargo collect-metadata
6065
run: cargo collect-metadata
61-
62-
- name: Deploy
63-
run: |
64-
eval "$(ssh-agent -s)"
65-
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
66-
bash .github/deploy.sh

.github/workflows/lintcheck.yml

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 2
24+
# Unsetting this would make so that any malicious package could get our Github Token
25+
persist-credentials: false
2426

2527
# HEAD is the generated merge commit `refs/pull/N/merge` between the PR and `master`, `HEAD^`
2628
# being the commit from `master` that is the base of the merge
@@ -73,6 +75,9 @@ jobs:
7375
steps:
7476
- name: Checkout
7577
uses: actions/checkout@v4
78+
with:
79+
# Unsetting this would make so that any malicious package could get our Github Token
80+
persist-credentials: false
7681

7782
- name: Cache lintcheck bin
7883
id: cache-lintcheck-bin
@@ -103,6 +108,9 @@ jobs:
103108
steps:
104109
- name: Checkout
105110
uses: actions/checkout@v4
111+
with:
112+
# Unsetting this would make so that any malicious package could get our Github Token
113+
persist-credentials: false
106114

107115
- name: Restore lintcheck bin
108116
uses: actions/cache/restore@v4

clippy_utils/src/check_proc_macro.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_span::{Span, Symbol};
2929
use rustc_target::spec::abi::Abi;
3030

3131
/// The search pattern to look for. Used by `span_matches_pat`
32-
#[derive(Clone)]
32+
#[derive(Clone, Debug)]
3333
pub enum Pat {
3434
/// A single string.
3535
Str(&'static str),
@@ -122,6 +122,7 @@ fn qpath_search_pat(path: &QPath<'_>) -> (Pat, Pat) {
122122
}
123123

124124
fn path_search_pat(path: &Path<'_>) -> (Pat, Pat) {
125+
dbg!(&path);
125126
let (head, tail) = match path.segments {
126127
[] => return (Pat::Str(""), Pat::Str("")),
127128
[p] => (Pat::Sym(p.ident.name), p),
@@ -459,6 +460,7 @@ impl<'cx> WithSearchPat<'cx> for (&FnKind<'cx>, &Body<'cx>, HirId, Span) {
459460
/// it is significantly slower than both of those.
460461
pub fn is_from_proc_macro<'cx, T: WithSearchPat<'cx>>(cx: &T::Context, item: &T) -> bool {
461462
let (start_pat, end_pat) = item.search_pat(cx);
463+
dbg!(&start_pat, &end_pat);
462464
!span_matches_pat(cx.sess(), item.span(), start_pat, end_pat)
463465
}
464466

0 commit comments

Comments
 (0)