Skip to content

Commit

Permalink
Merge pull request #212 from PlasmaFAIR/version/0.6.0
Browse files Browse the repository at this point in the history
Version 0.6.0
  • Loading branch information
ZedThree authored Dec 10, 2024
2 parents f021e42 + 0db4645 commit 6044a2a
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 32 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ authors:
given-names: Peter
orcid: "https://orcid.org/0000-0003-3092-1858"
title: "fortitude"
version: 0.5.1
date-released: 2024-11-22
version: 0.6.0
date-released: 2024-12-09
url: "https://github.com/PlasmaFAIR/fortitude"
2 changes: 1 addition & 1 deletion Cargo.lock

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

12 changes: 9 additions & 3 deletions README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,18 @@ mkdocs serve

To make a new release, the following steps must be completed in order:

- Move rules out of preview mode/into deprecated mode (if applicable).
- Make sure the generated docs are up-to-date: `cargo dev generate-all`
- Make a new commit that updates the project version in `pyproject.toml`,
`Cargo.toml`, and `CITATION.cff`.
- Remember to run `cargo build` to update the `Cargo.lock` file too!

> [!IMPORTANT]
> Remember to run `cargo build` to update the `Cargo.lock` file too!

- Open a new PR to merge this change.
- After merging, make a new release on GitHub.
- This will automatically upload the new version to PyPI.
- On your machine, pull the main branch, and run `cargo publish`.
- This will upload the Rust crate to `crates.io`.

Pushing to `crates.io` is currently not possible as some of our dependencies point
to GitHub repositories. We'll be able to restart using `crates.io` if Ruff starts
publishing there.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![PyPI](https://img.shields.io/pypi/v/fortitude-lint.svg)](https://pypi.org/project/fortitude-lint)
[![License](https://img.shields.io/pypi/l/fortitude-lint.svg)](https://github.com/PlasmaFAIR/fortitude/blob/main/LICENSE)
![Tests](https://github.com/PlasmaFAIR/fortitude/actions/workflows/test.yml/badge.svg)
![Clippy](https://github.com/PlasmaFAIR/fortitude/actions/workflows/clippy.yml/badge.svg)
[![Docs](https://readthedocs.org/projects/fortitude/badge/?version=latest)](https://fortitude.readthedocs.io/en/latest/?badge=latest)

# Fortitude

Expand Down
12 changes: 6 additions & 6 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
| S041 | [old-style-array-literal](rules/old-style-array-literal.md) | Array literal uses old-style syntax: prefer `[...]` | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |
| S051 | [deprecated-relational-operator](rules/deprecated-relational-operator.md) | deprecated relational operator '{symbol}', prefer '{new_symbol}' instead | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |
| S061 | [unnamed-end-statement](rules/unnamed-end-statement.md) | end statement should be named. | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |
| S071 | [missing-double-colon](rules/missing-double-colon.md) | variable declaration missing '::' | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix available'>🛠️</span> |
| S071 | [missing-double-colon](rules/missing-double-colon.md) | variable declaration missing '::' | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |
| S101 | [trailing-whitespace](rules/trailing-whitespace.md) | trailing whitespace | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |
| S102 | [incorrect-space-before-comment](rules/incorrect-space-before-comment.md) | need at least 2 spaces before inline comment | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix available'>🛠️</span> |
| S102 | [incorrect-space-before-comment](rules/incorrect-space-before-comment.md) | need at least 2 spaces before inline comment | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix available'>🛠️</span> |

### Typing (T)

Expand All @@ -38,7 +38,7 @@
| T042 | [assumed-size-character-intent](rules/assumed-size-character-intent.md) | character '{name}' has assumed size but does not have `intent(in)` | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| T043 | [deprecated-assumed-size-character](rules/deprecated-assumed-size-character.md) | character '{name}' uses deprecated syntax for assumed size | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| T051 | [initialisation-in-declaration](rules/initialisation-in-declaration.md) | '{name}' is initialised in its declaration and has no explicit `save` or `parameter` attribute | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| T061 | [external-procedure](rules/external-procedure.md) | '{name}' declared as `external` | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| T061 | [external-procedure](rules/external-procedure.md) | '{name}' declared as `external` | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |

### Modules (M)

Expand Down Expand Up @@ -67,7 +67,7 @@

| Code | Name | Message | |
| ---- | ---- | ------- | ------: |
| OB001 | [statement-function](rules/statement-function.md) | statement functions are obsolescent, prefer internal functions | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| OB011 | [common-block](rules/common-block.md) | common blocks are obsolescent, prefer modules or derived types | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| OB021 | [entry-statement](rules/entry-statement.md) | entry statements are obsolescent, use module procedures with generic interface | <span title='Rule is in preview'>🧪</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| OB001 | [statement-function](rules/statement-function.md) | statement functions are obsolescent, prefer internal functions | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| OB011 | [common-block](rules/common-block.md) | common blocks are obsolescent, prefer modules or derived types | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |
| OB021 | [entry-statement](rules/entry-statement.md) | entry statements are obsolescent, use module procedures with generic interface | <span title='Rule is stable' style='opacity: 0.6'>✔️</span> <span title='Automatic fix not available' style='opacity: 0.1' aria-hidden='true'>🛠️</span> |

2 changes: 0 additions & 2 deletions docs/rules/common-block.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# common-block (OB011)
This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What it does
Checks for common blocks.

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/entry-statement.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# entry-statement (OB021)
This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What it does
Checks for `entry` statements.

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/external-procedure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# external-procedure (T061)
This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What does it do?
Checks for procedures declared with just `external`

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/incorrect-space-before-comment.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# incorrect-space-before-comment (S102)
Fix is always available.

This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What does it do?
Checks for inline comments that aren't preceeded by at least two spaces.

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/missing-double-colon.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# missing-double-colon (S071)
Fix is always available.

This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What does it do?
Checks for missing double-colon separator in variable declarations.

Expand Down
2 changes: 0 additions & 2 deletions docs/rules/statement-function.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# statement-function (OB001)
This rule is unstable and in [preview](../preview.md). The `--preview` flag is required for use.

## What it does
Checks for statement functions.

Expand Down
2 changes: 1 addition & 1 deletion fortitude/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fortitude"
version = "0.5.1"
version = "0.6.0"
description = "A Fortran linter, written in Rust and installable with Python"
authors = [
"Liam Pattinson <[email protected]>",
Expand Down
12 changes: 6 additions & 6 deletions fortitude/src/rules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ pub fn code_to_rule(category: Category, code: &str) -> Option<(RuleGroup, Rule)>
(Style, "041") => (RuleGroup::Stable, Ast, style::old_style_array_literal::OldStyleArrayLiteral),
(Style, "051") => (RuleGroup::Stable, Ast, style::relational_operators::DeprecatedRelationalOperator),
(Style, "061") => (RuleGroup::Stable, Ast, style::end_statements::UnnamedEndStatement),
(Style, "071") => (RuleGroup::Preview, Ast, style::double_colon_in_decl::MissingDoubleColon),
(Style, "071") => (RuleGroup::Stable, Ast, style::double_colon_in_decl::MissingDoubleColon),
(Style, "101") => (RuleGroup::Stable, Text, style::whitespace::TrailingWhitespace),
(Style, "102") => (RuleGroup::Preview, Ast, style::whitespace::IncorrectSpaceBeforeComment),
(Style, "102") => (RuleGroup::Stable, Ast, style::whitespace::IncorrectSpaceBeforeComment),

(Typing, "001") => (RuleGroup::Stable, Ast, typing::implicit_typing::ImplicitTyping),
(Typing, "002") => (RuleGroup::Stable, Ast, typing::implicit_typing::InterfaceImplicitTyping),
Expand All @@ -96,11 +96,11 @@ pub fn code_to_rule(category: Category, code: &str) -> Option<(RuleGroup, Rule)>
(Typing, "042") => (RuleGroup::Stable, Ast, typing::assumed_size::AssumedSizeCharacterIntent),
(Typing, "043") => (RuleGroup::Stable, Ast, typing::assumed_size::DeprecatedAssumedSizeCharacter),
(Typing, "051") => (RuleGroup::Stable, Ast, typing::init_decls::InitialisationInDeclaration),
(Typing, "061") => (RuleGroup::Preview, Ast, typing::external::ExternalProcedure),
(Typing, "061") => (RuleGroup::Stable, Ast, typing::external::ExternalProcedure),

(Obsolescent, "001") => (RuleGroup::Preview, Ast, obsolescent::statement_functions::StatementFunction),
(Obsolescent, "011") => (RuleGroup::Preview, Ast, obsolescent::common_blocks::CommonBlock),
(Obsolescent, "021") => (RuleGroup::Preview, Ast, obsolescent::entry_statement::EntryStatement),
(Obsolescent, "001") => (RuleGroup::Stable, Ast, obsolescent::statement_functions::StatementFunction),
(Obsolescent, "011") => (RuleGroup::Stable, Ast, obsolescent::common_blocks::CommonBlock),
(Obsolescent, "021") => (RuleGroup::Stable, Ast, obsolescent::entry_statement::EntryStatement),

(Precision, "001") => (RuleGroup::Stable, Ast, precision::kind_suffixes::NoRealSuffix),
(Precision, "011") => (RuleGroup::Stable, Ast, precision::double_precision::DoublePrecision),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "fortitude-lint"
version = "0.5.1"
version = "0.6.0"
description = "A Fortran linter, written in Rust and installable with Python"
readme = "README.md"
authors = [
Expand Down

0 comments on commit 6044a2a

Please sign in to comment.