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

Align parameters one per line if too long #1

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

thescouser89
Copy link
Contributor

@thescouser89 thescouser89 commented Jan 29, 2020

This applies when calling a function/method, and when defining a method

Some examples:

-        ScheduledFuture<?> scheduledFuture = executor.scheduleAtFixedRate(backOffRunnable, 0,
-                backOffRunnableConfig.getPollIntervalMillis(), TimeUnit.MILLISECONDS);
+        ScheduledFuture<?> scheduledFuture = executor
+                .scheduleAtFixedRate(backOffRunnable, 0, backOffRunnableConfig.getPollIntervalMillis(), TimeUnit.MILLISECONDS);

-        dataProvider.subscribe(matchFilters, prefixFilters, Optional.ofNullable(afterLine), onLine, subscription,
-                Optional.ofNullable(maxLines));
+        dataProvider.subscribe(matchFilters,
+                               prefixFilters,
+                               Optional.ofNullable(afterLine),
+                               onLine,
+                               subscription,
+                               Optional.ofNullable(maxLines));

Note that the first parameter starts in the same line as the method, as opposed to a new line.

This applies when calling a function/method, and when defining a method

Some examples:
```
-        ScheduledFuture<?> scheduledFuture = executor.scheduleAtFixedRate(backOffRunnable, 0,
-                backOffRunnableConfig.getPollIntervalMillis(), TimeUnit.MILLISECONDS);
+        ScheduledFuture<?> scheduledFuture = executor
+                .scheduleAtFixedRate(backOffRunnable, 0, backOffRunnableConfig.getPollIntervalMillis(), TimeUnit.MILLISECONDS);

-        dataProvider.subscribe(matchFilters, prefixFilters, Optional.ofNullable(afterLine), onLine, subscription,
-                Optional.ofNullable(maxLines));
+        dataProvider.subscribe(matchFilters,
+                               prefixFilters,
+                               Optional.ofNullable(afterLine),
+                               onLine,
+                               subscription,
+                               Optional.ofNullable(maxLines));
```
@thescouser89
Copy link
Contributor Author

I'm unsure how to proceed with propagating the changes to Intellij and to Netbeans. I don't really have the time to figure out how to propagate the changes to the other ides. I did the changes to eclipse only because we're using it to auto-align using Maven. I hope everybody is ok with this.

Copy link
Contributor

@vibe13 vibe13 left a comment

Choose a reason for hiding this comment

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

Good to me :-) Thanks!

@thescouser89 thescouser89 merged commit 508791d into project-ncl:master Feb 3, 2020
rnc added a commit to rnc/ide-config that referenced this pull request Jan 22, 2025
rnc added a commit to rnc/ide-config that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants