scratch/scratch.go

Summary

Maintainability
A
35 mins
Test Coverage

Method ScratchSpace.MakeLogFiles has 5 return statements (exceeds 4 allowed).
Open

func (s *ScratchSpace) MakeLogFiles(prefix string) (*os.File, *os.File, error) {
    outpath, err := buildPath(filepath.Join(s.runpath, LogsDir, prefix+OutLogSuffix))
    if err != nil {
        return nil, nil, err
    }
Severity: Major
Found in scratch/scratch.go - About 35 mins to fix

    exported method ScratchSpace.MakeLogFiles should have comment or be unexported
    Open

    func (s *ScratchSpace) MakeLogFiles(prefix string) (*os.File, *os.File, error) {
    Severity: Minor
    Found in scratch/scratch.go by golint

    type name will be used as scratch.ScratchSpace by other packages, and that stutters; consider calling this Space
    Open

    type ScratchSpace struct {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Runpath should have comment or be unexported
    Open

    func (s *ScratchSpace) Runpath() string {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Workspace should have comment or be unexported
    Open

    func (s *ScratchSpace) Workspace() string {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported type ScratchSpace should have comment or be unexported
    Open

    type ScratchSpace struct {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.WriteScript should have comment or be unexported
    Open

    func (s *ScratchSpace) WriteScript(script string) (string, error) {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Scratch should have comment or be unexported
    Open

    func (s *ScratchSpace) Scratch() string {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported const ScratchDir should have comment (or a comment on this block) or be unexported
    Open

        ScratchDir   = ".ij"
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Prune should have comment or be unexported
    Open

    func (s *ScratchSpace) Prune(logger logging.Logger) error {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported function NewScratchSpace should have comment or be unexported
    Open

    func NewScratchSpace(runID, projectDir, scratchRoot string, keepWorkspace bool) *ScratchSpace {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Setup should have comment or be unexported
    Open

    func (s *ScratchSpace) Setup() error {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Teardown should have comment or be unexported
    Open

    func (s *ScratchSpace) Teardown() error {
    Severity: Minor
    Found in scratch/scratch.go by golint

    exported method ScratchSpace.Project should have comment or be unexported
    Open

    func (s *ScratchSpace) Project() string {
    Severity: Minor
    Found in scratch/scratch.go by golint

    There are no issues that match your filters.

    Category
    Status