nextflow-io / nextflow-io/language-server

Standardise number of blank newlines

Open
#115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

formatting
Dominant language
Java
Stars
31
Forks
8
Avg merge
1d 10h
Merged PRs (30d)
2

Description

We should standardise the number of blank newlines that are allowed around things.

For example, with Python we have PEP8 which says:

Surround top-level function and class definitions with two blank lines.

Method definitions inside a class are surrounded by a single blank line.

Extra blank lines may be used (sparingly) to separate groups of related functions. Blank lines may be omitted between a bunch of related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical sections.

Functionally, this means that code formatters add newlines where needed and collapse newlines where there are too many. I think that Ruff formatter adds 2 newlines after def and class and allows a maximum of 2 newlines between arbitrary code, for example.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the language server's formatting implementation, then compare its current behavior with the PEP 8 and Ruff behavior described in the issue; done means the allowed blank-line rules are explicitly defined and consistently enforced.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.