Showing 292 of 292 total issues
Reduce duplication Open
Open
q <- newName "q"
- Read upRead up
- Exclude checks
Found
q <- newName "q"
s <- newName "s"
f <- newName "f"
h <- newName "h"
t <- newName "t"
Perhaps
Combine with flaw-math/Flaw/Math.hs:565:7
Redundant do Open
Open
lns <- sqliteQuery stmt $ \query -> do
let
step = do
r <- sqliteStep query
if r then do
- Read upRead up
- Exclude checks
Found
do let step
= do r <- sqliteStep query
if r then
do line <- sqliteColumn query 0
restLines <- step
return $ line : restLines
else return []
in step
Perhaps
let step
= do r <- sqliteStep query
if r then
do line <- sqliteColumn query 0
restLines <- step
return $ line : restLines
else return []
in step
Reduce duplication Open
Open
check b "k3" 0 ""
- Read upRead up
- Exclude checks
Found
check b "k3" 0 ""
psp a
psp b
check a "k1" 1 "aaa111"
check a "k2" 2 "aaa222"
Perhaps
Combine with flaw-oil/test/repo-test.hs:248:5
Use forM_ Open
Open
case maybeOldLayoutPanelChild of
Just oldLayoutPanelChild -> removeFreeChild panel oldLayoutPanelChild
Nothing -> return ()
- Read upRead up
- Exclude checks
Found
case maybeOldLayoutPanelChild of
Just oldLayoutPanelChild -> removeFreeChild panel
oldLayoutPanelChild
Nothing -> return ()
Perhaps
Data.Foldable.forM_ maybeOldLayoutPanelChild
(removeFreeChild panel)
Use gets Open
Open
tryGetElementById name = MS.lookup name . ccElementsById <$> get
- Read upRead up
- Exclude checks
Found
MS.lookup name . ccElementsById <$> get
Perhaps
gets (MS.lookup name . ccElementsById)
Reduce duplication Open
Open
k = sqrt (1 + m11 + m22 + m33)
- Read upRead up
- Exclude checks
Found
k = sqrt (1 + m11 + m22 + m33)
kk = 0.5 / k
x = (m32 - m23) * kk
y = (m13 - m31) * kk
z = (m21 - m12) * kk
w = k * 0.5
Perhaps
Combine with flaw-math/Flaw/Math/Transform.hs:201:5
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE FlexibleContexts, FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses, OverloadedStrings, RankNTypes #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE FlexibleContexts, FlexibleInstances,
FunctionalDependencies, MultiParamTypeClasses, OverloadedStrings,
RankNTypes #-}
Perhaps
{-# LANGUAGE FlexibleContexts, FlexibleInstances,
FunctionalDependencies, OverloadedStrings, RankNTypes #-}
Applying this change:
- Extension MultiParamTypeClasses is implied by FunctionalDependencies
Reduce duplication Open
Open
check b "k2" 0 ""
- Read upRead up
- Exclude checks
Found
check b "k2" 0 ""
check b "k3" 0 ""
psp a
psp b
check a "k1" 1 "aaa111"
Perhaps
Combine with flaw-oil/test/repo-test.hs:239:5
Reduce duplication Open
Open
albedo = xyz__ albedoOcclusion
- Read upRead up
- Exclude checks
Found
albedo = xyz__ albedoOcclusion
diffuse = x_ material
specular = y_ material
metalness = zzz__ material
glossiness = w_ material
Perhaps
Combine with flaw-visual/Flaw/Visual/Pipeline/Deferred.hs:226:5
Use tuple-section Open
Open
[ newtypeInstD (sequence []) ''Quat [elemType] Nothing (normalC conName [fmap (\t -> (Bang NoSourceUnpackedness NoSourceStrictness, t)) [t| Vec4 $elemType |]]) [derivClause Nothing [ [t| Generic |] ] ]
- Read upRead up
- Exclude checks
Found
\ t -> (Bang NoSourceUnpackedness NoSourceStrictness, t)
Perhaps
(Bang NoSourceUnpackedness NoSourceStrictness,)
Applying this change:
- may require
{-# LANGUAGE TupleSections #-}
adding to the top of the file
Use gets Open
Open
getParsedArrays = ccFloatArrays <$> get
- Read upRead up
- Exclude checks
Found
ccFloatArrays <$> get
Perhaps
gets ccFloatArrays
Use gets Open
Open
settings <- ccSettings <$> get
- Read upRead up
- Exclude checks
Found
ccSettings <$> get
Perhaps
gets ccSettings
Reduce duplication Open
Open
glGetProgramiv programName GL_LINK_STATUS statusPtr
- Read upRead up
- Exclude checks
Found
glGetProgramiv programName GL_LINK_STATUS statusPtr
glCheckErrors0 "get program link status"
peek statusPtr
Perhaps
Combine with flaw-gl/Flaw/Graphics/GlContext.hs:737:9
Use camelCase Open
Open
glGetUniformBlockIndex_s programName uniformBlockName = B.useAsCString (T.encodeUtf8 uniformBlockName) $ glGetUniformBlockIndex programName
- Read upRead up
- Exclude checks
Found
glGetUniformBlockIndex_s programName uniformBlockName = ...
Perhaps
glGetUniformBlockIndexS programName uniformBlockName = ...
Use camelCase Open
Open
glGetProgramInfoLog_s :: JS_WebGLProgram -> IO T.Text
- Read upRead up
- Exclude checks
Found
glGetProgramInfoLog_s :: JS_WebGLProgram -> IO T.Text
Perhaps
glGetProgramInfoLogS :: JS_WebGLProgram -> IO T.Text
Use camelCase Open
Open
glGetUniformLocation_s :: JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation
- Read upRead up
- Exclude checks
Found
glGetUniformLocation_s ::
JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation
Perhaps
glGetUniformLocationS ::
JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation
Use infix Open
Open
variantFilter variant = all (\c -> elem c components) variant && elem (last components) variant
- Read upRead up
- Exclude checks
Found
elem c components
Perhaps
c `elem` components
Redundant bracket Open
Open
( (bindS (varP p) [| readMutVar $(r j) |]) : restStmts ++
[bindS (varP q) [| luaValueConcat $(varE p) $restE |] ]
- Read upRead up
- Exclude checks
Found
(bindS (varP p) [| readMutVar $( r j ) |]) :
restStmts ++
[bindS (varP q) [| luaValueConcat $( varE p ) $restE |]]
Perhaps
bindS (varP p) [| readMutVar $( r j ) |] :
restStmts ++
[bindS (varP q) [| luaValueConcat $( varE p ) $restE |]]
Use camelCase Open
Open
data C_OSMesaContext
- Read upRead up
- Exclude checks
Found
data C_OSMesaContext
Perhaps
data COSMesaContext
Use list comprehension Open
Open
otherShaderInfos = concatMap (\(otherStage, otherShaderInfo) -> if otherStage == stage then [] else [otherShaderInfo]) shaders
- Read upRead up
- Exclude checks
Found
if otherStage == stage then [] else [otherShaderInfo]
Perhaps
[otherShaderInfo | not (otherStage == stage)]