Skip to content

Commit dc68055

Browse files
committed
Set up workspace, add formatting CI.
1 parent 177a4bc commit dc68055

4 files changed

Lines changed: 28 additions & 4 deletions

File tree

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Check
22

33
on:
44
push:
@@ -61,7 +61,25 @@ jobs:
6161

6262
- name: Lint libclide
6363
run: |
64-
cargo clippy --manifest-path libclide/Cargo.toml -- -D warnings
64+
cargo clippy -p libclide -- -D warnings
6565
- name: Lint clide
6666
run: |
6767
cargo clippy -- -D warnings
68+
69+
Format:
70+
name: Format
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v6
74+
75+
- name: Setup Qt
76+
uses: ./.github/actions/setup-qt
77+
with:
78+
qt-version: ${{ env.QT_VERSION }}
79+
80+
- name: Format libclide
81+
run: |
82+
cargo fmt -p libclide --verbose -- --check
83+
- name: Format clide
84+
run: |
85+
cargo fmt --verbose -- --check

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ libclide = { path = "./libclide" }
2323
[build-dependencies]
2424
# The link_qt_object_files feature is required for statically linking Qt 6.
2525
cxx-qt-build = { version = "0.8.0", features = ["link_qt_object_files"] }
26+
27+
[workspace]
28+
members = [
29+
".",
30+
"libclide",
31+
]

libclide/src/fs/entry_meta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// SPDX-License-Identifier: GNU General Public License v3.0 or later
44

5-
use std::path::{Path, PathBuf};
65
use anyhow::{Context, Result};
6+
use std::path::{Path, PathBuf};
77

88
#[derive(Debug)]
99
pub struct EntryMeta {

src/tui/editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl Component for Editor {
116116
if let Some(key_event) = event.as_key_event() {
117117
// Handle events here that should not be passed on to the vim emulation handler.
118118
if let Action::Handled = self.handle_key_events(key_event)? {
119-
return Ok(Action::Handled)
119+
return Ok(Action::Handled);
120120
}
121121
}
122122
self.event_handler.on_event(event, &mut self.state);

0 commit comments

Comments
 (0)