Skip to content

Commit

Permalink
Add metadata and fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Sep 27, 2024
1 parent ff0590d commit 33469a6
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 20 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
profile: minimal
rust-version: nightly
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
ls -la
ls -la ..
pip install --upgrade pip
pip install pre-commit
- name: Cache dependencies
Expand All @@ -49,13 +50,13 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
profile: minimal
rust-version: nightly
- name: Build
run: cargo build --release --workspace --all-features
run: cargo build --release

unit-tests:
name: Unit tests
Expand All @@ -68,11 +69,11 @@ jobs:
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
profile: minimal
rust-version: nightly
- name: Cache dependencies
uses: actions/cache@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ignorePatterns": [
{
"pattern": "^https://crates\\.io"
"pattern": "^(#|(https://crates\\.io))"
}
]
}
11 changes: 10 additions & 1 deletion Cargo.lock

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

20 changes: 15 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ version = "0.1.0"
edition = "2021"
description = "An opinionated hledger's journal files formatter."
repository = "https://github.com/mondeja/hledger-fmt"
keywords = [
"hledger",
"journal",
"formatter",
"accounting",
authors = ["Álvaro Mondéjar Rubio"]
license = "MIT"
keywords = ["hledger", "journal", "formatter", "accounting"]
categories = ["command-line-utilities", "finance", "value-formatting"]
exclude = [
".editorconfig",
".github",
"fuzz",
".pre-commit-config.yaml",
".pre-commit-hooks.yaml",
".markdown-link-check.json",
".gitignore"
]

[lib]
Expand All @@ -26,3 +33,6 @@ colored = { version = "2", optional = true }
[features]
default = ["color"]
color = ["dep:colored"]

[workspace]
members = ["."]
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# hledger-fmt

[![Crates.io](https://img.shields.io/crates/v/hledger-fmt?logo=rust)](https://crates.io/crates/hledger-fmt)
[![License](https://img.shields.io/crates/l/hledger-fmt)](https://github.com/mondeja/hledger-fmt/blob/master/LICENSE)
[![Tests](https://img.shields.io/github/actions/workflow/status/mondeja/hledger-fmt/ci.yml?label=tests&logo=github)](https://github.com/mondeja/hledger-fmt/actions)
[![License](https://img.shields.io/crates/l/hledger-fmt)][license-badge-link]
[![Tests](https://img.shields.io/github/actions/workflow/status/mondeja/hledger-fmt/ci.yml?label=tests&logo=github)][tests-badge-link]
[![Crates.io downloads](https://img.shields.io/crates/d/hledger-fmt)](https://crates.io/crates/hledger-fmt)

<!-- markdown-link-check-disable -->

[license-badge-link]: https://github.com/mondeja/hledger-fmt/blob/master/LICENSE
[tests-badge-link]: https://github.com/mondeja/hledger-fmt/actions

<!-- markdown-link-check-enable -->

An opinionated [hledger]'s journal files formatter.

## Installation
Expand All @@ -30,20 +37,20 @@ the extensions `.journal`, `.hledger` and `.j` in the current directory
and its subdirectories.

```bash
hledger-fmt [files...]
hledger-fmt [OPTIONS] [FILES]...
```

To fix them, use the `--fix` option:
To fix them in place, use the `--fix` option:

```bash
hledger-fmt --fix [files...]
hledger-fmt --fix [FILES]...
```

See `hledger-fmt --help` for more information.

## Features

- **color** (enabled by default): Build with terminal color support.
- **`color`** (enabled by default): Build with terminal color support.

## Roadmap

Expand Down

0 comments on commit 33469a6

Please sign in to comment.