Skip to content

Linting, formatting and error wrappers#45

Merged
bugfest merged 5 commits intobugfest:masterfrom
lexfrei:master
Apr 9, 2023
Merged

Linting, formatting and error wrappers#45
bugfest merged 5 commits intobugfest:masterfrom
lexfrei:master

Conversation

@lexfrei
Copy link
Copy Markdown
Contributor

@lexfrei lexfrei commented Apr 8, 2023

Small improvements:

  • Linting
  • Formatting
  • Errors creating
  • fmt removed where possible
  • github.com/cockroachdb/errors used as a replacement for deprecated "std" errors

Signed-off-by: Aleksey Sviridkin <a.sviridkin@sdventures.com>
@lexfrei
Copy link
Copy Markdown
Contributor Author

lexfrei commented Apr 8, 2023

It looks like the log.Info() is misused. Probably, we can drop all direct "fmt" imports
Proof.

Signed-off-by: Aleksey Sviridkin <a.sviridkin@sdventures.com>
@lexfrei
Copy link
Copy Markdown
Contributor Author

lexfrei commented Apr 8, 2023

Looks like there are a lot of commented code lines. Do you need them as notes or should they be removed?

@bugfest
Copy link
Copy Markdown
Owner

bugfest commented Apr 8, 2023

Thanks @lexfrei ! Quite a job here. I do agree to drop commented lines of code if I spot anything interesting that otherwise I forget I'll put a comment

@bugfest bugfest changed the title Little changes Linting, formatting and error wrappers Apr 8, 2023
@bugfest bugfest added the enhancement New feature or request label Apr 8, 2023
@bugfest bugfest added this to the 0.10.x milestone Apr 8, 2023
@lexfrei lexfrei changed the title Linting, formatting and error wrappers [WIP] Linting, formatting and error wrappers Apr 8, 2023
@lexfrei lexfrei marked this pull request as draft April 8, 2023 20:04
Aleksey Sviridkin added 3 commits April 9, 2023 00:59
Signed-off-by: Aleksey Sviridkin <a.sviridkin@sdventures.com>
Signed-off-by: Aleksey Sviridkin <a.sviridkin@sdventures.com>
Signed-off-by: Aleksey Sviridkin <a.sviridkin@sdventures.com>
@lexfrei
Copy link
Copy Markdown
Contributor Author

lexfrei commented Apr 9, 2023

"io/ioutil" dropped as deprecated, replaced with os

For now, I think, the main cleanup is done. There are a lot of possible improvements, but the biggest part of simple changes is done.

In this work, I used this golangci-lint config.
You can add it to your repo along with this action. But for now, it will fail.

@lexfrei lexfrei marked this pull request as ready for review April 9, 2023 13:06
@lexfrei lexfrei changed the title [WIP] Linting, formatting and error wrappers Linting, formatting and error wrappers Apr 9, 2023
@bugfest
Copy link
Copy Markdown
Owner

bugfest commented Apr 9, 2023

"io/ioutil" dropped as deprecated, replaced with os

For now, I think, the main cleanup is done. There are a lot of possible improvements, but the biggest part of simple changes is done.

In this work, I used this golangci-lint config. You can add it to your repo along with this action. But for now, it will fail.

Thanks for the suggestion @lexfrei - I've opened #46 track/implement the action.

Will run the build and merge when it finshes. Thanks for all this work!!

@bugfest bugfest merged commit 382a511 into bugfest:master Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants