Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

findent

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

findent

findent: powerful Fortran formatter

pipPyPI
Version
4.3.6
Maintainers
1

PyPI Latest Release PyPi release

findent: powerful Fortran formatter

alt

What is it?

findent indents/beautifies/converts and can optionally generate the dependencies of Fortran sources.

Features

  • Supports Fortran-66 up to Fortran-2018
  • Converts from Fixed Form to Free Form and vice-versa
  • Honours cpp and coco preprocess statements
  • Honours OpenMP conditionals
  • Validated against all constructs in 'Modern Fortran explained, Incorporating Fortran 2018, Metcalf e.a.'
  • Supported platformrs: Unix and Windows
  • High speed: 50K - 100K lines per second
  • vim, gedit, emacs: findent optionally emits configuration files for these editors to use findent as a plugin.

Installation

Normal installation using pip

pip install findent

Supported platforms

OSArchitecture
Linuxx64, arm64, i686, aarch64, ppc64, s390x
MacOSx64, arm64
Windowsx64

Examples

Format file in.f90 to out.f90

findent < in.f90 > out.f90

Format with 4-space indentation and convert Fixed Form in.f to Free Form out.f90

findent -i4 -ofree < in.f > out.f90

Format and refactor all files with .f extension in the current directory

wfindent -i4 -Rr *.f

Generating Fortran source dependencies for use in Makefile

findent will generate a dependency list for:

  • definitions and uses of modules and submodules
  • include, #include and ??include statements

In your Makefile add something similar to:

findent --makefdeps > makefdeps
chmod +x makefdeps

include deps
dep deps:
  ./makefdeps *.f90 > deps

The flag --makefdeps generates a script in the standard output. Depending on your usecase the script might not suffice and you will need to write your own version.

Editor incorporation

(G) VIM users

Installation instructions:

findent --vim_help

Documentation:

:help equalprg

:help indentexpr

GEDIT users

Installation instructions:

findent --gedit_help

EMACS users

Installation instructions:

findent --emacs_help

Keywords

fortran

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts