Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
acovaci committed Jun 4, 2024
1 parent 365db35 commit 6b4511b
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 136 deletions.
14 changes: 2 additions & 12 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
---
# These are supported funding model platforms

github:
github:
- acovaci
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
12 changes: 4 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

---
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: cargo
directory: /
schedule:
interval: "weekly"
interval: weekly
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
minimum_pre_commit_version: 3.7.0
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
types: [yaml]
- id: check-toml
types: [toml]
- id: check-executables-have-shebangs
types_or: [shell, text]
- id: check-shebang-scripts-are-executable
types_or: [shell, text]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
types: [rust]
- id: cargo-check
types: [rust]
- id: clippy
types: [rust]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--format, parsable, --strict]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
args: [--wrap=100, --number]
types: [markdown]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rules:
indentation:
spaces: consistent
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ home = "0.5.9"
log = "0.4.21"
log4rs = "1.3.0"
minijinja = "2.0.1"
multiline-str = "0.1.1"
openai_dive = "0.4.8"
reqwest = { version = "0.12.4", features = ["json"] }
serde = { version = "1.0.203", features = ["derive"] }
text-block-macros = "0.1.1"
thiserror = "1.0.61"
tokio = { version = "1.38.0", features = ["rt", "rt-multi-thread", "macros", "io-std"] }

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ I would especially welcome contributions in the following areas:

This project is licensed under the GNU Affero General Public License v3.0. You can find the full
license text in the [LICENSE](LICENSE) file.

8 changes: 1 addition & 7 deletions src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@ pub fn get_config_text() -> Res<BufWriter<Vec<u8>>> {

for (alias, command) in ALIASES.iter() {
buf.write_all(
format!(
"alias '{}'='{} {}'",
alias,
crate_dir.display().to_string(),
command
)
.as_bytes(),
format!("alias '{}'='{} {}'", alias, crate_dir.display(), command).as_bytes(),
)?;
buf.write_all(&[b'\n'])?;
}
Expand Down
2 changes: 1 addition & 1 deletion src/command/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ impl ChatContext {
content: response.clone(),
});
log::debug!("Chat history: {:?}", self.history);
return Ok(response);
Ok(response)
}
}
Loading

0 comments on commit 6b4511b

Please sign in to comment.