Stacks

Review a Fortran Pull Request with Atlas in 2026

Updated 8 min read

Atlas empowers Fortran developers in 2026 to review pull requests comprehensively, going beyond line-by-line diffs by integrating directly with `fpm`, `fprettify`, and `gfortran` diagnostics to ensure robust code quality and catch subtle issues that traditional reviews might miss.

How Atlas reviews Fortran pull requests in 2026

In 2026, Atlas reviews Fortran pull requests by first fetching the branch and producing a raw diff using its VCS layer, then reading the full changed files. This approach ensures that context outside the immediate diff hunks is visible, allowing for a more thorough analysis than a simple line-by-line review.

Atlas begins a Fortran pull request review by leveraging its deep integration with Git. It uses its VCS layer to expose `status`, `diff`, `diffRaw`, and `commits` operations, allowing it to fetch the specific branch under review and generate the raw patch. Crucially, Atlas then employs its `read` tool to pull the *full* content of the changed Fortran source files, rather than just the diff hunks. This is vital for Fortran, where changes in one part of a `MODULE` or `SUBROUTINE` can have ripple effects far beyond the immediate lines shown in a `git diff`. By having the complete file context, Atlas can better understand the implications of modifications to `MODULE` declarations, `INTERFACE` blocks, or `COMMON` blocks, which might not be fully apparent from a limited diff view. This comprehensive file access is a foundational step in catching subtle bugs that a line-by-line read would miss, ensuring a higher standard of code quality for Fortran applications.

Checking Fortran module interfaces and callers with Atlas LSP

Atlas significantly enhances Fortran pull request reviews by using its `lsp` tool to `findReferences` for every changed function signature, a critical step in 2026. This ensures that modifications to `MODULE` procedures or `INTERFACE` blocks do not inadvertently break callers that are not explicitly part of the diff, providing a robust check for API stability.

For Fortran codebases, especially those utilizing modern features like `MODULE`s and `INTERFACE` declarations, a change to a subroutine or function signature can have widespread, non-obvious impacts. Atlas addresses this by integrating an `lsp` tool capable of performing `findReferences` operations. After identifying changed function signatures within the Fortran source files, Atlas will query the Language Server Protocol (LSP) to locate all call sites. This is particularly powerful for Fortran, where explicit interfaces and `INTENT` declarations on dummy arguments are crucial for type checking and compiler diagnostics. If a developer modifies an argument list in a `SUBROUTINE` or `FUNCTION` within a `MODULE`, Atlas can identify all other Fortran files that `USE` that module and call the modified procedure, even if those calling files are not part of the current pull request's diff. This proactive check helps prevent runtime errors and ensures the integrity of the entire Fortran application, a capability essential for complex Fortran projects.

Automating Fortran testing and formatting with Atlas

Atlas automates critical Fortran development tasks, including running tests and applying formatting, ensuring code quality in 2026. It uses `fpm test` to execute unit tests, leveraging the `test-drive` framework, and applies `fprettify` to maintain consistent code style across the project, all behind explicit permission prompts.

A key part of reviewing a Fortran pull request is validating its correctness and adherence to style guidelines. Atlas integrates directly with the Fortran toolchain to automate these checks. Using its `bash` tool, Atlas can execute `fpm test`, which runs the project's unit tests, typically leveraging the `test-drive` framework found under the `test/` directory. Atlas is designed to iterate on `gfortran` diagnostics, providing feedback on compilation issues or warnings. Furthermore, to ensure consistent code style, Atlas can run `fprettify` over the changed Fortran source files. Before any of these commands are executed, Atlas presents a permission prompt, adhering to its `allow`, `ask`, and `deny` rules, giving the developer full control. After running tests and formatting, Atlas reports its findings as a `todowrite` list, ordered by severity, making it easy for the reviewer to address any identified issues. This ensures that every Fortran pull request meets both functional and stylistic standards before merging.

Ensuring safety and control in Fortran code changes with Atlas

Atlas prioritizes safety and developer control when proposing changes to Fortran code, a crucial feature for complex projects in 2026. Every Atlas tool call is permission-gated, and it drafts a plan in a read-only agent before executing, ensuring transparency and preventing unintended modifications to `fpm.toml` or Fortran source files.

For Fortran developers working on critical systems, safety and control over automated tools are paramount. Atlas is built with these principles at its core. Every tool call, whether it's `bash` executing `fpm test` or `grep` searching for patterns, is permission-gated against `allow`, `ask`, and `deny` rules. This means Atlas will always ask for explicit approval before running any command that could modify the system or interact with the Fortran codebase. Before making any changes, Atlas drafts a comprehensive plan in a read-only plan agent, which it then presents to the user for approval. Only after approval does it switch to a build agent to execute the plan. Furthermore, for every file edit Atlas proposes, it computes a unified diff and surfaces it for approval before writing. This includes changes to Fortran source files (e.g., `.f90`, `.f`), `fpm.toml`, or any other project configuration. Atlas also snapshots file changes as Git patches, allowing edits to be easily diffed and rolled back if necessary, providing an additional layer of safety for Fortran development.

Setting up Atlas for Fortran projects with `fpm.toml`

Configuring Atlas for a Fortran project is straightforward in 2026, primarily involving the presence of an `fpm.toml` file. Atlas automatically reads your Fortran modules, explicit interfaces, and `INTENT` declarations, enabling it to provide intelligent assistance and understand the project's structure from the outset.

To leverage Atlas for Fortran pull request reviews, the primary setup involves ensuring your project is managed by the Fortran Package Manager (`fpm`) and contains an `fpm.toml` configuration file. Atlas is designed to work direct within this ecosystem. Once Atlas is run in such a project, it automatically begins to read and index your Fortran code. This includes parsing `MODULE` declarations, understanding `INTERFACE` blocks, and recognizing `INTENT` declarations on every dummy argument within your subroutines and functions. This deep understanding of Fortran's Abstract Syntax Tree (AST), built using `tree-sitter`, allows Atlas to perform more intelligent operations than simple line-based analysis. For instance, you can ask Atlas to refactor a `COMMON` block into a `MODULE` or to add `test-drive` unit tests under the `test/` directory, knowing it comprehends the Fortran language constructs involved. This initial indexing with local Ollama embeddings also ensures that your sensitive Fortran code remains off third-party servers, maintaining data privacy.

Step by step

  1. 01Fetch the Fortran branch and generate the diff: Use Atlas's VCS layer to `diffRaw` the pull request branch against the base, providing the initial patch for review.
  2. 02Read full Fortran source files for context: Employ Atlas's `read` tool to retrieve the complete content of all changed Fortran files, such as `my_module.f90`, ensuring context beyond diff hunks is visible.
  3. 03Check Fortran signature changes with LSP: For every modified `SUBROUTINE` or `FUNCTION` signature in a Fortran `MODULE` or `INTERFACE`, use Atlas's `lsp` tool's `findReferences` operation to identify and report any broken callers.
  4. 04Grep for unupdated Fortran patterns: Utilize Atlas's `grep` tool to search the entire Fortran codebase for old constant names, stale copies of code, or feature flags that should have been updated by the pull request.
  5. 05Run Fortran unit tests with `fpm test`: Execute `fpm test` using Atlas's `bash` tool, allowing Atlas to iterate on `gfortran` diagnostics and report any test failures from `test-drive` as a `todowrite` item.
  6. 06Apply Fortran formatting with `fprettify`: Have Atlas run `fprettify` over the changed Fortran source files using its `bash` tool, ensuring consistent code style before final approval of the diff.
  7. 07Review Atlas's proposed Fortran changes and diffs: Examine the unified diffs Atlas computes for any proposed edits, such as those from `fprettify`, and approve them before Atlas writes the changes to your Fortran project.

Frequently asked questions

How does Atlas handle Fortran `MODULE` dependencies during a PR review?
Atlas indexes Fortran code by AST declarations using `tree-sitter`, allowing it to understand `MODULE` dependencies and `USE` associations. When a `MODULE`'s interface changes, Atlas's `lsp` tool can `findReferences` to identify all affected callers, even if they are not part of the immediate diff.
Can Atlas run `fpm test` for my Fortran project?
Yes, Atlas can run `fpm test` using its `bash` tool. It will prompt for permission before execution and can iterate on `gfortran` diagnostics, reporting test failures from `test-drive` as a `todowrite` list.
Does Atlas support `fprettify` for Fortran code formatting?
Absolutely. Atlas can run `fprettify` over your changed Fortran source files using its `bash` tool, ensuring consistent code style across your project. It will present the formatted diff for your approval before writing.
How does Atlas ensure I don't accidentally break Fortran code outside the diff?
Atlas uses its `lsp` tool to perform `findReferences` for any changed Fortran function or subroutine signatures. This proactively identifies callers in other Fortran files that might be broken by the change, even if those files are not included in the pull request's diff.
What Fortran specific files does Atlas understand?
Atlas understands standard Fortran source files (e.g., `.f90`, `.f`), `fpm.toml` for package management, and `test/` directories for `test-drive` unit tests. It parses `MODULE`s, `INTERFACE`s, and `INTENT` declarations for deep code understanding.
Is my Fortran code sent to third-party servers for analysis by Atlas?
No. Atlas can build its code index with local Ollama embeddings, keeping your Fortran code and its AST declarations entirely off third-party servers, ensuring privacy and security for your proprietary code.
How does Atlas help with refactoring Fortran `COMMON` blocks?
Atlas, with its understanding of Fortran AST, can be asked to move a `COMMON` block into a `MODULE`. It will draft a plan, present a unified diff for approval, and then execute the refactoring, ensuring all references are updated correctly and safely.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Review a Pull Request with Atlas (2026 Workflow)

How to review a pull request with Atlas in 2026: bash produces the raw patch, read pulls whole files, the lsp tool's findReferences checks callers the diff never shows.

Atlas for Fortran: fpm.toml, Explicit Interfaces, and fprettify in 2026

Atlas is a terminal-native AI coding agent for Fortran in 2026. It reads modules, explicit interfaces, and intent declarations, runs fpm test behind a prompt, and runs fprettify.

Trace a runtime bug from a stack trace in Fortran with Atlas in 2026

Pinpoint Fortran runtime bugs from production stack traces using Atlas in 2026. Leverage fpm and gfortran diagnostics to quickly identify and fix issues without a debugger attached.

Run Atlas Headless in CI for Fortran in 2026

Fortran developers in 2026 can run Atlas headless in CI pipelines to automate tasks, integrate with fpm, and get machine-readable output for robust automation.

Onboard to an Unfamiliar Fortran Codebase in 2026 with Atlas

Quickly build a working mental model of any Fortran repository using Atlas. Leverage semantic search, `fpm` package layouts, and `fprettify` formatting for rapid understanding and safe code exploration in 2026.

Add a Regression Test for a Fortran Bug Fix with Atlas in 2026

Fortran developers in 2026 use Atlas to add regression tests for bug fixes. Leverage fpm test (test-drive) to confirm failures and passes, ensuring robust code quality.

Upgrade a Fortran Dependency and Fix Breakage with Atlas in 2026

Fortran developers in 2026 can use Atlas to upgrade dependencies, resolve compile errors, and fix test failures. Learn how Atlas integrates with fpm, gfortran, and fprettify for efficient migrations.

Research a third-party API before integrating it in Fortran with Atlas in 2026

Fortran developers in 2026 can research third-party APIs efficiently with Atlas. Use `websearch` and `webfetch` for current docs, then integrate with confidence, verifying against `fpm` project conventions.

Browse this resource hub