Skip to content

Commit

Permalink
tweaks for better testing
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jun 3, 2020
1 parent 60deecf commit a999c45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ else
echo -e "${GREEN}PASSED race detection${NC}"
fi

echo "Running fuzz checks..."
pushd string || exit
go-fuzz-build
go-fuzz &
sleep 60
pkill -9 go-fuzz
popd || exit

pushd processor || exit
go-fuzz-build
go-fuzz &
sleep 60
pkill -9 go-fuzz
popd || exit

echo "Building application..."
go build -ldflags="-s -w" || exit

Expand Down
8 changes: 4 additions & 4 deletions processor/snippet.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
)

const (
SnipSideMax int = 10 // Defines the maximum bytes either side of the match we are willing to return
SnipSideMax int = 10 // Defines the maximum bytes either side of the match we are willing to return
// The below are used for adding boosts to match conditions of snippets to hopefully produce the best match
PhraseHeavyBoost = 20
SpaceBoundBoost = 5
ExactMatchBoost = 5
PhraseHeavyBoost = 20
SpaceBoundBoost = 5
ExactMatchBoost = 5
)

type bestMatch struct {
Expand Down

0 comments on commit a999c45

Please sign in to comment.