...
Description | Bad | Good | |
---|---|---|---|
1 | Don't forget to check the copyright (add/modify new calendar year to existing copyright if needed) | * Copyright (C) 2021 Other Company * Modifications Copyright (C) 2021-2022 Nordix Foundation | |
2 | Don't forget to check the commit message structure | It is following ONAP commit message guidelines: Commit Messages#CommitStructure | |
3 | Overuse of constant for String Literals (that don't add value) Also duplication is not a good reason, it often 'smells like' a method that should be extracted out instead |
|
|
4 | Avoid using ! when else block is implemented |
| if (x==null) { |
5 | No need for else after return statement |
| if (x==true) { return something; |
6 | No need to check for not empty before iterating on collection | if (!myCollection.isEmpty) { collection.forEach(some action); | collection.forEach(some action); |
7 | No unnecessary test data |
| def 'Registration with invalid cm handle name'() { |
Groovy & Spock Conventions
...