From a869a3ebf816a1352fe645604b48173d97274cc0 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 15 Oct 2022 15:39:21 +0200 Subject: [PATCH] feat(config): add prefix and default suffix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend the configuration with ‹prefix› and ‹language.default_suffix›. • ‹prefix› -- specifies the content of the first comment in the review • ‹language.default_suffix› -- specifies the extension of the sources where the prefix is being added Signed-off-by: Matej Focko --- docs/cpp_config.yml | 3 ++- docs/haskell_config.yml | 3 ++- docs/python_config.yml | 19 ++++++++++++++++++- docs/template.yml | 9 ++++++++- src/core/configuration.go | 4 ++++ 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/cpp_config.yml b/docs/cpp_config.yml index dcda18b..31b5002 100644 --- a/docs/cpp_config.yml +++ b/docs/cpp_config.yml @@ -7,4 +7,5 @@ language: on_separate_line: true opening: "/** " continuation: " ** " - closing: "\n **/\n" \ No newline at end of file + closing: "\n **/\n" + default_suffix: "hpp" \ No newline at end of file diff --git a/docs/haskell_config.yml b/docs/haskell_config.yml index 589ec54..7c953d1 100644 --- a/docs/haskell_config.yml +++ b/docs/haskell_config.yml @@ -7,4 +7,5 @@ language: on_separate_line: false opening: "-- # " continuation: "-- # " - closing: "\n" \ No newline at end of file + closing: "\n" + default_suffix: "hs" \ No newline at end of file diff --git a/docs/python_config.yml b/docs/python_config.yml index b53e6c0..59c4ba1 100644 --- a/docs/python_config.yml +++ b/docs/python_config.yml @@ -7,4 +7,21 @@ language: on_separate_line: false opening: "## " continuation: "## " - closing: "\n" \ No newline at end of file + closing: "\n" + default_suffix: "py" + +prefix: | + Hodnotenie: @ + --- + [ ] jasně popisuje řešení zadaného problému + [ ] je správně dekomponované na podproblémy + [ ] je zapsáno bez zbytečného opakování + [ ] používá správné abstrakce, algoritmy a datové struktury + + + = OK, - = zanedbatelne nedostatky, X = vyrazne nedostatky + + Summary (+1s, suggestions, rants, confessions, etc.): + • + + Pokial Vam nieco nie je jasne alebo sa chcete pobavit o nejakom lepsom napade + na riesenie => mail || Discord || konzultacie diff --git a/docs/template.yml b/docs/template.yml index a3117cf..acbbf1d 100644 --- a/docs/template.yml +++ b/docs/template.yml @@ -15,4 +15,11 @@ language: # sequence that is used for multiline comments, i.e. prefixing the lines continuation: " ** " # sequence that closes off the comment, including newline - closing: "\n **/\n" \ No newline at end of file + closing: "\n **/\n" + # suffix of the file where header of review is added + default_suffix: "c" + +# prefix is used to put initial comment into every file +# can be used for final grade that must appear on the first line +prefix: | + comment that appears at the beginning of each solution \ No newline at end of file diff --git a/src/core/configuration.go b/src/core/configuration.go index 384477e..459a0c4 100644 --- a/src/core/configuration.go +++ b/src/core/configuration.go @@ -13,12 +13,16 @@ type Config struct { Repository string `yaml:"repository"` Token string } `yaml:"gitea"` + Language struct { OnSeparateLine bool `yaml:"on_separate_line"` Opening string `yaml:"opening"` Continuation string `yaml:"continuation"` Closing string `yaml:"closing"` + DefaultSuffix string `yaml:"default_suffix"` } `yaml:"language"` + + Prefix string `yaml:"prefix"` } func LoadConfig(config *Config, filename string) {