Skip to content

Commit

Permalink
refactor: remove return statement which is not inside a function (#7)
Browse files Browse the repository at this point in the history
* ci: update .deepsource.toml

* ci: update .deepsource.toml

* refactor: make JUnit5 test classes and methods package-private

JUnit5 test classes and methods should be package-private.

* refactor: fix unused method receiver

Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep 
the same method signature, omit the receiver name or '_' as it is unused.

* refactor: fix unused method receiver (#5)

Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep 
the same method signature, omit the receiver name or '_' as it is unused.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* refactor: remove `return` statement which is not inside a function

A `return` statement should not be used outside of a function or method. This will raise a `SyntaxError`. Make sure that your code and indentation are correct.

---------

Co-authored-by: deepsource-io[bot] <42547082+deepsource-io[bot]@users.noreply.github.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: perumandla sai veerender <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2024
1 parent 902d668 commit cf4e003
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 128 deletions.
137 changes: 20 additions & 117 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
version = 1

[[analyzers]]
name = "test-coverage"

[[analyzers]]
name = "terraform"

[[analyzers]]
name = "swift"

[[analyzers]]
name = "sql"

[[analyzers]]
name = "shell"

[[analyzers]]
name = "secrets"

[[analyzers]]
name = "scala"

[[analyzers]]
name = "rust"

Expand All @@ -30,48 +9,20 @@ name = "rust"
[[analyzers]]
name = "ruby"

[[analyzers]]
name = "python"

[analyzers.meta]
runtime_version = "3.x.x"

[[analyzers]]
name = "php"

[analyzers.meta]
bootstrap_files = ["bootsrap"]

[[analyzers]]
name = "kotlin"
name = "python"

[analyzers.meta]
runtime_version = "19"
language_version = "1.9"
runtime_version = "3.x.x"

[[analyzers]]
name = "javascript"
name = "go"

[analyzers.meta]
plugins = [
"react",
"ember",
"angularjs",
"vue",
"meteor",
"angular"
]
environment = [
"nodejs",
"browser",
"jest",
"mocha",
"jasmine",
"jquery",
"mongo",
"cypress",
"vitest"
]
import_root = "github.com/SAIVEERENDER24/pi-nexus-autonomous-banking-network"

[[analyzers]]
name = "java"
Expand All @@ -80,79 +31,31 @@ name = "java"
runtime_version = "21"

[[analyzers]]
name = "go"
name = "csharp"

[analyzers.meta]
import_root = "github.com/KOSASIH/pi-nexus-autonomous-banking-network"
[[analyzers]]
name = "scala"

[[analyzers]]
name = "docker"
name = "javascript"

[analyzers.meta]
dockerfile_paths = ["Dockerfile"]
plugins = [
"react",
"vue",
"ember"
]
environment = ["nodejs"]

[[analyzers]]
name = "cxx"
name = "shell"

[[analyzers]]
name = "csharp"
name = "swift"

[[analyzers]]
name = "ansible"

[[transformers]]
name = "dotnet-format"

[[transformers]]
name = "clang-format"

[[transformers]]
name = "gofmt"

[[transformers]]
name = "gofumpt"

[[transformers]]
name = "google-java-format"

[[transformers]]
name = "standardjs"

[[transformers]]
name = "prettier"

[[transformers]]
name = "ktlint"

[[transformers]]
name = "php-cs-fixer"

[[transformers]]
name = "yapf"

[[transformers]]
name = "ruff"

[[transformers]]
name = "black"

[[transformers]]
name = "autopep8"

[[transformers]]
name = "isort"

[[transformers]]
name = "standardrb"

[[transformers]]
name = "rubocop"

[[transformers]]
name = "scalafmt"

[[transformers]]
name = "rustfmt"
name = "kotlin"

[[transformers]]
name = "swift-format"
[analyzers.meta]
runtime_version = "1.8"
language_version = "1.7"
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ def generate_private_key():
def derive_hd_key(private_key):
# Derive an HD key from the private key
hd_key = HDKey(private_key)
return hd_key
6 changes: 3 additions & 3 deletions core/account-service/tests/AccountServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@SpringBootTest
@Testcontainers
@ExtendWith(MockitoExtension.class)
public class AccountServiceTest {
class AccountServiceTest {
@Container
private static final PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1");

Expand All @@ -29,7 +29,7 @@ public void setup() {
}

@Test
public void testGetAccount() {
void testGetAccount() {
// Given
Long accountId = 1L;
Account account = new Account(accountId, "John Doe", "[email protected]");
Expand All @@ -43,7 +43,7 @@ public void testGetAccount() {
}

@Test
public void testCreateAccount() {
void testCreateAccount() {
// Given
Account account = new Account("John Doe", "[email protected]");

Expand Down
6 changes: 3 additions & 3 deletions core/account-service/tests/TransactionServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@SpringBootTest
@Testcontainers
@ExtendWith(MockitoExtension.class)
public class TransactionServiceTest {
class TransactionServiceTest {
@Container
private static final KafkaContainer kafkaContainer = new KafkaContainer("confluentinc/cp-kafka:5.5.1");

Expand All @@ -29,7 +29,7 @@ public void setup() {
}

@Test
public void testCreateTransaction() {
void testCreateTransaction() {
// Given
Transaction transaction = new Transaction("John Doe", 100.0);

Expand All @@ -41,7 +41,7 @@ public void testCreateTransaction() {
}

@Test
public void testUpdateTransaction() {
void testUpdateTransaction() {
// Given
Transaction transaction = new Transaction("John Doe", 100.0);

Expand Down
6 changes: 3 additions & 3 deletions core/account-service/tests/UserServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@SpringBootTest
@Testcontainers
@ExtendWith(MockitoExtension.class)
public class UserServiceTest {

This comment has been minimized.

Copy link
@SAIVEERENDER24

SAIVEERENDER24 Dec 24, 2024

Author

recreate the resonance the word that would be transferred and transferred for the lead occupied nano management and fixed ratio that had been coded and deployed

class UserServiceTest {
@Container
private static final Neo4jContainer neo4jContainer = new Neo4jContainer("neo4j:4.2.1");

Expand All @@ -29,7 +29,7 @@ public void setup() {
}

@Test
public void testFindByUsername() {
void testFindByUsername() {
// Given
String username = "john.doe";
User user = new User(username, "John Doe", "[email protected]");
Expand All @@ -43,7 +43,7 @@ public void testFindByUsername() {
}

@Test
public void testFindByEmail() {
void testFindByEmail() {
// Given
String email = "[email protected]";
User user = new User("john.doe", "John Doe", email);
Expand Down
2 changes: 1 addition & 1 deletion web4/nexarion/nc/nexarion_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ func NewNexarionCore() *NexarionCore {
return &NexarionCore{}
}

func (c *NexarionCore) Start() {
func (*NexarionCore) Start() {
// Implement the Nexarion Core's decision-making processes and functionality
}

1 comment on commit cf4e003

@SAIVEERENDER24
Copy link

Choose a reason for hiding this comment

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

leaving this page as per the conflicts that have been performed well and designed according to the instructor

Please sign in to comment.