Skip to content
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

Stylish Haskell in CI #4803

Merged
merged 2 commits into from
Jan 26, 2023
Merged

Stylish Haskell in CI #4803

merged 2 commits into from
Jan 26, 2023

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Jan 18, 2023

Run a stylish-haskell check in CI. There is one step which checks all tracked Haskell file, but it is not required. A second step checks all tracked Haskell files that have changed since the branch point vs `master, which is required.

There is a demo of if tailing the required check here:

https://github.com/input-output-hk/cardano-node/actions/runs/3947442222/jobs/6756264902

Sample output:

diff --git a/cardano-api/src/Cardano/Api/Fees.hs b/cardano-api/src/Cardano/Api/Fees.hs
index 138754a7..25b1d3ba 100644
--- a/cardano-api/src/Cardano/Api/Fees.hs
+++ b/cardano-api/src/Cardano/Api/Fees.hs
@@ -55,8 +55,8 @@ import           Data.Set (Set)
 import qualified Data.Set as Set
 import qualified Data.Text as Text
 import           GHC.Records (HasField (..))
-import           Numeric.Natural
 import           Lens.Micro ((^.))
+import           Numeric.Natural
 
 import           Control.Monad.Trans.Except
 import qualified Prettyprinter as PP
@@ -947,7 +947,7 @@ makeTransactionBodyAutoBalance eraInMode systemstart history pparams
     -- 4. balance the transaction and update tx change output
     txbody0 <-
       first TxBodyError $ createAndValidateTransactionBody txbodycontent
-        { txOuts = txOuts txbodycontent ++ 
+        { txOuts = txOuts txbodycontent ++
                    [TxOut changeaddr (lovelaceToTxOutValue 0) TxOutDatumNone ReferenceScriptNone]
             --TODO: think about the size of the change output
             -- 1,2,4 or 8 bytes?

@newhoggy newhoggy force-pushed the newhoggy/stylish-haskell-in-ci branch 23 times, most recently from ec160b2 to f176efc Compare January 18, 2023 09:16
@newhoggy newhoggy marked this pull request as ready for review January 18, 2023 09:29
@newhoggy newhoggy requested review from Jimbo4350 and a team as code owners January 18, 2023 09:29
@newhoggy newhoggy force-pushed the newhoggy/stylish-haskell-in-ci branch from f176efc to cdda86f Compare January 24, 2023 07:41
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would get in touch with the benchmarking team before imposing stylish-haskell on them

cardano-client-demo
cardano-node-chairman
cardano-tracer
trace-resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the benchmarking team uses stylish-haskell or any style guide for that matter. cc: @kosyrevSerge

Copy link
Contributor Author

@newhoggy newhoggy Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the include-list functionality is for them to be able to opt-out.

@newhoggy newhoggy force-pushed the newhoggy/stylish-haskell-in-ci branch from cdda86f to 59631ff Compare January 25, 2023 07:17
@newhoggy newhoggy merged commit da5ff4e into master Jan 26, 2023
@iohk-bors iohk-bors bot deleted the newhoggy/stylish-haskell-in-ci branch January 26, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants