-
Notifications
You must be signed in to change notification settings - Fork 11
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
Impr/more linters #220
base: master
Are you sure you want to change the base?
Impr/more linters #220
Conversation
Fantastic! If you clone the individual Pion repos and run that version of Once all the repos are fixed we can bump here! |
Yes, A lot actually :) but I'm fixing everything, I might update the settings a bit if I see issues (like duplicates). |
That makes sense! Want to open a PR to fix settings? Happy to approve right away I don’t want to break things for existing code though. If we enable more linters no one can land code until this is all done |
After giving it some thought, I think this is the best approach:
The main issue right now is that some linters require minor refactoring. For example:
or
or
However, most issues are just whitespace or "pretty" lints. I'm unsure whether to make one large PR per repo (addressing all tasks) or break it down into smaller PRs. do we have a merge queue? I'm happy to go with either approach! |
Manually modifying and merging sounds great! When we update it in this repo it will be a no-op in all the other repos. I think doing Refactoring is fine with me! Whatever makes the code most maintainable is my goal. I think a high cyclomatic complexity is fine if the code is more readable. Lots of small 'helper' functions are more complicated IMO. I found https://minds.md/zakirullin/cognitive really helpful recently. My goal with Pion is to make it as readable/maintainable as possible. If we have to disable some linters or do |
That was a good read, Thanks, Noted. Do we go with a single PR for each Repo, or do I break it down to smaller PRs? (based on the lint type). |
What do you think of two PRs? One with all the easy changes. Whitespace/no functional changes. One with things you aren't sure about. If you make your branch directly on the Pion repos (you should access) I can adjust/fix things and merge them. Keep things as easy as possible :) |
Oh, I see this will work. Thanks! |
Should we add I see many issues when I enable it. Example:
Edit: Ignore all the forced pushes :) I was fixing my commit messages lint (Added a pre-push hook so it doesn't happen again). |
b23fa7e
to
0d8a499
Compare
0d8a499
to
ea4c59e
Compare
ea4c59e
to
166a64a
Compare
Perhaps later? It's not like you've got too little on your plate. |
personally suggest disabling the following linters:
|
cd245ed
to
a28f315
Compare
a28f315
to
7861e34
Compare
Okay Disabled them, I think I'm good to go with working on the repos now? Maybe last thing. Should we ignore this or upgrade to
|
Please don't require recent Go versions without a very good reason. It's extra hassle for everyone. |
Okay, this makes sense, I think this is good enough for now?! |
5cf0182
to
202b4ba
Compare
Upgrade `golangci` version, Introduce more linters. Relates to pion/.goassets#220
9654cfd
to
d5b3ad4
Compare
This enables all linters relevant to Pion, updates the golangci-lint version, and removes deprecated linters.
Updated repos: