Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: create 10-cautious #38
base: main
Are you sure you want to change the base?
feat: create 10-cautious #38
Changes from all commits
aefa806
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would be clearer to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
staticcheck
for example formats it like that:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also yield the question of possible redundancy between this and
staticcheck
. It might be worth enabling thestaticcheck
ruleSA1019
and seeing what's missing. IMHO contributing to this rule instead of maintaining a custom list of deprecated pkg is better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your valuable feedbacks here.
I will indeed have to validate the std lib ones against staticcheck
The problem I have is staticcheck and its maintainer is that the project is barely maintained and maintainer refuses PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't know that. Then it's probably good to have a separate check :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here
https://github.com/dominikh/.github/blob/main/CONTRIBUTING.md#pull-requests
I dislike the "I don't have time to review your bad code. I prefer to code everything by my own" tone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, indeed.
This whole document is quite fascinating. I have many feelings about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you seen exptostd for this particular one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I did. I even filled an issue on the exptostd repository last week. It was about something that led me to write this here.
I had also opened one on usestdlibvar about syscall constants.
This PR needs some reworks. I thought about mentioning exptostd and keep a comment in the file
Maybe it's simply because exptostd was not yet available via golangci-lint when I started working on these changes a few weeks ago
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I did. I even filled an issue on the exptostd repository last week. It was about something that led me to write this here.
I had also opened one on usestdlibvar about syscall constants.
This PR needs some reworks. I thought about mentioning exptostd and keep a comment in the file
Maybe it's simply because exptostd was not yet available via golangci-lint when I started working on these changes a few weeks ago
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mmorel-35
Happy new year, good to see you.
I saw your recent PR on gopsutil
I noted the golangci-lint of this project was interesting when dealing with package replacement and suggestions.
gomodguard was used. I barely faced it and it intrigued me. depguard was the one, I'm used to see or use.
It was interesting because I have this PR here, that I worked lately and opened yesterday evening.
I dug deeper and found out that you were the one who set it up here
So here I am. I would like to know if you would recommend using it over depguard, and why.
I will take a look by my own, of course. But I would like to get a feedback from you.
Then I might update this PR by switching to gomodguard
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also @nobe4, I'm curious about your possible feedback on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of those linters have there interest.
I would say that gomodguard is able to provide a list of possible alternative package as for io/ioutil that shall be replaced with io or os or github.com/pkg/errors with errors or fmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Thanks
I will also take a look at the way these errors are suggested. I feel like gomodguard might provide a better wording, at least less aggressive than depguard