Git Product home page Git Product logo

Comments (8)

chshersh avatar chshersh commented on June 17, 2024 1

Hey @aleeusgr, thanks for the contribution!

Adding hlint would be nice indeed, so feel free to add it after ๐Ÿ™‚
I haven't looked intro fourmolu and haven't created the config that satisfies my taste so no rush in adding formatter here ๐Ÿ‘๐Ÿป

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

I started to work on this. Thank you for the opportunity.

I will post my thoughts, feel free to ignore or comment

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

i've met the idea of pre-commit hooks here
however this repo does not use nix, so it would seem pre-commit is a tool I have to have locally in order for me to be able to test how the config file works.

$ nix shell nixpkgs#pre-commit
$ pre-commit --version
pre-commit 2.20.0

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

reading this guide
The hooks are all stored in the hooks subdirectory of the Git directory. In most projects, thatโ€™s .git/hooks.
The pre-commit hook is run first, before you even type in a commit message. Itโ€™s used to inspect the snapshot thatโ€™s about to be committed.

This guide

You can generate a very basic configuration using pre-commit sample-config
pre-commit run : this is what pre-commit runs by default when committing. This will run all hooks against currently staged files.

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

$ pre-commit sample-config > .pre-commit-config.yaml
$ pre-commit run

[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...........................................(no files to check)Skipped
Check for added large files..............................................Passed

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

#72

from iris.

aleeusgr avatar aleeusgr commented on June 17, 2024

here are a hooks for hlint and styish-haskell
and fourmolu

I will add them when PR#72 is merged or upon confirmation that I am doing it right.
Thank you

from iris.

chshersh avatar chshersh commented on June 17, 2024

Closed in #72

from iris.

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.