Skip to content

Commit

Permalink
Correct linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavePearce committed Jun 13, 2024
1 parent d4a2404 commit 29688b4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all: clean lint test build
.PHONY: lint
lint:
@echo ">>> Performing golang code linting.."
golangci-lint run
golangci-lint run --config=.golangci.yml

.PHONY: test
test:
Expand Down
2 changes: 1 addition & 1 deletion pkg/air/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (p *Mul) Equate(other Expr) Expr { return &Sub{Args: []Expr{p, other}} }
// Constant represents a constant value within an expression.
type Constant struct{ Value *fr.Element }

// NewConstant construct an AIR expression representing a given constant.
// NewConst construct an AIR expression representing a given constant.
func NewConst(val *fr.Element) Expr {
return &Constant{val}
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/air/gadgets/normalisation.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/consensys/go-corset/pkg/table"
)

// Norm constructs an expression representing the normalised value of e. That is,
// an expression which is 0 when e is 0, and 1 when e is non-zero. This is done
// by introducing a synthetic column to hold the (pseudo) mutliplicative inverse
// of e.
// Normalise constructs an expression representing the normalised value of e.
// That is, an expression which is 0 when e is 0, and 1 when e is non-zero.
// This is done by introducing a synthetic column to hold the (pseudo)
// mutliplicative inverse of e.
func Normalise(e air.Expr, tbl *air.Schema) air.Expr {
// Construct pseudo multiplicative inverse of e.
ie := ApplyPseudoInverseGadget(e, tbl)
Expand Down
1 change: 1 addition & 0 deletions pkg/table/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (c *DataColumn[T]) Accepts(tr Trace) error {
return nil
}

//nolint:revive
func (c *DataColumn[T]) String() string {
if c.Type.AsField() != nil {
return fmt.Sprintf("(column %s)", c.Name)
Expand Down
3 changes: 3 additions & 0 deletions pkg/table/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (p ZeroTest[E]) TestAt(row int, tr Trace) bool {
return val == nil || val.IsZero()
}

// String generates a human-readble string.
//
//nolint:revive
func (p ZeroTest[E]) String() string {
return fmt.Sprintf("%s", any(p.Expr))
}
Expand Down

0 comments on commit 29688b4

Please sign in to comment.