Clean code #148
Tests.yml
on: pull_request
check_compilation
1m 40s
check_style
7s
run_tests
0s
Annotations
2 errors and 12 warnings
check_compilation:
LobsterLang/app/Main.hs#L93
Not in scope: ‘AstOptimizer.fromOptimised’
|
check_compilation
Process completed with exit code 2.
|
check_style
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
check_style:
LobsterLang/src/CompiletoVm.hs#L304
Suggestion in getFnv in module CompiletoVm: Redundant bracket ▫︎ Found: "case\n (decodeOrFail byteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\nof\n Left _ -> (inst, byteString)\n Right (nByteString, _, val)\n -> (getFnv\n 0 byteStringAfterInst\n (inst\n ++\n [Vm.Push\n (Vm.Function\n functionInstruction (fromIntegral (val :: Int32) :: Int))]))\n where\n nbinstruction\n = case\n (decodeOrFail nByteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\n of\n Left _ -> 0\n Right (_, _, valu) -> (fromIntegral (valu :: Int32) :: Int)\n byteStringafterNbInst\n = case\n (decodeOrFail nByteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\n of\n Left _ -> nByteString\n Right (afterNbInst, _, _) -> afterNbInst\n functionInstruction\n = fst (getInstructionFunc nbinstruction byteStringafterNbInst [])\n byteStringAfterInst\n = snd (getInstructionFunc nbinstruction byteStringafterNbInst [])" ▫︎ Perhaps: "case\n (decodeOrFail byteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\nof\n Left _ -> (inst, byteString)\n Right (nByteString, _, val)\n -> getFnv\n 0 byteStringAfterInst\n (inst\n ++\n [Vm.Push\n (Vm.Function\n functionInstruction (fromIntegral (val :: Int32) :: Int))])\n where\n nbinstruction\n = case\n (decodeOrFail nByteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\n of\n Left _ -> 0\n Right (_, _, valu) -> (fromIntegral (valu :: Int32) :: Int)\n byteStringafterNbInst\n = case\n (decodeOrFail nByteString ::\n Either (BIN.ByteString, ByteOffset, String) (BIN.ByteString,\n ByteOffset, Int32))\n of\n Left _ -> nByteString\n Right (afterNbInst, _, _) -> afterNbInst\n functionInstruction\n = fst (getInstructionFunc nbinstruction byteStringafterNbInst [])\n byteStringAfterInst\n = snd (getInstructionFunc nbinstruction byteStringafterNbInst [])"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L323
Suggestion in getArg in module CompiletoVm: Redundant bracket ▫︎ Found: "[(Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int)))]" ▫︎ Perhaps: "[Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int))]"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L337
Suggestion in getArg in module CompiletoVm: Redundant bracket ▫︎ Found: "(fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile []))\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]" ▫︎ Perhaps: "fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile [])\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L342
Suggestion in getArg in module CompiletoVm: Redundant bracket ▫︎ Found: "inst ++ (fst (getFnv (- 1) remainingFile []))" ▫︎ Perhaps: "inst ++ fst (getFnv (- 1) remainingFile [])"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L366
Suggestion in getInstructionFunc in module CompiletoVm: Redundant bracket ▫︎ Found: "(fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile []))\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]" ▫︎ Perhaps: "fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile [])\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L397
Suggestion in getInstructionFunc in module CompiletoVm: Redundant bracket ▫︎ Found: "inst ++ (fst (getFnv (- 1) remainingFile []))" ▫︎ Perhaps: "inst ++ fst (getFnv (- 1) remainingFile [])"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L408
Suggestion in getDefinedValue in module CompiletoVm: Redundant bracket ▫︎ Found: "[(Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int)))]" ▫︎ Perhaps: "[Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int))]"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L422
Suggestion in getDefinedValue in module CompiletoVm: Redundant bracket ▫︎ Found: "(fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile []))\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]" ▫︎ Perhaps: "fst (getList (fromIntegral (lenList :: Int32) :: Int) remfile [])\n ++ [Vm.PushList (fromIntegral (lenList :: Int32) :: Int)]"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L447
Suggestion in getDefinedValue in module CompiletoVm: Redundant bracket ▫︎ Found: "inst ++ (fst (getFnv (- 1) remainingFile []))" ▫︎ Perhaps: "inst ++ fst (getFnv (- 1) remainingFile [])"
|
check_style:
LobsterLang/src/CompiletoVm.hs#L457
Suggestion in getList in module CompiletoVm: Redundant bracket ▫︎ Found: "[(Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int)))]" ▫︎ Perhaps: "[Vm.Push (IntVal (fromIntegral (val :: Int32) :: Int))]"
|
check_compilation
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, haskell-actions/setup@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|