Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -57,6 +57,7 @@ func TestGenerate(t *testing.T) {
checkFunc: func(t *testing.T, key any) {
rsaKey, ok := key.(*rsa.PrivateKey)
require.True(t, ok, "expected *rsa.PrivateKey, got %T", key)
bitSize := rsaKey.N.BitLen()
assert.GreaterOrEqual(t, bitSize, 2047, "RSA key too small")
assert.LessOrEqual(t, bitSize, 2048, "RSA key too large")
@@ -68,6 +69,7 @@ func TestGenerate(t *testing.T) {
checkFunc: func(t *testing.T, key any) {
rsaKey, ok := key.(*rsa.PrivateKey)
require.True(t, ok, "expected *rsa.PrivateKey, got %T", key)
bitSize := rsaKey.N.BitLen()
assert.GreaterOrEqual(t, bitSize, 4095, "RSA key too small")
assert.LessOrEqual(t, bitSize, 4096, "RSA key too large")
@@ -116,6 +118,7 @@ func TestGenerateConcurrency(t *testing.T) {
t.Parallel()
const numGoroutines = 10
errorsChan := make(chan error, numGoroutines)
for range numGoroutines {
@@ -125,10 +128,12 @@ func TestGenerateConcurrency(t *testing.T) {
errorsChan <- err
return
}
if key == nil {
errorsChan <- errors.New("generated key is nil")
return
}
errorsChan <- nil
}()
}