solher/arangolite

View on GitHub

Showing 101 of 101 total issues

Method Database.Run has 6 return statements (exceeds 4 allowed).
Open

func (db *Database) Run(ctx context.Context, v interface{}, q Runnable) error {
    if q == nil {
        return nil
    }

Severity: Major
Found in database.go - About 40 mins to fix

    Method Database.Send has 6 return statements (exceeds 4 allowed).
    Open

    func (db *Database) Send(ctx context.Context, q Runnable) (Response, error) {
        if q == nil {
            return &response{}, nil
        }
    
    
    Severity: Major
    Found in database.go - About 40 mins to fix

      Method basicSender.Send has 5 return statements (exceeds 4 allowed).
      Open

      func (s *basicSender) Send(ctx context.Context, cli *http.Client, req *http.Request) (*response, error) {
          select {
          case <-ctx.Done():
              return nil, ctx.Err()
          default:
      Severity: Major
      Found in senders.go - About 35 mins to fix

        Method GetStatisticsResult.UnmarshalJSON has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
        Open

        func (r *GetStatisticsResult) UnmarshalJSON(bytes []byte) (err error) {
            obj := make(map[string]interface{})
            err = json.Unmarshal(bytes, &obj)
            if err != nil {
                return err
        Severity: Minor
        Found in requests/statistics.go - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Your code does not pass gofmt in 2 places. Go fmt your code!
        Open

        package requests
        Severity: Minor
        Found in requests/transaction.go by gofmt

        exported method FollowCursor.Path should have comment or be unexported
        Open

        func (r *FollowCursor) Path() string {
        Severity: Minor
        Found in requests/cursor.go by golint

        exported method GetGraph.Method should have comment or be unexported
        Open

        func (g *GetGraph) Method() string {
        Severity: Minor
        Found in requests/graph.go by golint

        exported method AQL.Method should have comment or be unexported
        Open

        func (a *AQL) Method() string {
        Severity: Minor
        Found in requests/aql.go by golint

        exported method CreateCollection.Generate should have comment or be unexported
        Open

        func (r *CreateCollection) Generate() []byte {
        Severity: Minor
        Found in requests/collection.go by golint

        exported method DropCollection.Method should have comment or be unexported
        Open

        func (r *DropCollection) Method() string {
        Severity: Minor
        Found in requests/collection.go by golint

        exported method TruncateCollection.Path should have comment or be unexported
        Open

        func (r *TruncateCollection) Path() string {
        Severity: Minor
        Found in requests/collection.go by golint

        exported method CurrentDatabase.Method should have comment or be unexported
        Open

        func (r *CurrentDatabase) Method() string {
        Severity: Minor
        Found in requests/database.go by golint

        exported method CreateHashIndex.Path should have comment or be unexported
        Open

        func (r *CreateHashIndex) Path() string {
        Severity: Minor
        Found in requests/index.go by golint

        exported method GetStatistics.Generate should have comment or be unexported
        Open

        func (r *GetStatistics) Generate() []byte {
        Severity: Minor
        Found in requests/statistics.go by golint

        exported method DeleteAQLFunction.Path should have comment or be unexported
        Open

        func (r *DeleteAQLFunction) Path() string {
        Severity: Minor
        Found in requests/aqlfunction.go by golint

        exported type GetAQLFunctionsResult should have comment or be unexported
        Open

        type GetAQLFunctionsResult []AQLFunction
        Severity: Minor
        Found in requests/aqlfunction.go by golint

        exported method SetCacheProperties.Path should have comment or be unexported
        Open

        func (r *SetCacheProperties) Path() string {
        Severity: Minor
        Found in requests/cache.go by golint

        exported method GetCacheProperties.Generate should have comment or be unexported
        Open

        func (r *GetCacheProperties) Generate() []byte {
        Severity: Minor
        Found in requests/cache.go by golint

        exported method ListCollections.Method should have comment or be unexported
        Open

        func (c *ListCollections) Method() string {
        Severity: Minor
        Found in requests/collection.go by golint

        exported method DropCollection.Generate should have comment or be unexported
        Open

        func (r *DropCollection) Generate() []byte {
        Severity: Minor
        Found in requests/collection.go by golint
        Severity
        Category
        Status
        Source
        Language