posit-dev / posit-dev/air

Support skip ranges

Open
#456 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Probably related to #114

I'd appreciate some general, inline format skipping options.

If I wanted to do something like:

one   <- c(TRUE, TRUE,  TRUE )
two   <- c(TRUE, FALSE, NA   )
three <- c(TRUE, TRUE,  FALSE)

current workarounds

multiple skips

# fmt: skip 
one   <- c(TRUE, TRUE,  TRUE )
# fmt: skip 
two   <- c(TRUE, FALSE, NA   )
# fmt: skip 
three <- c(TRUE, TRUE,  FALSE)

getting by with {

# fmt: skip 
{
  one   <- c(TRUE, TRUE,  TRUE )
  two   <- c(TRUE, FALSE, NA   )
  three <- c(TRUE, TRUE,  FALSE)
}

preferred solutions

start:end keywords

# fmt: skip start
one   <- c(TRUE, TRUE,  TRUE )
two   <- c(TRUE, FALSE, NA   )
three <- c(TRUE, TRUE,  FALSE)
# fmt: skip end

number of lines/expressions (fmt: skip -> fmt: skip 1)

# fmt: skip 3
one   <- c(TRUE, TRUE,  TRUE )
two   <- c(TRUE, FALSE, NA   )
three <- c(TRUE, TRUE,  FALSE)

Contributor guide

Open the contributing guide

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

Start by reviewing issue #114 and the existing fmt: skip behavior described here. Compare the proposed start/end and line-count forms, then establish the accepted syntax and verify that range skipping works without repeated directives.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.