Skip to content

spell: turn on pre-commit auto spell checker #1184

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dmyger
Copy link
Collaborator

@dmyger dmyger commented Jul 8, 2025

Turning on automatic static code analyzer: check words misspell for code files.

Closes #TNTP-3105

Come with second part in #1185

  • Well-written commit messages (see documentation how to write a commit message)

@dmyger dmyger force-pushed the dmyger/tntp-3105_turn_on_spell_checker_for_code branch from 370cdba to c04ce9f Compare July 10, 2025 12:09
@dmyger dmyger changed the title spell: turn on precommit spell checker for Python spell: turn on pre-commit auto spell checker Jul 10, 2025
@dmyger dmyger requested a review from oleg-jukovec July 10, 2025 12:11
@dmyger dmyger marked this pull request as ready for review July 10, 2025 12:11
@dmyger dmyger mentioned this pull request Jul 10, 2025
@dmyger dmyger force-pushed the dmyger/tntp-3105_turn_on_spell_checker_for_code branch from 2b4a206 to 59e26ec Compare July 10, 2025 13:03
@dmyger dmyger added the full-ci Enables full ci tests label Jul 10, 2025
@dmyger dmyger force-pushed the dmyger/tntp-3105_turn_on_spell_checker_for_code branch 3 times, most recently from b4547b7 to 20a96d7 Compare July 16, 2025 10:27
SKIP: golangci-lint-full
with:
extra_args: --all-files --from-ref=${{ env.BASE_BRANCH }} --to-ref=HEAD --hook-stage=manual
# - name: pre-commit checks (diff)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks a bit strange that this PR disables this job and the next PR (#1185) enables it back and it is the only change #1185 does. Why don't we just keep it intact here, so #1185 would not be needed at all.

equalf
errf
etcd*
etcdserver
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks unnecessary as previous entry matches it.

tlsdialer
tmpl
tnt+
tntp
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks unnecessary as previous entry matches it.

@@ -145,7 +145,7 @@ func startEtcd(t *testing.T, opts etcdOpts) integration.LazyCluster {
func etcdPut(t *testing.T, etcd *clientv3.Client, key, value string) {
t.Helper()
var (
presp *clientv3.PutResponse
presp *clientv3.PutResponse // spell-checker:ignore presp
Copy link
Contributor

Choose a reason for hiding this comment

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

In 'cli/cluster/integration_test.go' the same identifier changed to pResp. Please consider single approach.

@@ -273,10 +273,10 @@ func TestConnectEtcd(t *testing.T) {
etcdPut(t, etcd, "foo", "bar")

ctx, cancel := context.WithTimeout(context.Background(), timeout)
gresp, err := etcd.Get(ctx, "foo")
resp, err := etcd.Get(ctx, "foo")
Copy link
Contributor

Choose a reason for hiding this comment

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

In 'cli/cluster/integration_test.go' the similar identifier presp changed to pResp. Please consider similar approach here.

@@ -502,6 +502,7 @@ func (publisher EtcdAllDataPublisher) Publish(revision int64, data []byte) error
txn = txn.If(cmps...)
}

// spell-checker:ignore tresp
Copy link
Contributor

Choose a reason for hiding this comment

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

In 'cli/cluster/integration_test.go' the similar identifier presp changed to pResp. Please consider similar approach here.

@@ -849,12 +850,12 @@ func СonnectEtcdUriOpts(
func DoOnStorage(connOpts ConnectOpts, opts libconnect.UriOpts,
tarantoolFunc func(tarantool.Connector) error, etcdFunc func(*clientv3.Client) error,
) error {
etcdcli, errEtcd := СonnectEtcdUriOpts(opts, connOpts)
etcdcli, errEtcd := ConnectEtcdUriOpts(opts, connOpts)
Copy link
Contributor

Choose a reason for hiding this comment

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

So it turns out that we had public identifier with cyrillic symbol. Nice catch! )

if errEtcd == nil {
return etcdFunc(etcdcli)
}

conn, errTarantool := СonnectTarantool(opts, connOpts)
conn, errTarantool := ConnectTarantool(opts, connOpts)
Copy link
Contributor

Choose a reason for hiding this comment

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

And it's not alone! )))

@@ -155,7 +155,7 @@ def test_promote_cconfig_failovers(
"manual-failover-2",
"election-failover-1",
"election-failover-2",
"eleciton-failover-3",
"eleciton-failover-3", # spell-checker:disable-line
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"eleciton-failover-3", # spell-checker:disable-line
"election-failover-3",

@@ -44,7 +46,7 @@ def skip_no_helpers(request: pytest.FixtureRequest, completion: Completion) -> N


def pytest_configure(config):
config.addinivalue_line(
config.addinivalue_line( # cSpell:words addinivalue
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's possible I'd suggest to introduce separate project-words file for integration tests directory. All pytest identifiers that are currently in use could be listed there.

dmyger added 5 commits July 22, 2025 13:15
Part of #TNTP-3105
Due to formatting changes, it triggers the linter's errors.
FIXME: turn on the checking with the following PR.

Part of #TNTP-3105
@dmyger dmyger force-pushed the dmyger/tntp-3105_turn_on_spell_checker_for_code branch from 20a96d7 to 707afff Compare July 22, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables full ci tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants