Skip to content

Clean code

Clean code #150

Triggered via pull request February 17, 2024 18:46
Status Success
Total duration 4m 55s
Artifacts

Tests.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

16 warnings
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#L324
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#L355
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#L380
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#L429
Suggestion in getList 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/Parse.hs#L54
Suggestion in Parser in module Parse: Use newtype instead of data ▫︎ Found: "data Parser a\n = Parser {runParser :: Position\n -> String -> Either String (a, String, Position)}" ▫︎ Perhaps: "newtype Parser a\n = Parser {runParser :: Position\n -> String -> Either String (a, String, Position)}" ▫︎ Note: decreases laziness
check_style: LobsterLang/src/Parse.hs#L204
Suggestion in parseString in module Parse: Use <$ ▫︎ Found: "return (value ++ res') <* parseWhiteSpace" ▫︎ Perhaps: "(value ++ res') Data.Functor.<$ parseWhiteSpace"
check_style: LobsterLang/src/Vm.hs#L383
Suggestion in exec in module Vm: Redundant bracket ▫︎ Found: "ListVal (snd (createList x stack []))\n : (fst (createList x stack []))" ▫︎ Perhaps: "ListVal (snd (createList x stack [])) : fst (createList x stack [])"
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, andstor/file-existence-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
run_tests
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/.
run_tests: LobsterLang/test/AstEvalSpec.hs#L1
The export item ‘module AstEvalSpec’ is missing an export list
run_tests: LobsterLang/test/AstOptimizerSpec.hs#L1
The export item ‘module AstOptimizerSpec’ is missing an export list
run_tests: LobsterLang/test/CompilerSpec.hs#L1
The export item ‘module CompilerSpec’ is missing an export list
run_tests: LobsterLang/test/CompilerSpec.hs#L11
The import of ‘Data.Maybe’ is redundant
run_tests: LobsterLang/test/ParserSpec.hs#L1
The export item ‘module ParserSpec’ is missing an export list
run_tests: LobsterLang/test/VmSpec.hs#L1
The export item ‘module VmSpec’ is missing an export list