ZeStream / zestream-server

an open-sourced alternative to cloudinary [video streaming done ✅, image/audio under dev 🔨 ]
GNU General Public License v3.0
203 stars 41 forks source link

Lint the Codebase and Create CI/CD workflow for the same #32

Closed uzaxirr closed 1 year ago

uzaxirr commented 1 year ago

Currently the codebase is not properly linted, when we run golangci-lint run in the root of repository we get many errors, so it is desirable to fix them up and create a GitHub action workflow for the same to avoid bumping into this in future

Screenshot 2023-01-02 at 1 13 49 AM
Shofiya2003 commented 1 year ago

Hey! Can I work on the issue? Here, we need GitHub Action workflow for linting. Right?

uzaxirr commented 1 year ago

Hey @Shofiya2003

Yes, You can work on this. Assigning this to you right away

Here, we need GitHub Action workflow for linting. Right?

Yes we do need an workflow for linting and also you need to fix the currently existing issues (shown in the above screen-shot) that occurs when running a linter so that the GitHub actions checks may pass.

@abhishekraj272 should we remove the dev()function as it was used just for temporary testing and is currently being flagged by the linter

abskrj commented 1 year ago

yes, we can remove the dev function now

Shofiya2003 commented 1 year ago

Hey!

uzaxirr commented 1 year ago

Hey!

  • first I should resolve the errors we get when we run golangci-lint
  • use GitHub actions to set up the workflow for golang ci lint actions

Sounds like a plan!

chauhan17nitin commented 1 year ago

Hey!

  • first I should resolve the errors we get when we run golangci-lint
  • use GitHub actions to set up the workflow for golang ci lint actions

Sounds like a plan!

Have a suggestion here :thinking: , may be you guys can decide on it accordingly :sweat_smile:

i see if we will start resolving golangci-lint error here, that may take considerable amount of time, + at the same time other people will be committing un-linted code,

there is a param issues in golang-ci-lint configuration if we mark the new inside it as true, then it will only analyze the new coming code that it is correctly linted on not.

At first we can start with that and create a pipeline :green_circle: so that new coming code is correct, later on when old files code will be edited linting will come into play :smile: .

Just wanted to say we can do it progressively instead of resolving all errors in one go (which may be frustrating sometimes :disappointed: ).

At the end decision will be yours :100: .

abskrj commented 1 year ago

Yeah, sounds good

On Sat, 7 Jan 2023 at 6:36 PM, Nitin Chauhan @.***> wrote:

Hey!

  • first I should resolve the errors we get when we run golangci-lint
  • use GitHub actions to set up the workflow for golang ci lint actions

Sounds like a plan!

Have a suggestion here 🤔 , may be you guys can decide on it accordingly 😅

i see if we will start resolving golangci-lint error here, that may take considerable amount of time, + at the same time other people will be committing un-linted code,

there is a param issues in golang-ci-lint configuration if we mark the new inside it as true, then it will only analyze the new coming code that it is correctly linted on not.

At first we can start with that and create a pipeline 🟢 so that new coming code is correct, later on when old files code will be edited linting will come into play 😄 .

Just wanted to say we can do it progressively instead of resolving all errors in one go (which may be frustrating sometimes 😞 ).

At the end decision will be yours 💯 .

— Reply to this email directly, view it on GitHub https://github.com/ZeStream/zestream-server/issues/32#issuecomment-1374475611, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGO7IBRROIVZ5YP55FJGQLDWRFS6VANCNFSM6AAAAAATOI7DPA . You are receiving this because you were mentioned.Message ID: @.***>

Shofiya2003 commented 1 year ago

Alrighty