Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .editorconfig

This file was deleted.

129 changes: 87 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,102 @@
name: build

permissions:
contents: read

on: [push, pull_request]

env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CLICOLOR: 1

jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: none
name: CI
needs: [test, lockfile, rustfmt, clippy]
runs-on: ubuntu-latest
if: "always()"
steps:
- name: Failed
run: exit 1
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: [stable]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
rust: ["stable"]
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
steps:
- name: Install latest nightly
uses: actions-rs/toolchain@v1
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
continue-on-error: ${{ matrix.toolchain != 'stable' }}
- name: Run tests
run: cargo test --verbose
continue-on-error: ${{ matrix.toolchain != 'stable' }}

clippy:
name: clippy (ubuntu-latest, stable)
run: cargo test --no-run
- name: Test
run: cargo test
lockfile:
runs-on: ubuntu-latest
steps:
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- name: Checkout sources
uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- name: Cargo Clippy
run: cargo clippy -- -D warnings -A deprecated

fmt:
name: fmt (ubuntu-latest, stable)
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: "Is lockfile updated?"
run: cargo update --workspace --locked
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
permissions:
security-events: write # to upload sarif results
steps:
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Checkout sources
uses: actions/checkout@v2
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
run: cargo install clippy-sarif --locked
- name: Install SARIF tools
run: cargo install sarif-fmt --locked
- name: Check
run: >
cargo clippy --workspace --all-features --all-targets --message-format=json
| clippy-sarif
| tee clippy-results.sarif
| sarif-fmt
continue-on-error: true
- name: Upload
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: clippy-results.sarif
wait-for-processing: true
- name: Report status
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
2 changes: 1 addition & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${{ env.RELEASE_VERSION }}"
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Generate Release Notes
Expand Down
21 changes: 0 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
# Project specific stuff
target
# rustfmt
*.bk

# Editor Stuff
*.sublime-project
*.sublime-workspace
.*.swp
*.bak
*~
.vscode

# System stuff
.DS_Store
.Spotlight-V100
.Trashes
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
.directory
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Thanks for your interest - we gratefully welcome contributions.

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

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.

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

`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.
`cargo-edit` uses `rustfmt` for formatting and `clippy` for linting.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Without Boats, Pascal Hertleif
Copyright (c) Individual contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 0 additions & 7 deletions bors.toml

This file was deleted.

1 change: 0 additions & 1 deletion rustfmt.toml

This file was deleted.