Skip to content

Commit

Permalink
chore: fixed some linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vgarvardt committed Jan 5, 2023
1 parent f227ea3 commit 8d91b08
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 25 deletions.
29 changes: 16 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true

[*.md]
indent_size = 2
trim_trailing_whitespace = false

[*.{yml,yaml,raml,yml.dist,yml.hbs,json}]
indent_size = 2
[*.go]
indent_style = tab
indent_size = 4
ij_continuation_indent_size = 4
ij_go_GROUP_CURRENT_PROJECT_IMPORTS = true
ij_go_add_parentheses_for_single_import = true
ij_go_group_stdlib_imports = true
ij_go_import_sorting = gofmt
ij_go_local_group_mode = project
ij_go_move_all_imports_in_one_declaration = true
ij_go_move_all_stdlib_imports_in_one_group = true

[{*.go,go.mod}]
[go.mod]
indent_style = tab
indent_size = 4
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
FILTER_REGEX_EXCLUDE: '.*assets/posts/.*'
# go validator works pretty bad in super-linter, we'll use the original one
VALIDATE_GO: false
# no need to detect duplicates in a tiny library
VALIDATE_JSCPD: false
# do not validate SQL - linters are pretty useless in case of this library,
# and the functionality is tested using integration tests
VALIDATE_SQL: false
Expand Down
8 changes: 4 additions & 4 deletions pgx3adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func runTests(t *testing.T, adapter pgAdapter.Adapter, table string) {

query := fmt.Sprintf(`
CREATE TABLE %[1]s (
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
)`, table)
err := adapter.Exec(context.TODO(), query)
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions pgx4adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func runTests(t *testing.T, adapter pgAdapter.Adapter, table string) {

query := fmt.Sprintf(`
CREATE TABLE %[1]s (
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
)`, table)
err := adapter.Exec(context.TODO(), query)
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions sqladapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func runTests(t *testing.T, adapter pgAdapter.Adapter, table string) {

query := fmt.Sprintf(`
CREATE TABLE %[1]s (
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
id SERIAL NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
data TEXT NOT NULL,
CONSTRAINT %[1]s_pkey PRIMARY KEY (id)
)`, table)
err := adapter.Exec(context.TODO(), query)
require.NoError(t, err)
Expand Down

0 comments on commit 8d91b08

Please sign in to comment.