diff --git a/cmd/joj3/stage/run.go b/cmd/joj3/stage/run.go index daa71f9..e9d4fff 100644 --- a/cmd/joj3/stage/run.go +++ b/cmd/joj3/stage/run.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/joint-online-judge/JOJ3/cmd/joj3/conf" - executors "github.com/joint-online-judge/JOJ3/internal/executor" + "github.com/joint-online-judge/JOJ3/internal/executor" _ "github.com/joint-online-judge/JOJ3/internal/parser" "github.com/joint-online-judge/JOJ3/internal/stage" @@ -139,7 +139,7 @@ func Run( ) ( stageResults []stage.StageResult, forceQuitStageName string, err error, ) { - executors.InitWithConf( + executor.InitWithConf( conf.Stage.SandboxExecServer, conf.Stage.SandboxToken, ) diff --git a/internal/executor/all.go b/internal/executor/all.go index 5c66365..a170328 100644 --- a/internal/executor/all.go +++ b/internal/executor/all.go @@ -1,4 +1,5 @@ -package executors +// Package executor contains all the executors. +package executor import ( _ "github.com/joint-online-judge/JOJ3/internal/executor/dummy" diff --git a/internal/parser/all.go b/internal/parser/all.go index c5ff8f9..29fbd96 100644 --- a/internal/parser/all.go +++ b/internal/parser/all.go @@ -1,4 +1,5 @@ -package parsers +// Package parser contains all the parsers. +package parser import ( _ "github.com/joint-online-judge/JOJ3/internal/parser/clangtidy" diff --git a/internal/parser/clangtidy/convert.go b/internal/parser/clangtidy/convert.go index 628e102..ccee81e 100644 --- a/internal/parser/clangtidy/convert.go +++ b/internal/parser/clangtidy/convert.go @@ -1,4 +1,3 @@ -// Referenced from https://github.com/yuriisk/clang-tidy-converter/blob/master/clang_tidy_converter/parser/clang_tidy_parser.py package clangtidy import ( @@ -9,6 +8,7 @@ import ( "strings" ) +// Referenced from https://github.com/yuriisk/clang-tidy-converter/blob/master/clang_tidy_converter/parser/clang_tidy_parser.py type Level int const ( diff --git a/internal/parser/plugin/meta.go b/internal/parser/plugin/meta.go index 63c7939..b6255e6 100644 --- a/internal/parser/plugin/meta.go +++ b/internal/parser/plugin/meta.go @@ -2,7 +2,6 @@ // dynamically. It is used for custom parsers. // The plugin needs to be located at `ModPath` and export a symbol with name // `SymName` that implements the stage.Parser interface. - package plugin import "github.com/joint-online-judge/JOJ3/internal/stage" diff --git a/internal/parser/tierscore/meta.go b/internal/parser/tierscore/meta.go index 2b1528c..970b639 100644 --- a/internal/parser/tierscore/meta.go +++ b/internal/parser/tierscore/meta.go @@ -1,6 +1,5 @@ // Package tierscore provides a parser for tiered scoring based on // time and memory constraints. Leave the field empty or 0 to disable. - package tierscore import "github.com/joint-online-judge/JOJ3/internal/stage" diff --git a/internal/stage/run.go b/internal/stage/run.go index d4a910c..06a69d0 100644 --- a/internal/stage/run.go +++ b/internal/stage/run.go @@ -1,3 +1,6 @@ +// Package stage provides functionality to run stages. Each stage contains an +// executor and multiple parsers. The executor executes the command and parsers +// parse the output generated by the executor. package stage import ( diff --git a/pkg/healthcheck/all.go b/pkg/healthcheck/all.go index 2293701..562e84a 100644 --- a/pkg/healthcheck/all.go +++ b/pkg/healthcheck/all.go @@ -1,3 +1,4 @@ +// Package healthcheck provides a set of health checks for a repository. package healthcheck import ( diff --git a/pkg/sample/sample.go b/pkg/sample/sample.go index 6c9ab5a..20f40fa 100644 --- a/pkg/sample/sample.go +++ b/pkg/sample/sample.go @@ -1,3 +1,4 @@ +// Package sample provides a sample function that returns a Result. package sample import (