Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.7 KB

File metadata and controls

46 lines (35 loc) · 1.7 KB

Fortran Linting workflow (using Fortitude)

This reusable workflow serves as a a generic workflow to lint fortran code using the fortitude linter.

Usage

By default this workflow will check all the rules included in fortitude linter. However, should you wish to check only a certain set of rules in your local repository you can do this by implementing a fortitude.toml file in the top-level/root directory of your local repository, defining the rules which should be checked when running this reusable workflow from a caller workflow. The following toml file is an example of what your fortitude.toml file could look like:

Example fortitude configuration

[check]
select = ["S", "T"]
ignore = ["S001", "S051"]
line-length = 132

In order to use this reusable workflow you should implement a calling workflow as a YAML file in your .github/workflows directory containing the follwing:

Example usage in caller workflow

steps:
  - name: Lint Fortran
    uses: MetOffice/growss/.github/workflows/fortan-lint.yaml@main

    with:
       runner: The runner to use for the job (ubuntu-latest)
       timeout: The maximum time in minutes the job can run for (10)
       python-version: The Python version to use (3.14)

Where runner,timeout and python-version are all appropriately defined inputs to the workflow as defined in MetOffice/growss/.github/workflows/fortan-lint.yaml

Further details

Fortitude is a fortran linter developed and maintained by PlasmaFAIR. For further details on how to configure your fortitude.toml file and how to interpret error messages given by this reusable workflow please refer to the fortitude doumentation