Skip to content

Commit

Permalink
Quality of life fixes
Browse files Browse the repository at this point in the history
This fix updates the Go toolchain and fixes some underlying script
to match the behavior that is expected by the updated toolchain.
  • Loading branch information
nadimkobeissi committed Sep 8, 2024
1 parent 8b8e568 commit a79c879
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 237 deletions.
37 changes: 6 additions & 31 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
skip-files:
issues:
exclude-files:
- main_test.go
- libpeg.go
- libcoq.go
Expand Down Expand Up @@ -27,42 +27,17 @@ linters:
- misspell
- nakedret
- prealloc
- exportloopref
- copyloopvar
- unconvert
- unparam
- whitespace

linters-settings:
gocritic:
enabled-checks:
- appendAssign
- caseOrder
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- flagDeref
- captLocal
- defaultCaseOrder
- elseif
- ifElseChain
- regexpMust
- sloppyLen
- switchTrue
- typeSwitchVar
- underef
- unlambda
- unslice
- argOrder
- badCall
- badCond
- evalOrder
- exitAfterDefer
- flagName
- mapKey
- nilValReturn
- octalLiteral
- offBy1
- regexpPattern
- sloppyReassign
- truncateCmp
Expand All @@ -72,15 +47,15 @@ linters-settings:
- dupImport
- methodExprCall
- initClause
- newDeref
- nestingReduce
- stringXbytes
- unlabelStmt
- typeUnparen
- unnecessaryBlock
- valSwap
- wrapperFunc
- yodaStyleExpr
disabled-checks:
- assignOp
- singleCaseSwitch
goconst:
min-len: 12
funlen:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dep:
@/bin/echo -n "[Verifpal] Installing dependencies"
@go mod download github.com/logrusorgru/aurora
@/bin/echo -n "."
@go get -u github.com/mna/pigeon
@go install github.com/mna/pigeon@latest
@go mod download github.com/mna/pigeon
@/bin/echo -n "."
@go mod download github.com/spf13/cobra
Expand Down
4 changes: 2 additions & 2 deletions cmd/vplogic/construct.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ func constructKnowledgeMapRenderMessage(
for _, c := range blck.Message.Constants {
i := valueGetKnowledgeMapIndexFromConstant(valKnowledgeMap, c)
if i < 0 {
return valKnowledgeMap, fmt.Errorf(fmt.Sprintf(
return valKnowledgeMap, fmt.Errorf(
"%s sends unknown constant to %s (%s)",
principalGetNameFromID(blck.Message.Sender),
principalGetNameFromID(blck.Message.Recipient),
prettyConstant(c),
))
)
}
c = valKnowledgeMap.Constants[i]
senderKnows := false
Expand Down
Loading

0 comments on commit a79c879

Please sign in to comment.