question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formatter merges pipelines (and everything, including documentation comments) in a single row

See original GitHub issue
Steps To Reproduce

1.1

return extractId(req).flatMap(cmsID -> service.find(cmsID))
            .flatMap(item -> ServerResponse.ok().syncBody(item))
            .doOnError(e -> log.debug(e.getMessage()))
            .onErrorResume(this::handleError);

1.2

+ "  spherical: true," 
+ "  query: {" 
+ "      status: 'publish',"
+ "      $or: [{endDate: {$gt: new Date()}}, {endDate: {$exists: false}}]" 
+ "  },"
  1. Alt Shift F / cmd k, f
Current Result

1.1

return extractId(req).flatMap(cmsID -> service.find(cmsID)).flatMap(item -> ServerResponse.ok().syncBody(item))
                .doOnError(e -> log.debug(e.getMessage())).onErrorResume(this::handleError);

1.2

+ "  spherical: true," + "  query: {" + "      status: 'publish',"
+ "      $or: [{endDate: {$gt: new Date()}}, {endDate: {$exists: false}}]" + "  },"
Expected Result

do not touch line breaks, please. …or do not touch line breaks, when line starts with dot (code, /** doc comments */ )

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
samba2commented, Jun 17, 2019

I have the same issue, the suggested workaround might help but in times of functional Java and Internal DSLs the VS Code auto formatter is actually hardly useful.

Please provide a solution for this. 🙏

3reactions
fbriconcommented, Feb 27, 2019

You can add //@formatter:off at the beginning of the region you don’t want to be formatted, and add //@formatter:on at the end, to turn it back on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize pipeline configuration - GitLab Docs
Specify a custom CI/CD configuration file · On the top bar, select Main menu > Projects and find your project. · On the...
Read more >
Apache Beam Programming Guide
Apache Beam is an open source, unified model and set of language-specific SDKs for defining and executing data processing workflows, ...
Read more >
Google Java Style Guide
4 Formatting: 4.1 Braces: 4.2 Block indentation: +2 spaces: 4.3 One ... We do not use the phrase "documentation comments", and instead use...
Read more >
Suggest or require checks before a merge | Bitbucket Cloud
Ensure users are only merging changes with passing builds. Select a specific number of successful builds before a merge. Use with Bitbucket Pipelines,...
Read more >
Supported hooks - pre-commit
blacken-docs - Run `black` on python code blocks in documentation files ... fmt - Format files with cargo fmt. cargo-check - Check the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found