Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two new options: --keep-blank-lines and --disable-indent-subroutine #106

Closed
wants to merge 10 commits into from

Conversation

zaikunzhang
Copy link

First of all, thank you very much for developing this great package.

In the current version, fprettify removes the consecutive and trailing blank lines. However, some programmers may like to keep those lines. Therefore, it might be a good idea to introduce a new option for such a possibility. This is what "--keep-blank-lines" for.

The idea of "--disable-indent-subroutine" is similar to that of "--disable-indent-mod". It disables the indentation for the body of a subroutine or a function.

Thank you for your consideration, and again, for this very useful software.

@@ -2,9 +2,16 @@

[![Build Status](https://travis-ci.com/pseewald/fprettify.svg?branch=master)](https://travis-ci.com/pseewald/fprettify) [![Coverage Status](https://coveralls.io/repos/github/pseewald/fprettify/badge.svg?branch=master)](https://coveralls.io/github/pseewald/fprettify?branch=master) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![PyPI version](https://badge.fury.io/py/fprettify.svg)](https://badge.fury.io/py/fprettify)

fprettify is an auto-formatter for modern Fortran code that imposes strict whitespace formatting, written in Python.
This is a fork of [pseewald/fprettify](https://github.com/pseewald/fprettify),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaikunzhang you probably didn't mean to include changes to README in this PR.

Copy link

@beddalumia beddalumia May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'm one of those people that could really use the --keep-blank-lines option, for that I contribute to some projects where (many) consecutive blank lines between subroutines are pervasively used (and expected in contributions, at least preserved).

@zaikunzhang, thank you very much for the proposal, can you remove the committed edit to the README, so that the PR could be merged (and hopefully the PyPi version bumped)?

@pseewald pseewald linked an issue Aug 30, 2022 that may be closed by this pull request
@pseewald pseewald added the enhancement Enhancement to existing feature label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new option "--disable-indent-subroutine"
4 participants