Merge pull request #1138 from williamdes/trailing-whitespaces

Fix trailing whitespaces and indentation settings
This commit is contained in:
Tom Parker-Shemilt 2021-08-08 22:19:22 +01:00 committed by GitHub
commit 5ac4a3ac5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 154 additions and 134 deletions

View file

@ -4,5 +4,19 @@ root = true
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
trim_trailing_whitespace = true
insert_final_newline = true
[Cargo.lock]
# Just ignore that
indent_size = unset
[LICENSE.txt]
# Ignore that too
indent_size = unset
[README.md]
indent_size = 2
[.github/workflows/*.yml]
indent_size = 2

View file

@ -1,7 +1,7 @@
name: Automatic Approve
on:
schedule:
- cron: "0 0 * * *"
- cron: 0 0 * * *
workflow_dispatch:
jobs:
automatic-approve:
@ -12,5 +12,5 @@ jobs:
uses: mheap/automatic-approve-action@v1.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflows: "rust.yml"
dangerous_files: "src/main.rs,Cargo.toml,Cargo.lock"
workflows: rust.yml
dangerous_files: src/main.rs,Cargo.toml,Cargo.lock

View file

@ -9,8 +9,9 @@ on:
- master
jobs:
lint:
lint-md:
runs-on: ubuntu-latest
name: Lint Markdown content
steps:
- name: Checkout the repository
uses: actions/checkout@v2
@ -19,3 +20,11 @@ jobs:
with:
config: ./.markdownlint.json
args: ./README.md
lint-editorconfig:
runs-on: ubuntu-latest
name: Lint for editorconfig violations
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Check for editorconfig violations
uses: editorconfig-checker/action-editorconfig-checker@v1

View file

@ -1,43 +1,41 @@
name: Rust
on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master
schedule:
- cron: '0 0 * * *'
- cron: 0 0 * * *
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Get random cache id
run: echo "CACHE_ID=$((RANDOM))" >> $GITHUB_ENV
shell: bash
- uses: pat-s/always-upload-cache@v2.1.5
with:
path: results/results.yaml
key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ env.CACHE_ID }}
restore-keys: |
results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-
results-${{ hashFiles('Cargo.lock') }}-
results-
- name: Build
run: cargo build
- name: Run
run: cargo run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_LOG: warn
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Get random cache id
run: echo "CACHE_ID=$((RANDOM))" >> $GITHUB_ENV
shell: bash
- uses: pat-s/always-upload-cache@v2.1.5
with:
path: results/results.yaml
key: results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-${{ env.CACHE_ID }}
restore-keys: |
results-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('README.md') }}-
results-${{ hashFiles('Cargo.lock') }}-
results-
- name: Build
run: cargo build
- name: Run
run: cargo run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_LOG: warn

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.idea/
.vscode/
target/

View file

@ -6,6 +6,5 @@
"line_length": 1000
},
"MD024": false,
"MD032": false,
"MD009": false
"MD032": false
}

View file

@ -14,11 +14,10 @@ If you want to add an entry to the `README.md` please consider this:
- if you want to add something, please use the template `[ACCOUNT/REPO](https://github.com/ACCOUNT/REPO) [[CRATE](https://crates.io/crates/CRATE)] — DESCRIPTION`
* if you've not published your crate to `crates.io` remove the `[[CRATE](...)]` part.
* if you have a CI build, please add the build badge. Put the image after the description, separated by a space. Please make sure to add the branch information to the image:
* example for Travis: ` [<img src="https://api.travis-ci.org/XXX/CRATE.svg?branch=master">](https://travis-ci.org/XXX/CRATE)`
* for Github actions please see https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge
* example for Travis: `[<img src="https://api.travis-ci.org/XXX/CRATE.svg?branch=master">](https://travis-ci.org/XXX/CRATE)`
* for Github actions please see [adding-a-workflow-status-badge](https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge)
- please pay attention to the alphabetical ordering.
## Removing projects
We don't remove projects unless they are outright broken or pronounced deprecated by another project or by its author.