improve github workflow and cleanup
This commit is contained in:
parent
7e5ce56bee
commit
251fcfd518
3 changed files with 17 additions and 14 deletions
24
.github/workflows/rust.yml
vendored
24
.github/workflows/rust.yml
vendored
|
@ -9,6 +9,10 @@ on:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
@ -40,18 +44,24 @@ jobs:
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
toolchain: nightly-2025-07-14
|
||||||
|
components: clippy, rustfmt
|
||||||
|
|
||||||
- name: Install format
|
- name: Cache Rust dependencies
|
||||||
run: rustup component add rustfmt
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check format with nightly rules
|
- name: Formating - check for long lines
|
||||||
run: cargo +nightly fmt -- --check --config error_on_unformatted=true,error_on_line_overflow=true,format_strings=true,group_imports=StdExternalCrate,imports_granularity=Crate
|
run: cargo fmt -- --check --config error_on_unformatted=true,error_on_line_overflow=true,format_strings=true
|
||||||
|
|
||||||
- name: install clippy
|
- name: Formatting - check import order
|
||||||
run: rustup component add clippy --toolchain nightly
|
run: cargo fmt -- --check --config group_imports=StdExternalCrate
|
||||||
|
|
||||||
|
- name: Formatting - check imports granularity
|
||||||
|
run: cargo fmt -- --check --config imports_granularity=Crate
|
||||||
|
|
||||||
- name: run clippy nightly
|
- name: run clippy nightly
|
||||||
run: cargo +nightly clippy --all-targets -- -D warnings
|
run: cargo clippy --all-targets -- -D warnings
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -132,12 +132,6 @@ fn keyboard_return(config: &WardenConfig) {
|
||||||
fn keyboard_auto_type(cmd: &str, id: &str, config: &WardenConfig) -> Result<(), String> {
|
fn keyboard_auto_type(cmd: &str, id: &str, config: &WardenConfig) -> Result<(), String> {
|
||||||
let mut input = cmd.replace('_', "");
|
let mut input = cmd.replace('_', "");
|
||||||
|
|
||||||
//.replace("$U", &user).replace("$P", &pw);
|
|
||||||
|
|
||||||
// if input.contains("$T") {
|
|
||||||
// input = input.replace("$T", &rbw_get_totp(id, false)?);
|
|
||||||
// }
|
|
||||||
|
|
||||||
while !input.is_empty() {
|
while !input.is_empty() {
|
||||||
// Remove up to and including the first '$'
|
// Remove up to and including the first '$'
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,6 @@ pub fn show(config: &Arc<RwLock<Config>>) -> Result<(), Error> {
|
||||||
config.read().unwrap().sort_order(),
|
config.read().unwrap().sort_order(),
|
||||||
)));
|
)));
|
||||||
|
|
||||||
// todo ues a arc instead of cloning the config
|
|
||||||
let selection_result = gui::show(
|
let selection_result = gui::show(
|
||||||
config,
|
config,
|
||||||
provider,
|
provider,
|
||||||
|
|
Loading…
Add table
Reference in a new issue