Skip to content

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
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) {

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.

Why don't keep parentheses to maintain consistency of coding style?

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) {


# 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.

4 participants