Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev"]

steps:
- uses: actions/checkout@v4
Expand Down
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<p align="center">
<img src="https://raw.githubusercontent.com/eirik-kjonstad/sable/v0.1.3/assets/sable-logo.svg" alt="Sable logo" width="420">
<br>
<a href="https://github.com/eirik-kjonstad/sable"><img src="assets/sable-badge.svg" alt="Code style: Sable"></a>
<a href="https://pypi.org/project/sable-fortran/"><img src="https://img.shields.io/pypi/v/sable-fortran.svg" alt="PyPI version"></a>
<a href="https://github.com/eirik-kjonstad/sable/actions/workflows/ci.yml"><img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14%20%7C%203.15--dev-3776ab.svg" alt="Python 3.10 through 3.15-dev"></a>
<a href="https://github.com/eirik-kjonstad/sable/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/sable-fortran.svg" alt="License: MIT"></a>
</p>

An uncompromising Fortran formatter, inspired by [Black](https://github.com/psf/black).
Expand Down Expand Up @@ -120,6 +125,28 @@ File-wide:

## Configuration

Formatter options are CLI flags:

```bash
sable format --line-length 88 src/
```

| Option | Default | Values | Applies to |
| --- | ---: | --- | --- |
| `--line-length` | `100` | integer | `format`, `check` |
| `--indent-width` | `3` | integer | `format`, `check` |
| `--keyword-case` | `lower` | `lower`, `upper` | `format`, `check` |
| `--end-keyword-form` | `spaced` | `spaced`, `compact` | `format`, `check` |
| `--no-normalize-operators` | off | flag | `format`, `check` |
| `rule_set` / `--rule-set` | `all` | `style`, `lint`, `all` | `check` |
| `select` / `--select` | `[]` | rule codes | `check` |
| `ignore` / `--ignore` | `[]` | rule codes | `check` |
| `output_format` / `--output-format` | `text` | `text`, `json`, `sarif`, `gitlab-codequality` | `check` |
| `baseline` / `--baseline` | unset | path | `check` |
| `fix` / `--fix` | `false` | boolean | `check` |
| `unsafe_fixes` / `--unsafe-fixes` | `false` | boolean | `check` |
| `generate_baseline` / `--generate-baseline` | `false` | boolean | `check` |

Example `pyproject.toml`:

```toml
Expand All @@ -134,7 +161,13 @@ unsafe_fixes = false
generate_baseline = false
```

CLI flags override `pyproject.toml` defaults.
For `check`, CLI flags override `pyproject.toml` defaults.

## Badge

```markdown
[![Code style: Sable](https://raw.githubusercontent.com/eirik-kjonstad/sable/main/assets/sable-badge.svg)](https://github.com/eirik-kjonstad/sable)
```

## License

Expand Down
24 changes: 24 additions & 0 deletions assets/sable-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "sable-fortran"
version = "0.3.8"
version = "0.3.9"
description = "An uncompromising Fortran formatter, inspired by Black"
readme = "README.md"
requires-python = ">=3.10"
Expand All @@ -19,6 +19,9 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Quality Assurance",
]
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion src/sable/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Sable: an uncompromising Fortran formatter."""

__version__ = "0.3.8"
__version__ = "0.3.9"
Loading