Showing 292 of 292 total issues
Redundant $ Open
Open
, [t| OfVectorType ($(conT $ mkName $ "SwizzleVecResult" ++ nameSuffix) $(varT v)) |]
- Read upRead up
- Exclude checks
Found
conT $ mkName
Perhaps
conT mkName
Use camelCase Open
Open
data C_BulletRigidBody
- Read upRead up
- Exclude checks
Found
data C_BulletRigidBody
Perhaps
data CBulletRigidBody
Redundant bracket Open
Open
if luaCoerceToBool loop > 0 then $(doE $ (noBindS [| writeMutVar $(r $ a + 3) newIdx |]) : jmpInstStmts)
- Read upRead up
- Exclude checks
Found
(noBindS [| writeMutVar $( r $ a + 3 ) newIdx |]) : jmpInstStmts
Perhaps
noBindS [| writeMutVar $( r $ a + 3 ) newIdx |] : jmpInstStmts
Use camelCase Open
Open
type C_lua_Alloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())
- Read upRead up
- Exclude checks
Found
type C_lua_Alloc =
Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())
Perhaps
type CLuaAlloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())
Reduce duplication Open
Open
pressed <- readTVar pressedVar
- Read upRead up
- Exclude checks
Found
pressed <- readTVar pressedVar
when pressed $
do click
writeTVar pressedVar False
return True
Perhaps
Combine with flaw-ui/Flaw/UI/Button.hs:160:9
Reduce duplication Open
Open
sub <- subLayoutHandler $ Vec4 (px + labelWidth + gap) py qx qy
- Read upRead up
- Exclude checks
Found
sub <- subLayoutHandler $ Vec4 (px + labelWidth + gap) py qx qy
let Vec4 _subpx subpy _subqx subqy = sub
return $
Vec4 px (max (py + labelHeight + gap) subpy) qx (min qy subqy)
Perhaps
Combine with flaw-ui/Flaw/UI/Layout.hs:174:7
Use guards Open
Open
argsSetDecs i =
if i < numParams then do
a <- newName "a"
(restDecs, xs) <- argsSetDecs $ i + 1
return
- Read upRead up
- Exclude checks
Found
argsSetDecs i
= if i < numParams then
do a <- newName "a"
(restDecs, xs) <- argsSetDecs $ i + 1
return
(valD [p| $( varP (paramNames V.! i) ) : $xs |]
(normalB
[|
case $( varE a ) of
[] -> [LuaNil]
_ -> $( varE a )
|])
[]
: restDecs,
varP a)
else
if isVararg then
do a <- newName "a"
return ([valD (varP varargName) (normalB $ varE a) []], varP a)
else return ([], wildP)
Perhaps
argsSetDecs i
| i < numParams =
do a <- newName "a"
(restDecs, xs) <- argsSetDecs $ i + 1
return
(valD [p| $( varP (paramNames V.! i) ) : $xs |]
(normalB
[|
case $( varE a ) of
[] -> [LuaNil]
_ -> $( varE a )
|])
[]
: restDecs,
varP a)
| isVararg =
do a <- newName "a"
return ([valD (varP varargName) (normalB $ varE a) []], varP a)
| otherwise = return ([], wildP)
Use newtype instead of data Open
Open
data SdlException = SdlException String deriving Show
- Read upRead up
- Exclude checks
Found
data SdlException
= SdlException String
deriving Show
Perhaps
newtype SdlException
= SdlException String
deriving Show
Applying this change:
- decreases laziness
Use camelCase Open
Open
glGetUniformLocation_s programName locationName = B.useAsCString (T.encodeUtf8 locationName) $ glGetUniformLocation programName
- Read upRead up
- Exclude checks
Found
glGetUniformLocation_s programName locationName = ...
Perhaps
glGetUniformLocationS programName locationName = ...
Use camelCase Open
Open
glBindAttribLocation_s :: JS_WebGLProgram -> GLuint -> T.Text -> IO ()
- Read upRead up
- Exclude checks
Found
glBindAttribLocation_s ::
JS_WebGLProgram -> GLuint -> T.Text -> IO ()
Perhaps
glBindAttribLocationS ::
JS_WebGLProgram -> GLuint -> T.Text -> IO ()
Use camelCase Open
Open
glGetUniformLocation_s program locationName = glGetUniformLocation_val program $ pToJSVal locationName
- Read upRead up
- Exclude checks
Found
glGetUniformLocation_s program locationName = ...
Perhaps
glGetUniformLocationS program locationName = ...
Redundant bracket Open
Open
else $(doE $ (noBindS [| writeMutVar $(r a) p |]) : nextInstStmts)
- Read upRead up
- Exclude checks
Found
(noBindS [| writeMutVar $( r a ) p |]) : nextInstStmts
Perhaps
noBindS [| writeMutVar $( r a ) p |] : nextInstStmts
Use guards Open
Open
itemRender =
if selected then do
drawBorderedRectangle canvas
(Vec4 (px + left) (px + left + 1) (px + right - 1) (px + right))
(Vec4 y (y + 1) (y + itemHeight - 1) (y + itemHeight))
- Read upRead up
- Exclude checks
Found
itemRender
= if selected then
do drawBorderedRectangle canvas
(Vec4 (px + left) (px + left + 1) (px + right - 1) (px + right))
(Vec4 y (y + 1) (y + itemHeight - 1) (y + itemHeight))
(styleFillColor style)
(styleBorderColor style)
r
else
if isOdd then
do let evenColor
= styleFillColor selectedUnfocusedStyle * Vec4 1 1 1 5.0e-2
drawBorderedRectangle canvas
(Vec4 (px + left) (px + left) (px + right) (px + right))
(Vec4 y y (y + itemHeight) (y + itemHeight))
evenColor
evenColor
r
else r
Perhaps
itemRender
| selected =
do drawBorderedRectangle canvas
(Vec4 (px + left) (px + left + 1) (px + right - 1) (px + right))
(Vec4 y (y + 1) (y + itemHeight - 1) (y + itemHeight))
(styleFillColor style)
(styleBorderColor style)
r
| isOdd =
do let evenColor
= styleFillColor selectedUnfocusedStyle * Vec4 1 1 1 5.0e-2
drawBorderedRectangle canvas
(Vec4 (px + left) (px + left) (px + right) (px + right))
(Vec4 y y (y + itemHeight) (y + itemHeight))
evenColor
evenColor
r
| otherwise = r
Use camelCase Open
Open
data C_OSMesaContext
- Read upRead up
- Exclude checks
Found
data C_OSMesaContext
Perhaps
data COSMesaContext
Use camelCase Open
Open
newtype JS_WebGLFramebuffer = JS_WebGLFramebuffer JSVal
- Read upRead up
- Exclude checks
Found
newtype JS_WebGLFramebuffer = JS_WebGLFramebuffer JSVal
Perhaps
newtype JSWebGLFramebuffer = JSWebGLFramebuffer JSVal
Use camelCase Open
Open
glShaderSource_s shader source = glShaderSource_val shader $ pToJSVal source
- Read upRead up
- Exclude checks
Found
glShaderSource_s shader source = ...
Perhaps
glShaderSourceS shader source = ...
Redundant bracket Open
Open
(map (\a -> [| nodeValueType $(varE a) |]) ps) ++ [ [| valueType $(varE u) |] ] ++ (map varE ps)
- Read upRead up
- Exclude checks
Found
[[| valueType $( varE u ) |]] ++ (map varE ps)
Perhaps
[[| valueType $( varE u ) |]] ++ map varE ps
Avoid lambda Open
Open
valueToShowList $(conP name $ map varP ps) = $(listE $ map (\p -> appE (varE 'show) $ varE p) ps)
- Read upRead up
- Exclude checks
Found
\ p -> appE (varE 'show) $ varE p
Perhaps
appE (varE 'show) . varE
Avoid lambda using infix
Open
Open
variantFilter variant = all (\c -> elem c components) variant && elem (last components) variant
- Read upRead up
- Exclude checks
Found
\ c -> elem c components
Perhaps
(`elem` components)
Use camelCase Open
Open
type C_lua_Reader = Ptr C_lua_State -> Ptr () -> Ptr CSize -> IO (Ptr CChar)
- Read upRead up
- Exclude checks
Found
type C_lua_Reader =
Ptr C_lua_State -> Ptr () -> Ptr CSize -> IO (Ptr CChar)
Perhaps
type CLuaReader =
Ptr C_lua_State -> Ptr () -> Ptr CSize -> IO (Ptr CChar)