Set up workspace, add formatting CI.

This commit is contained in:
2026-02-21 19:16:50 -05:00
parent 177a4bc432
commit dc680554dd
4 changed files with 28 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
name: Build
name: Check
on:
push:
@@ -61,7 +61,25 @@ jobs:
- name: Lint libclide
run: |
cargo clippy --manifest-path libclide/Cargo.toml -- -D warnings
cargo clippy -p libclide -- -D warnings
- name: Lint clide
run: |
cargo clippy -- -D warnings
Format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Qt
uses: ./.github/actions/setup-qt
with:
qt-version: ${{ env.QT_VERSION }}
- name: Format libclide
run: |
cargo fmt -p libclide --verbose -- --check
- name: Format clide
run: |
cargo fmt --verbose -- --check

View File

@@ -23,3 +23,9 @@ libclide = { path = "./libclide" }
[build-dependencies]
# The link_qt_object_files feature is required for statically linking Qt 6.
cxx-qt-build = { version = "0.8.0", features = ["link_qt_object_files"] }
[workspace]
members = [
".",
"libclide",
]

View File

@@ -2,8 +2,8 @@
//
// SPDX-License-Identifier: GNU General Public License v3.0 or later
use std::path::{Path, PathBuf};
use anyhow::{Context, Result};
use std::path::{Path, PathBuf};
#[derive(Debug)]
pub struct EntryMeta {

View File

@@ -116,7 +116,7 @@ impl Component for Editor {
if let Some(key_event) = event.as_key_event() {
// Handle events here that should not be passed on to the vim emulation handler.
if let Action::Handled = self.handle_key_events(key_event)? {
return Ok(Action::Handled)
return Ok(Action::Handled);
}
}
self.event_handler.on_event(event, &mut self.state);