[refactor] Combine brackets
and within
#64
Annotations
9 warnings
hlint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
hlint:
brat/Brat/Parser.hs#L570
Suggestion in expr' in module Brat.Parser: Avoid lambda using `infix` ▫︎ Found: "(\\ fc -> spanFC fc juxtFC)" ▫︎ Perhaps: "(`spanFC` juxtFC)"
|
hlint:
brat/Brat/Checker/Helpers.hs#L120
Suggestion in pullPorts in module Brat.Checker.Helpers: Use uncurry ▫︎ Found: "\\ (pulled, rest) -> pulled ++ rest" ▫︎ Perhaps: "uncurry (++)" ▫︎ Note: increases laziness
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L56
Suggestion in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "let\n Pos closeLine closeCol = (end fc)\n closeFC\n = FC (Pos closeLine (closeCol - 1)) (Pos closeLine closeCol)\nin\n skipChars\n (i - 1) (bts ++ [FlatTok (Token closeFC (closeTok b))] ++ rest)" ▫︎ Perhaps: "let\n Pos closeLine closeCol = end fc\n closeFC\n = FC (Pos closeLine (closeCol - 1)) (Pos closeLine closeCol)\nin\n skipChars\n (i - 1) (bts ++ [FlatTok (Token closeFC (closeTok b))] ++ rest)"
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L94
Suggestion in brackets in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "let\n closeFC = fc r\n enclosingFC = (spanFC openFC closeFC)\nin\n if b == b' then\n (first ((Bracketed enclosingFC b within) :)) <$> helper rs\n else\n Left $ openCloseMismatchErr (openFC, b) (closeFC, b')" ▫︎ Perhaps: "let\n closeFC = fc r\n enclosingFC = spanFC openFC closeFC\nin\n if b == b' then\n (first ((Bracketed enclosingFC b within) :)) <$> helper rs\n else\n Left $ openCloseMismatchErr (openFC, b) (closeFC, b')"
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L96
Suggestion in brackets in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "(first ((Bracketed enclosingFC b within) :)) <$> helper rs" ▫︎ Perhaps: "first ((Bracketed enclosingFC b within) :) <$> helper rs"
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L96
Suggestion in brackets in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "((Bracketed enclosingFC b within) :)" ▫︎ Perhaps: "(Bracketed enclosingFC b within :)"
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L100
Suggestion in brackets in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "(first ((FlatTok t) :)) <$> helper ts" ▫︎ Perhaps: "first ((FlatTok t) :) <$> helper ts"
|
hlint:
brat/Brat/Lexer/Bracketed.hs#L100
Suggestion in brackets in module Brat.Lexer.Bracketed: Redundant bracket ▫︎ Found: "((FlatTok t) :)" ▫︎ Perhaps: "(FlatTok t :)"
|