Fix linter workflow and autocalibration for lines & words match (#614)
* Fix autocalibration for lines & words match * Fix golangci-lint workflow
This commit is contained in:
parent
5c489aea78
commit
3328a284d2
7
.github/workflows/golangci-lint.yml
vendored
7
.github/workflows/golangci-lint.yml
vendored
@ -11,9 +11,12 @@ jobs:
|
|||||||
name: lint
|
name: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 1.17
|
||||||
|
- uses: actions/checkout@v3
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||||
version: v1.29
|
version: v1.29
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
- master
|
- master
|
||||||
- New
|
- New
|
||||||
- Changed
|
- Changed
|
||||||
|
- Fixed issue with autocalibration of line & words filter
|
||||||
|
|
||||||
- v1.5.0
|
- v1.5.0
|
||||||
- New
|
- New
|
||||||
|
|||||||
@ -113,6 +113,7 @@ func (j *Job) Calibrate(input map[string][]byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CalibrateIfNeeded runs a self-calibration task for filtering options (if needed) by requesting random resources and
|
// CalibrateIfNeeded runs a self-calibration task for filtering options (if needed) by requesting random resources and
|
||||||
|
//
|
||||||
// configuring the filters accordingly
|
// configuring the filters accordingly
|
||||||
func (j *Job) CalibrateIfNeeded(host string, input map[string][]byte) error {
|
func (j *Job) CalibrateIfNeeded(host string, input map[string][]byte) error {
|
||||||
j.calibMutex.Lock()
|
j.calibMutex.Lock()
|
||||||
@ -192,7 +193,7 @@ func (j *Job) calibrateFilters(responses []Response, perHost bool) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ = j.Config.MatcherManager.AddFilter("word", strconv.FormatInt(baselineSize, 10), false)
|
_ = j.Config.MatcherManager.AddFilter("word", strconv.FormatInt(baselineWords, 10), false)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +227,7 @@ func (j *Job) calibrateFilters(responses []Response, perHost bool) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ = j.Config.MatcherManager.AddFilter("line", strconv.FormatInt(baselineSize, 10), false)
|
_ = j.Config.MatcherManager.AddFilter("line", strconv.FormatInt(baselineLines, 10), false)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user