Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: apply codacy fixes #3935

Merged
merged 14 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/algolia/algoliasearch-client-go/v4

go 1.21
go 1.22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

23 even, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can people using go1.22 still use this lib if we use 1.23 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so yes, as long as we don't depend on std introduced in 1.21+

I guess we should add multi version testing to Go too D:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried it with the CTS: go: module ../../../clients/algoliasearch-client-go requires go >= 1.23 (running go 1.22.8)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should stick to a low version

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki nice then let's keep 1.21 because that's what we settled on at the major release


require github.com/go-playground/validator/v10 v10.22.1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { expect, test, vi } from 'vitest';

import { LogLevelEnum } from '../../client-common/src/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { describe, expect, test, vi } from 'vitest';

import { createNullLogger } from '../../logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import { beforeEach, describe, expect, test, vi } from 'vitest';

import { LogLevelEnum } from '@algolia/client-common';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint no-console: 0 */
import type { LogLevelType, Logger } from '@algolia/client-common';
import { LogLevelEnum } from '@algolia/client-common';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineWorkspace } from 'vitest/config';

export default defineWorkspace([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ describe('status code handling', () => {
const data = Buffer.from('äöü');

// create a test response stream that is chunked inside a unicode character
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function* generate() {
yield data.subarray(0, 3);
yield data.subarray(3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ describe('status code handling', () => {
const data = Buffer.from('äöü');

// create a test response stream that is chunked inside a unicode character
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function* generate() {
yield data.subarray(0, 3);
yield data.subarray(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function createHttpRequester({
function send(request: EndRequest): Promise<Response> {
return new Promise((resolve) => {
let responseTimeout: NodeJS.Timeout | undefined;
// eslint-disable-next-line prefer-const -- linter thinks this is not reassigned
let connectTimeout: NodeJS.Timeout | undefined;
const url = new URL(request.url);
const path = url.search === null ? url.pathname : `${url.pathname}${url.search}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-unresolved
import { defineConfig } from 'vitest/config';

export default defineConfig({
Expand Down
Loading
Loading