Showing 170 of 170 total issues
Avoid deeply nested control flow statements. Open
if err != nil {
return
}
Avoid deeply nested control flow statements. Open
if err != nil {
return
}
Function TrustRequest
has 6 return statements (exceeds 4 allowed). Open
func TrustRequest(message, verifier, request string) (bool, *ed25519.PrivateKey, error) {
// contain check whether request have pass-key ,
// address contain address of trusted user wallet
// & message must not be empty
Function profile
has 6 return statements (exceeds 4 allowed). Open
func profile(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
Function Data_Predicition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
func Data_Predicition(w http.ResponseWriter, r *http.Request, fname, choose string, file *os.File, algo info.Levenshtein) error {
Similar blocks of code found in 3 locations. Consider refactoring. Open
func Mass(molecule *binary.Micromolecule) float64 {
mass := 0.00
if reflect.ValueOf(molecule).Elem().Kind() == reflect.Struct {
mass = reflect.ValueOf(molecule).Elem().Field(4).Float()
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
func Make_string(chain *binary.Micromolecule) string {
symbols := ""
if reflect.ValueOf(chain).Elem().Kind() == reflect.Struct {
symbols = reflect.ValueOf(chain).Elem().Field(3).String()
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
func Symbol(molecule *binary.Micromolecule) string {
symbol := ""
if reflect.ValueOf(molecule).Elem().Kind() == reflect.Struct {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method BucketObject.DownloadObject
has 5 return statements (exceeds 4 allowed). Open
func (boj *BucketObject) DownloadObject(project *uplink.Project) *bucket.Bucket_Error {
downObj, err := project.StatObject(boj.Ctx, boj.Bucket, boj.Key)
if err != nil {
Function Metadata
has 5 return statements (exceeds 4 allowed). Open
func Metadata(filename, key, ownership string, client *firestore.Client) int {
if reflect.DeepEqual(ownership, "") {
log.Fatalln("Empty ownership:", ownership)
Method BucketObject.StoreJCredentials
has 5 return statements (exceeds 4 allowed). Open
func (boj *BucketObject) StoreJCredentials(user_phrase string, passphrase ...string) (*bucket.Bucket_Error, *uplink.Access) {
const api_key string = "1dfJiTZDDGnTZ9gCmZDAFDp1gLCBSsijs838VhzgskptVYifaWwwDwE51cAqTwATc1L7wwfaQ8Jz723JMLjEvFntG6ZccHwgm7GpvaqCABtFMh4rtU2K"
const address string = "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs@eu1.storj.io:7777"
Method Gallery_Stream_Server.SearchPictures
has 5 return statements (exceeds 4 allowed). Open
func (c *Gallery_Stream_Server) SearchPictures(ctx context.Context, compress *Compressed) *ContentRoute {
// if no data will provided by the client then throw error
if reflect.DeepEqual(compress, &Compressed{}) {
return &ContentRoute{UserAgentId: "", IsP2PAddress: false}
Method DLINK_Object.Preview_Get
has 5 return statements (exceeds 4 allowed). Open
func (o *DLINK_Object) Preview_Get(filename string, link ...string) (dlink.PreviewLink, dlink.Errors) {
if errs := o.Get(filename, link...); errs != dlink.Errors_NONE {
return dlink.PreviewLink{}, errs
}
Function AddNewProfile
has 5 return statements (exceeds 4 allowed). Open
func AddNewProfile(response http.ResponseWriter, request *http.Request, add user.New_User) (*firestore.DocumentRef, bool, error) {
// var member user.New_User
var document *firestore.DocumentRef
var err error
Function FilePrints
has 5 return statements (exceeds 4 allowed). Open
func FilePrints(prints ...string) (map[string]string, linkcid.Cid) {
nullify := map[string]string{}
hash_data := sha256.Sum256([]byte(prints[0]))
Function CreateFile
has 5 return statements (exceeds 4 allowed). Open
func CreateFile(filename ...string) (*os.File, error) {
if _, err := os.Stat(filename[0]); os.IsExist(err) {
return &os.File{}, err
}
Similar blocks of code found in 2 locations. Consider refactoring. Open
if err != nil {
w.WriteHeader(http.StatusBadRequest)
distorted(w, r)
cacheObject.Set_Key("Internal:", err.Error())
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if err != nil {
w.WriteHeader(http.StatusBadRequest)
distorted(w, r)
cacheObject.Set_Key("Internal:", err.Error())
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 10 locations. Consider refactoring. Open
case "GAT":
aminochain.Symbol = "D"
aminochain.Mass = 133.103
aminochain.Acidity_a = "1.99"
aminochain.Acidity_b = "9.90" + "*/sc" + "3.90" //*/sc means side-chain pk_A
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 102.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 10 locations. Consider refactoring. Open
case "GAA":
aminochain.Symbol = "E"
aminochain.Mass = 147.130
aminochain.Acidity_a = "2.10"
aminochain.Acidity_b = "9.47" + "*/sc" + "4.07"
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 102.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76