-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41481 from poorna2152/comments_before_imports
Fix formatting of comments above import declarations
- Loading branch information
Showing
17 changed files
with
389 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_1.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...es/formatter-core/src/test/resources/declarations/import/assert/import_declaration_10.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2024 WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
// check this | ||
|
||
import ballerina/jballerina.java as _; | ||
import ballerinax/twilio as _; | ||
|
||
function bar() { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...es/formatter-core/src/test/resources/declarations/import/assert/import_declaration_11.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// comment 1 | ||
// comment 2 | ||
|
||
// module imports | ||
import bas; | ||
import fos; | ||
|
||
import ballerina/io; | ||
import ballerina/time; | ||
import ballerinax/http; | ||
import ballerinax/oracledb; | ||
|
||
// bar | ||
import abc/bar; | ||
|
||
// foo | ||
import abc/foo; | ||
|
||
function baz() { | ||
} |
1 change: 1 addition & 0 deletions
1
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_5.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import greeter.email; | ||
|
||
// First line of comments | ||
// Second line of comments | ||
import ballerina/lang.'int; | ||
|
17 changes: 17 additions & 0 deletions
17
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_6.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// This software is the property of WSO2 LLC. and its suppliers, if any. | ||
// Dissemination of any information or reproduction of any material contained | ||
// herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
// You may not alter or remove any copyright or other notice from copies of this content. | ||
|
||
import cp_configuration_service.config; | ||
import cp_configuration_service.utils; | ||
|
||
import ballerina/http; | ||
import ballerina/time; | ||
import ballerina/uuid; | ||
|
||
function bar() { | ||
string a = "a"; | ||
} |
23 changes: 23 additions & 0 deletions
23
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_7.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// This software is the property of WSO2 LLC. and its suppliers, if any. | ||
// Dissemination of any information or reproduction of any material contained | ||
// herein in any form is strictly forbidden, unless permitted by WSO2 expressly. | ||
// You may not alter or remove any copyright or other notice from copies of this content. | ||
|
||
// module imports | ||
import bas; | ||
import fos; | ||
|
||
import ballerina/log; | ||
import ballerina/time; | ||
import ballerinax/jdbc; | ||
import ballerinax/oracledb; | ||
|
||
import abc/bar; | ||
import abc/foo; | ||
import cde/baz; | ||
|
||
function bar() { | ||
string a = "a"; | ||
} |
40 changes: 40 additions & 0 deletions
40
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_8.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) 2024 WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
// just a random comment | ||
// for two lines part of this import | ||
|
||
// comment 3 | ||
// comment 4 | ||
|
||
// module imports | ||
import bas; | ||
import fos; | ||
|
||
import ballerina/io; | ||
import ballerina/time; | ||
import ballerinax/http; | ||
import ballerinax/oracledb; | ||
|
||
// bar | ||
import abc/bar; | ||
|
||
// foo | ||
import abc/foo; | ||
|
||
function baz() { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...les/formatter-core/src/test/resources/declarations/import/assert/import_declaration_9.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// check this | ||
|
||
import ballerina/jballerina.java as _; | ||
import ballerinax/twilio as _; | ||
|
||
function foz() { | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...es/formatter-core/src/test/resources/declarations/import/source/import_declaration_10.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2024 WSO2 LLC. (http://www.wso2.com). | ||
// | ||
// WSO2 LLC. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
// check this | ||
import ballerinax/twilio as _; | ||
import ballerina/jballerina.java as _; | ||
|
||
function bar() { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...es/formatter-core/src/test/resources/declarations/import/source/import_declaration_11.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
// comment 1 | ||
// comment 2 | ||
import ballerina/io; | ||
import ballerinax/oracledb; | ||
import ballerinax/http; | ||
import ballerina/time; | ||
|
||
// module imports | ||
import bas; | ||
import fos; | ||
|
||
// foo | ||
import abc/foo; | ||
|
||
// bar | ||
import abc/bar; | ||
|
||
function baz() { | ||
} |
Oops, something went wrong.