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

Improve formatting #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Improve formatting #117

wants to merge 3 commits into from

Conversation

Shan1024
Copy link

@Shan1024 Shan1024 commented Nov 16, 2019

This PR improves formatting and reorders imports.

@Shan1024 Shan1024 changed the title Reorder imports Improve formatting Nov 16, 2019
@@ -95,7 +97,7 @@ public type SubscriptionFilter object {

string headerValue = request.getHeader(http:AUTH_HEADER);

if !(headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
if (!headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
Copy link
Author

Choose a reason for hiding this comment

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

Note - This is swapped here because otherwise no point of wrapping the expression with parentheses.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we just remove the extra parentheses instead.

Suggested change
if (!headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
if !headerValue.startsWith(auth:AUTH_SCHEME_BASIC) {

@@ -95,7 +97,7 @@ public type SubscriptionFilter object {

string headerValue = request.getHeader(http:AUTH_HEADER);

if !(headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
if (!headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we just remove the extra parentheses instead.

Suggested change
if (!headerValue.startsWith(auth:AUTH_SCHEME_BASIC)) {
if !headerValue.startsWith(auth:AUTH_SCHEME_BASIC) {

@@ -3,16 +3,16 @@ import ballerina/config;
import ballerina/http;

# Listener for results tabulation to deliver results to us.
listener http:Listener resultsListener = new (config:getAsInt("eclk.pub.port", 8181), {
listener http:Listener resultsListener = new(config:getAsInt("eclk.pub.port", 8181), {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The standard we follow is to leave a space to be consistent with

listener http:Listener resultsListener = new http:Listener(config:getAsInt("eclk.pub.port", 8181), {

@chamil321
Copy link
Collaborator

@Shan1024 Shall we do the aforementioned suggestion to get the changes merged?

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.

3 participants