Skip to content

Commit 47a51a3

Browse files
authored
Merge pull request #922 from epage/update
chore: Repo updates
2 parents 334f83f + 7b271f6 commit 47a51a3

File tree

8 files changed

+91
-100
lines changed

8 files changed

+91
-100
lines changed

.editorconfig

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 87 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,102 @@
11
name: build
22

3+
permissions:
4+
contents: read
5+
36
on: [push, pull_request]
47

8+
env:
9+
RUST_BACKTRACE: 1
10+
CARGO_TERM_COLOR: always
11+
CLICOLOR: 1
12+
513
jobs:
614
build:
7-
runs-on: ${{ matrix.os }}
15+
permissions:
16+
contents: none
17+
name: CI
18+
needs: [test, lockfile, rustfmt, clippy]
19+
runs-on: ubuntu-latest
20+
if: "always()"
21+
steps:
22+
- name: Failed
23+
run: exit 1
24+
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
25+
test:
26+
name: Test
827
strategy:
9-
fail-fast: false
1028
matrix:
11-
os: [ubuntu-latest, windows-latest, macos-latest]
12-
toolchain: [stable]
29+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
30+
rust: ["stable"]
31+
continue-on-error: ${{ matrix.rust != 'stable' }}
32+
runs-on: ${{ matrix.os }}
1333
steps:
14-
- name: Install latest nightly
15-
uses: actions-rs/toolchain@v1
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
- name: Install Rust
37+
uses: dtolnay/rust-toolchain@stable
1638
with:
17-
toolchain: ${{ matrix.toolchain }}
18-
override: true
19-
- uses: actions/checkout@v2
20-
- uses: Swatinem/rust-cache@v1
39+
toolchain: ${{ matrix.rust }}
40+
- uses: Swatinem/rust-cache@v2
2141
- name: Build
22-
run: cargo build --verbose
23-
continue-on-error: ${{ matrix.toolchain != 'stable' }}
24-
- name: Run tests
25-
run: cargo test --verbose
26-
continue-on-error: ${{ matrix.toolchain != 'stable' }}
27-
28-
clippy:
29-
name: clippy (ubuntu-latest, stable)
42+
run: cargo test --no-run
43+
- name: Test
44+
run: cargo test
45+
lockfile:
3046
runs-on: ubuntu-latest
3147
steps:
32-
- name: Install latest stable
33-
uses: actions-rs/toolchain@v1
34-
with:
35-
toolchain: stable
36-
override: true
37-
components: clippy
38-
- name: Checkout sources
39-
uses: actions/checkout@v2
40-
- uses: Swatinem/rust-cache@v1
41-
- name: Cargo Clippy
42-
run: cargo clippy -- -D warnings -A deprecated
43-
44-
fmt:
45-
name: fmt (ubuntu-latest, stable)
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
- name: Install Rust
51+
uses: dtolnay/rust-toolchain@stable
52+
with:
53+
toolchain: stable
54+
- uses: Swatinem/rust-cache@v2
55+
- name: "Is lockfile updated?"
56+
run: cargo update --workspace --locked
57+
rustfmt:
58+
name: rustfmt
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
- name: Install Rust
64+
uses: dtolnay/rust-toolchain@stable
65+
with:
66+
toolchain: stable
67+
components: rustfmt
68+
- uses: Swatinem/rust-cache@v2
69+
- name: Check formatting
70+
run: cargo fmt --all -- --check
71+
clippy:
72+
name: clippy
4673
runs-on: ubuntu-latest
74+
permissions:
75+
security-events: write # to upload sarif results
4776
steps:
48-
- name: Install latest stable
49-
uses: actions-rs/toolchain@v1
50-
with:
51-
toolchain: stable
52-
override: true
53-
components: rustfmt
54-
- name: Checkout sources
55-
uses: actions/checkout@v2
56-
- name: Check Formatting
57-
run: cargo fmt --all -- --check
77+
- name: Checkout repository
78+
uses: actions/checkout@v4
79+
- name: Install Rust
80+
uses: dtolnay/rust-toolchain@stable
81+
with:
82+
toolchain: stable
83+
components: clippy
84+
- uses: Swatinem/rust-cache@v2
85+
- name: Install SARIF tools
86+
run: cargo install clippy-sarif --locked
87+
- name: Install SARIF tools
88+
run: cargo install sarif-fmt --locked
89+
- name: Check
90+
run: >
91+
cargo clippy --workspace --all-features --all-targets --message-format=json
92+
| clippy-sarif
93+
| tee clippy-results.sarif
94+
| sarif-fmt
95+
continue-on-error: true
96+
- name: Upload
97+
uses: github/codeql-action/upload-sarif@v3
98+
with:
99+
sarif_file: clippy-results.sarif
100+
wait-for-processing: true
101+
- name: Report status
102+
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated

.github/workflows/post-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
2525
echo "version is: ${{ env.RELEASE_VERSION }}"
2626
- name: Checkout repository
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 1
3030
- name: Generate Release Notes

.gitignore

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
1-
# Project specific stuff
21
target
3-
# rustfmt
4-
*.bk
5-
6-
# Editor Stuff
7-
*.sublime-project
8-
*.sublime-workspace
9-
.*.swp
10-
*.bak
11-
*~
12-
.vscode
13-
14-
# System stuff
15-
.DS_Store
16-
.Spotlight-V100
17-
.Trashes
18-
Thumbs.db
19-
ehthumbs.db
20-
Desktop.ini
21-
$RECYCLE.BIN/
22-
.directory

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Thanks for your interest - we gratefully welcome contributions.
22

3-
Questions can be asked in [issues](https://github.com/killercup/cargo-edit/issues), or on [Gitter](https://gitter.im/cargo-edit/Lobby).
3+
Questions can be asked in [issues](https://github.com/killercup/cargo-edit/issues).
44

55
To help us help you get pull requests merged quickly and smoothly, open an issue before submitted large changes. Please keep the contents of pull requests and commits short. Commit messages should include the intent of the commit.
66

77
`cargo-edit` has a moderately comprehensive test suite. Contributions that add/improve tests are awesome. Please add tests for every change.
88

9-
`cargo-edit` uses [`rustfmt-nightly`](https://github.com/rust-lang-nursery/rustfmt) for formatting and [`clippy`](https://github.com/rust-lang-nursery/rust-clippy) for linting.
9+
`cargo-edit` uses `rustfmt` for formatting and `clippy` for linting.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Without Boats, Pascal Hertleif
3+
Copyright (c) Individual contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

bors.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

rustfmt.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)