Preparing report...

Report for github.com/celer/gshaderc

A    Great!    Found 7 issues across 10 files

Tweet

gofmt80%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint30%

Golint is a linter for Go source code.

    • gshaderc/compiler.go
    • Line 22: warning: exported type Compiler should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method Compiler.CompileIntoSPV should be of the form "CompileIntoSPV ..." (golint)
    • Line 66: warning: comment on exported method Compiler.CompileIntoPreProcessedText should be of the form "CompileIntoPreProcessedText ..." (golint)
    • Line 81: warning: comment on exported method Compiler.AssembleIntoSPV should be of the form "AssembleIntoSPV ..." (golint)
    • gshaderc/compileroptions.go
    • Line 22: warning: comment on exported type CompilerOptions should be of the form "CompilerOptions ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported method CompilerOptions.SetNanClamp should be of the form "SetNanClamp ..." (golint)
    • Line 45: warning: comment on exported method CompilerOptions.SetInvertY should be of the form "SetInvertY ..." (golint)
    • Line 51: warning: comment on exported method CompilerOptions.SetBindingBase should be of the form "SetBindingBase ..." (golint)
    • Line 60: warning: comment on exported method CompilerOptions.AddMacroDefinition should be of the form "AddMacroDefinition ..." (golint)
    • Line 72: warning: comment on exported method CompilerOptions.SetOptimizationLevel should be of the form "SetOptimizationLevel ..." (golint)
    • Line 79: warning: comment on exported method CompilerOptions.SuppressWarnings should be of the form "SuppressWarnings ..." (golint)
    • Line 100: warning: comment on exported method CompilerOptions.SetTargetEnv should be of the form "SetTargetEnv ..." (golint)
    • Line 110: warning: comment on exported method CompilerOptions.SetSPIRVVersion should be of the form "SetSPIRVVersion ..." (golint)
    • Line 120: warning: comment on exported method CompilerOptions.SetWarningsAsErrors should be of the form "SetWarningsAsErrors ..." (golint)
    • Line 129: warning: comment on exported method CompilerOptions.SetAutoBindUniforms should be of the form "SetAutoBindUniforms ..." (golint)
    • Line 136: warning: comment on exported method CompilerOptions.Release should be of the form "Release ..." (golint)
    • gshaderc/errors.go
    • Line 24: warning: error var InvalidStageError should have name of the form ErrFoo (golint)
    • Line 24: warning: exported var InvalidStageError should have comment or be unexported (golint)
    • Line 25: warning: error var CompilationError should have name of the form ErrFoo (golint)
    • Line 25: warning: exported var CompilationError should have comment or be unexported (golint)
    • Line 26: warning: error var InternalError should have name of the form ErrFoo (golint)
    • Line 26: warning: exported var InternalError should have comment or be unexported (golint)
    • Line 27: warning: error var NullResultObjectError should have name of the form ErrFoo (golint)
    • Line 27: warning: exported var NullResultObjectError should have comment or be unexported (golint)
    • Line 28: warning: error var InvalidAssemblyError should have name of the form ErrFoo (golint)
    • Line 28: warning: exported var InvalidAssemblyError should have comment or be unexported (golint)
    • Line 29: warning: error var ValidationError should have name of the form ErrFoo (golint)
    • Line 29: warning: exported var ValidationError should have comment or be unexported (golint)
    • Line 30: warning: error var TransformationError should have name of the form ErrFoo (golint)
    • Line 30: warning: exported var TransformationError should have comment or be unexported (golint)
    • Line 31: warning: error var ConfigurationError should have name of the form ErrFoo (golint)
    • Line 31: warning: exported var ConfigurationError should have comment or be unexported (golint)
    • gshaderc/includeresult.go
    • Line 82: warning: exported type IncludeType should have comment or be unexported (golint)
    • Line 103: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 124: warning: comment on exported type IncludeResolver should be of the form "IncludeResolver ..." (with optional leading article) (golint)
    • gshaderc/types.go
    • Line 21: warning: exported type ShaderType should have comment or be unexported (golint)
    • Line 24: warning: comment on exported const VertexShader should be of the form "VertexShader ..." (golint)
    • Line 27: warning: exported const FragmentShader should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const InferFromSource should be of the form "InferFromSource ..." (golint)
    • Line 35: warning: comment on exported const DefaultVertexShader should be of the form "DefaultVertexShader ..." (golint)
    • Line 48: warning: exported type Target should have comment or be unexported (golint)
    • Line 51: warning: exported const Vulkan should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: comment on exported const OpenGLCompat should be of the form "OpenGLCompat ..." (golint)
    • Line 56: warning: comment on exported const WebGPU should be of the form "WebGPU ..." (golint)
    • Line 62: warning: exported type EnvVersion should have comment or be unexported (golint)
    • Line 65: warning: don't use underscores in Go names; const Vulkan_1_0 should be Vulkan1_0 (golint)
    • Line 65: warning: exported const Vulkan_1_0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: don't use underscores in Go names; const Vulkan_1_1 should be Vulkan1_1 (golint)
    • Line 67: warning: don't use underscores in Go names; const OpenGL_4_5 should be OpenGL4_5 (golint)
    • Line 71: warning: exported type SPIRVVersion should have comment or be unexported (golint)
    • Line 74: warning: exported const SPIRV_1_0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported type OptimizationLevel should have comment or be unexported (golint)
    • Line 85: warning: exported const Zero should have comment (or a comment on this block) or be unexported (golint)
    • Line 90: warning: comment on exported type UniformKind should be of the form "UniformKind ..." (with optional leading article) (golint)
    • Line 96: warning: comment on exported const UniformKindImage should be of the form "UniformKindImage ..." (golint)
    • Line 98: warning: comment on exported const UniformKindSampler should be of the form "UniformKindSampler ..." (golint)
    • Line 100: warning: comment on exported const UniformKindTexture should be of the form "UniformKindTexture ..." (golint)
    • Line 102: warning: comment on exported const UniformKindBuffer should be of the form "UniformKindBuffer ..." (golint)
    • Line 104: warning: comment on exported const UniformKindStorageBuffer should be of the form "UniformKindStorageBuffer ..." (golint)
    • Line 106: warning: comment on exported const UniformKindUnorderedAccessView should be of the form "UniformKindUnorderedAccessView ..." (golint)
    • Line 111: warning: exported type ResourceLimit should have comment or be unexported (golint)
    • Line 158: warning: don't use underscores in Go names; const MaxCombinedImageUnitsAndFragment_outputs should be MaxCombinedImageUnitsAndFragmentOutputs (golint)
    • gshaderc/utils.go
    • Line 10: warning: exported const TargetVulkan11 should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported method CompilerOptions.SetTargetByName should have comment or be unexported (golint)
    • Line 65: warning: exported function GetShaderExtensionByType should have comment or be unexported (golint)
    • Line 83: warning: exported function GetShaderTypeByFilename should have comment or be unexported (golint)
    • gshaderc/cmd/gsc.go
    • Line 34: warning: exported type WatchDirs should have comment or be unexported (golint)
    • Line 40: warning: exported method WatchDirs.Set should have comment or be unexported (golint)
    • Line 113: warning: exported type Watcher should have comment or be unexported (golint)
    • Line 117: warning: exported function NewWatcher should have comment or be unexported (golint)
    • Line 136: warning: exported method Watcher.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!