Code Monkey home page Code Monkey logo

Comments (8)

Xazin avatar Xazin commented on May 22, 2024 1

The pre commit check fails a commit if one check fails. But hooks, like a CICD pipeline, should never introduce code changes.

Instead when you make a commit, the pre commit hook should be triggered, it will run the checks (formatter, analyzer) and tell you what's wrong.

from collaction_app.

rubenhorn avatar rubenhorn commented on May 22, 2024 1

If it's possible to show the output of these commands that would be a nice, since it would be kind of required to fix what stopped the commit from going through.

I also think we should use pre-push hooks instead of pre-commit hooks, since formatting and analyzing the code could take a considerable amount of time (many seconds).
We really only need to ensure that the code is "OK" when it is being pushed. Individual commits don't have to be checked in my opinion and we don't want to discourage frequent commits.

from collaction_app.

rubenhorn avatar rubenhorn commented on May 22, 2024 1

Yes, I think there is no such thing as Git without Bourne (Again) Shell aka (ba)sh

from collaction_app.

rubenhorn avatar rubenhorn commented on May 22, 2024

May replace https://github.com/CollActionteam/collaction_app/blob/development/cl.sh

from collaction_app.

yasht01 avatar yasht01 commented on May 22, 2024

Does the --dry-run flag work now as it does not come up as a flag on running flutter format --help?
If the intention is to not fix the code and only send the exit code then we can use -o none flag as this does the intended thing.

from collaction_app.

yasht01 avatar yasht01 commented on May 22, 2024

Also, we can just run flutter format --set-exit-if-changed . if we need to automatically fix any style errors.

from collaction_app.

yasht01 avatar yasht01 commented on May 22, 2024

Okay so do we need to show the files that need to be formatted in the output or it should just return with the exit code?

from collaction_app.

yasht01 avatar yasht01 commented on May 22, 2024

(should work with both bash and cmd)

@rubenhorn I think Git for Windows installs Git bash by default so will there be a need to create cmd script?

from collaction_app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.