chore: Update linter to lint subprojects and examples. #941
haskell-ci.yml
on: push
fourmolu
8s
hlint
16s
Matrix: linux
Annotations
1 error and 10 warnings
|
hlint
HLint failed with status: 1. Warning (3), Suggestion (7)
|
|
hlint:
dataframe-persistent/tests/PersistentTests.hs#L242
Suggestion in testEmptyResultSet in module PersistentTests: Use null ▫︎ Found: "length cols > 0" ▫︎ Perhaps: "not (null cols)" ▫︎ Note: increases laziness
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent/TH.hs#L193
Warning in camelToSnake in module DataFrame.IO.Persistent.TH: Use isAsciiUpper ▫︎ Found: "c >= 'A' && c <= 'Z'" ▫︎ Perhaps: "isAsciiUpper c"
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent/TH.hs#L80
Suggestion in deriveEntityToDataFrame in module DataFrame.IO.Persistent.TH: Use : ▫︎ Found: "[instanceDec] ++ concat dataframeExprs" ▫︎ Perhaps: "instanceDec : concat dataframeExprs"
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent/TH.hs#L74
Suggestion in deriveEntityToDataFrame in module DataFrame.IO.Persistent.TH: Redundant bracket ▫︎ Found: "\" :: Expr \" <> (show ty)" ▫︎ Perhaps: "\" :: Expr \" <> show ty"
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent/TH.hs#L74
Suggestion in deriveEntityToDataFrame in module DataFrame.IO.Persistent.TH: Redundant bracket ▫︎ Found: "((nm <> \" :: Expr \" <> (show ty)))" ▫︎ Perhaps: "(nm <> \" :: Expr \" <> (show ty))"
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent.hs#L218
Warning in toPersistent in module DataFrame.IO.Persistent: Redundant return ▫︎ Found: "do let rowCount = nRows df\n keys <- forM [0 .. rowCount - 1]\n $ \\ i\n -> do case rowToEntity i df of\n Left err\n -> error $ \"Failed to convert row \" <> show i <> \": \" <> err\n Right entity -> insert (entityVal entity)\n return keys" ▫︎ Perhaps: "do let rowCount = nRows df\n forM [0 .. rowCount - 1]\n $ \\ i\n -> do case rowToEntity i df of\n Left err\n -> error $ \"Failed to convert row \" <> show i <> \": \" <> err\n Right entity -> insert (entityVal entity)"
|
|
hlint:
dataframe-persistent/src/DataFrame/IO/Persistent.hs#L2
Warning in module DataFrame.IO.Persistent: Unused LANGUAGE pragma ▫︎ Found: "{-# LANGUAGE BangPatterns #-}"
|
|
hlint:
examples/Iris.lhs#L335
Suggestion in main in module Main: Redundant $ ▫︎ Found: "HT.asTensor $ testLabels" ▫︎ Perhaps: "HT.asTensor testLabels"
|
|
hlint:
examples/Iris.lhs#L334
Suggestion in main in module Main: Redundant $ ▫︎ Found: "HT.asTensor $ trainLabels" ▫︎ Perhaps: "HT.asTensor trainLabels"
|
|
hlint:
examples/Chipotle.hs#L65
Suggestion in main in module Main: Redundant bracket ▫︎ Found: "(F.lift (maybe False (T.isInfixOf \"Guacamole\")) choice_description)\n .&& (item_name .== \"Chicken Bowl\")" ▫︎ Perhaps: "F.lift (maybe False (T.isInfixOf \"Guacamole\")) choice_description\n .&& (item_name .== \"Chicken Bowl\")"
|