From 7a1a2dd1cc4508c9b6ad442ecf533058412d95f3 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Fri, 24 Oct 2025 01:20:12 +0900 Subject: [PATCH] Update comments to clarify instructions for passing the first stage across multiple language starter templates. --- compiled_starters/c/src/main.c | 2 +- compiled_starters/cpp/src/main.cpp | 2 +- compiled_starters/csharp/src/Program.cs | 2 +- compiled_starters/go/app/main.go | 2 +- compiled_starters/haskell/app/Main.hs | 2 +- .../java/src/main/java/Main.java | 2 +- compiled_starters/javascript/app/main.js | 2 +- .../kotlin/app/src/main/kotlin/App.kt | 2 +- compiled_starters/python/app/main.py | 2 +- compiled_starters/ruby/app/main.rb | 2 +- compiled_starters/rust/src/main.rs | 2 +- compiled_starters/typescript/app/main.ts | 26 +++++++------- compiled_starters/zig/src/main.zig | 2 +- solutions/c/01-gg4/diff/src/main.c.diff | 2 +- solutions/cpp/01-gg4/diff/src/main.cpp.diff | 2 +- .../csharp/01-gg4/diff/src/Program.cs.diff | 2 +- solutions/go/01-gg4/diff/app/main.go.diff | 2 +- .../haskell/01-gg4/diff/app/Main.hs.diff | 2 +- .../01-gg4/diff/src/main/java/Main.java.diff | 2 +- .../javascript/01-gg4/diff/app/main.js.diff | 2 +- .../diff/app/src/main/kotlin/App.kt.diff | 2 +- solutions/python/01-gg4/diff/app/main.py.diff | 2 +- solutions/ruby/01-gg4/diff/app/main.rb.diff | 2 +- solutions/rust/01-gg4/diff/src/main.rs.diff | 2 +- solutions/typescript/01-gg4/code/app/main.ts | 20 +++++------ .../typescript/01-gg4/diff/app/main.ts.diff | 36 +++++++++---------- solutions/zig/01-gg4/diff/src/main.zig.diff | 2 +- starter_templates/c/code/src/main.c | 2 +- starter_templates/cpp/code/src/main.cpp | 2 +- starter_templates/csharp/code/src/Program.cs | 2 +- starter_templates/go/code/app/main.go | 2 +- starter_templates/haskell/code/app/Main.hs | 2 +- .../java/code/src/main/java/Main.java | 2 +- starter_templates/javascript/code/app/main.js | 2 +- .../kotlin/code/app/src/main/kotlin/App.kt | 2 +- starter_templates/python/code/app/main.py | 2 +- starter_templates/ruby/code/app/main.rb | 2 +- starter_templates/rust/code/src/main.rs | 2 +- starter_templates/typescript/code/app/main.ts | 26 +++++++------- starter_templates/zig/code/src/main.zig | 2 +- 40 files changed, 90 insertions(+), 90 deletions(-) diff --git a/compiled_starters/c/src/main.c b/compiled_starters/c/src/main.c index 1084338..d149bbf 100644 --- a/compiled_starters/c/src/main.c +++ b/compiled_starters/c/src/main.c @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) { // You can use print statements as follows for debugging, they'll be visible when running tests. fprintf(stderr, "Logs from your program will appear here!\n"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // if (mkdir(".git", 0755) == -1 || // mkdir(".git/objects", 0755) == -1 || diff --git a/compiled_starters/cpp/src/main.cpp b/compiled_starters/cpp/src/main.cpp index 5252171..4d3dd1a 100644 --- a/compiled_starters/cpp/src/main.cpp +++ b/compiled_starters/cpp/src/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) // You can use print statements as follows for debugging, they'll be visible when running tests. std::cerr << "Logs from your program will appear here!\n"; - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // if (argc < 2) { // std::cerr << "No command provided.\n"; diff --git a/compiled_starters/csharp/src/Program.cs b/compiled_starters/csharp/src/Program.cs index ff36d47..98bf334 100644 --- a/compiled_starters/csharp/src/Program.cs +++ b/compiled_starters/csharp/src/Program.cs @@ -14,7 +14,7 @@ if (command == "init") { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // Directory.CreateDirectory(".git"); // Directory.CreateDirectory(".git/objects"); diff --git a/compiled_starters/go/app/main.go b/compiled_starters/go/app/main.go index 8780390..25716fd 100644 --- a/compiled_starters/go/app/main.go +++ b/compiled_starters/go/app/main.go @@ -17,7 +17,7 @@ func main() { switch command := os.Args[1]; command { case "init": - // Uncomment the code below to pass the first stage the first stage! + // TODO: Uncomment the code below to pass the first stage! // // for _, dir := range []string{".git", ".git/objects", ".git/refs"} { // if err := os.MkdirAll(dir, 0755); err != nil { diff --git a/compiled_starters/haskell/app/Main.hs b/compiled_starters/haskell/app/Main.hs index 71b8ca1..5830723 100644 --- a/compiled_starters/haskell/app/Main.hs +++ b/compiled_starters/haskell/app/Main.hs @@ -17,7 +17,7 @@ main = do -- You can use print statements as follows for debugging, they'll be visible when running tests. hPutStrLn stderr "Logs from your program will appear here" - -- Uncomment the code below to pass the first stage first stage + -- TODO: Uncomment the code below to pass the first stage -- let createParents = True -- createDirectoryIfMissing createParents ".git" -- createDirectoryIfMissing createParents (".git" "objects") diff --git a/compiled_starters/java/src/main/java/Main.java b/compiled_starters/java/src/main/java/Main.java index 12c8fde..84bfc90 100644 --- a/compiled_starters/java/src/main/java/Main.java +++ b/compiled_starters/java/src/main/java/Main.java @@ -7,7 +7,7 @@ public static void main(String[] args){ // You can use print statements as follows for debugging, they'll be visible when running tests. System.err.println("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // final String command = args[0]; // diff --git a/compiled_starters/javascript/app/main.js b/compiled_starters/javascript/app/main.js index ab7f952..7be61ef 100644 --- a/compiled_starters/javascript/app/main.js +++ b/compiled_starters/javascript/app/main.js @@ -4,7 +4,7 @@ const path = require("path"); // You can use print statements as follows for debugging, they'll be visible when running tests. console.error("Logs from your program will appear here!"); -// Uncomment the code below to pass the first stage the first stage +// TODO: Uncomment the code below to pass the first stage // const command = process.argv[2]; // // switch (command) { diff --git a/compiled_starters/kotlin/app/src/main/kotlin/App.kt b/compiled_starters/kotlin/app/src/main/kotlin/App.kt index 014d5d3..c8170cd 100644 --- a/compiled_starters/kotlin/app/src/main/kotlin/App.kt +++ b/compiled_starters/kotlin/app/src/main/kotlin/App.kt @@ -11,7 +11,7 @@ fun main(args: Array) { } if (args[0] == "init") { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // val gitDir = File(".git") // gitDir.mkdir() diff --git a/compiled_starters/python/app/main.py b/compiled_starters/python/app/main.py index 38a31b6..4b2cebf 100644 --- a/compiled_starters/python/app/main.py +++ b/compiled_starters/python/app/main.py @@ -6,7 +6,7 @@ def main(): # You can use print statements as follows for debugging, they'll be visible when running tests. print("Logs from your program will appear here!", file=sys.stderr) - # Uncomment the code below to pass the first stage the first stage + # TODO: Uncomment the code below to pass the first stage # # command = sys.argv[1] # if command == "init": diff --git a/compiled_starters/ruby/app/main.rb b/compiled_starters/ruby/app/main.rb index 30c4cd3..2f6280a 100644 --- a/compiled_starters/ruby/app/main.rb +++ b/compiled_starters/ruby/app/main.rb @@ -1,7 +1,7 @@ # You can use print statements as follows for debugging, they'll be visible when running tests. $stderr.puts "Logs from your program will appear here!" -# Uncomment the code below to pass the first stage the first stage +# TODO: Uncomment the code below to pass the first stage # # command = ARGV[0] # case command diff --git a/compiled_starters/rust/src/main.rs b/compiled_starters/rust/src/main.rs index 4fbd421..b63c9e4 100644 --- a/compiled_starters/rust/src/main.rs +++ b/compiled_starters/rust/src/main.rs @@ -7,7 +7,7 @@ fn main() { // You can use print statements as follows for debugging, they'll be visible when running tests. eprintln!("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // let args: Vec = env::args().collect(); // if args[1] == "init" { // fs::create_dir(".git").unwrap(); diff --git a/compiled_starters/typescript/app/main.ts b/compiled_starters/typescript/app/main.ts index 6abd022..907d96b 100644 --- a/compiled_starters/typescript/app/main.ts +++ b/compiled_starters/typescript/app/main.ts @@ -1,20 +1,20 @@ -import * as fs from 'fs'; +import * as fs from "fs"; const args = process.argv.slice(2); const command = args[0]; switch (command) { - case "init": - // You can use print statements as follows for debugging, they'll be visible when running tests. - console.error("Logs from your program will appear here!"); + case "init": + // You can use print statements as follows for debugging, they'll be visible when running tests. + console.error("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage - // fs.mkdirSync(".git", { recursive: true }); - // fs.mkdirSync(".git/objects", { recursive: true }); - // fs.mkdirSync(".git/refs", { recursive: true }); - // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); - // console.log("Initialized git directory"); - break; - default: - throw new Error(`Unknown command ${command}`); + // TODO: Uncomment the code below to pass the first stage + // fs.mkdirSync(".git", { recursive: true }); + // fs.mkdirSync(".git/objects", { recursive: true }); + // fs.mkdirSync(".git/refs", { recursive: true }); + // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); + // console.log("Initialized git directory"); + break; + default: + throw new Error(`Unknown command ${command}`); } diff --git a/compiled_starters/zig/src/main.zig b/compiled_starters/zig/src/main.zig index 78c9a67..eda179a 100644 --- a/compiled_starters/zig/src/main.zig +++ b/compiled_starters/zig/src/main.zig @@ -20,7 +20,7 @@ pub fn main() !void { std.debug.print("Logs from your program will appear here!\n", .{}); if (std.mem.eql(u8, command, "init")) { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // const cwd = std.fs.cwd(); // _ = try cwd.makeDir("./.git"); // _ = try cwd.makeDir("./.git/objects"); diff --git a/solutions/c/01-gg4/diff/src/main.c.diff b/solutions/c/01-gg4/diff/src/main.c.diff index 99537fa..2ceed55 100644 --- a/solutions/c/01-gg4/diff/src/main.c.diff +++ b/solutions/c/01-gg4/diff/src/main.c.diff @@ -27,7 +27,7 @@ + return 1; + } -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // - // if (mkdir(".git", 0755) == -1 || - // mkdir(".git/objects", 0755) == -1 || diff --git a/solutions/cpp/01-gg4/diff/src/main.cpp.diff b/solutions/cpp/01-gg4/diff/src/main.cpp.diff index a6db4c6..4688968 100644 --- a/solutions/cpp/01-gg4/diff/src/main.cpp.diff +++ b/solutions/cpp/01-gg4/diff/src/main.cpp.diff @@ -17,7 +17,7 @@ + return EXIT_FAILURE; + } -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // - // if (argc < 2) { - // std::cerr << "No command provided.\n"; diff --git a/solutions/csharp/01-gg4/diff/src/Program.cs.diff b/solutions/csharp/01-gg4/diff/src/Program.cs.diff index e4efc72..92bbcae 100644 --- a/solutions/csharp/01-gg4/diff/src/Program.cs.diff +++ b/solutions/csharp/01-gg4/diff/src/Program.cs.diff @@ -15,7 +15,7 @@ if (command == "init") { -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // - // Directory.CreateDirectory(".git"); - // Directory.CreateDirectory(".git/objects"); diff --git a/solutions/go/01-gg4/diff/app/main.go.diff b/solutions/go/01-gg4/diff/app/main.go.diff index 0d80d30..17e6896 100644 --- a/solutions/go/01-gg4/diff/app/main.go.diff +++ b/solutions/go/01-gg4/diff/app/main.go.diff @@ -18,7 +18,7 @@ switch command := os.Args[1]; command { case "init": -- // Uncomment the code below to pass the first stage the first stage! +- // TODO: Uncomment the code below to pass the first stage! - // - // for _, dir := range []string{".git", ".git/objects", ".git/refs"} { - // if err := os.MkdirAll(dir, 0755); err != nil { diff --git a/solutions/haskell/01-gg4/diff/app/Main.hs.diff b/solutions/haskell/01-gg4/diff/app/Main.hs.diff index ae0293b..ff21967 100644 --- a/solutions/haskell/01-gg4/diff/app/Main.hs.diff +++ b/solutions/haskell/01-gg4/diff/app/Main.hs.diff @@ -18,7 +18,7 @@ - -- You can use print statements as follows for debugging, they'll be visible when running tests. - hPutStrLn stderr "Logs from your program will appear here" - -- -- Uncomment the code below to pass the first stage first stage +- -- TODO: Uncomment the code below to pass the first stage - -- let createParents = True - -- createDirectoryIfMissing createParents ".git" - -- createDirectoryIfMissing createParents (".git" "objects") diff --git a/solutions/java/01-gg4/diff/src/main/java/Main.java.diff b/solutions/java/01-gg4/diff/src/main/java/Main.java.diff index b70b0da..60d7f53 100644 --- a/solutions/java/01-gg4/diff/src/main/java/Main.java.diff +++ b/solutions/java/01-gg4/diff/src/main/java/Main.java.diff @@ -9,7 +9,7 @@ - System.err.println("Logs from your program will appear here!"); + final String command = args[0]; -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // - // final String command = args[0]; - // diff --git a/solutions/javascript/01-gg4/diff/app/main.js.diff b/solutions/javascript/01-gg4/diff/app/main.js.diff index 23a2ed0..c401e4b 100644 --- a/solutions/javascript/01-gg4/diff/app/main.js.diff +++ b/solutions/javascript/01-gg4/diff/app/main.js.diff @@ -6,7 +6,7 @@ -console.error("Logs from your program will appear here!"); +const command = process.argv[2]; --// Uncomment the code below to pass the first stage the first stage +-// TODO: Uncomment the code below to pass the first stage -// const command = process.argv[2]; -// -// switch (command) { diff --git a/solutions/kotlin/01-gg4/diff/app/src/main/kotlin/App.kt.diff b/solutions/kotlin/01-gg4/diff/app/src/main/kotlin/App.kt.diff index 989fe42..c06974a 100644 --- a/solutions/kotlin/01-gg4/diff/app/src/main/kotlin/App.kt.diff +++ b/solutions/kotlin/01-gg4/diff/app/src/main/kotlin/App.kt.diff @@ -12,7 +12,7 @@ } if (args[0] == "init") { -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // - // val gitDir = File(".git") - // gitDir.mkdir() diff --git a/solutions/python/01-gg4/diff/app/main.py.diff b/solutions/python/01-gg4/diff/app/main.py.diff index edb70ea..ce2a76e 100644 --- a/solutions/python/01-gg4/diff/app/main.py.diff +++ b/solutions/python/01-gg4/diff/app/main.py.diff @@ -7,7 +7,7 @@ - # You can use print statements as follows for debugging, they'll be visible when running tests. - print("Logs from your program will appear here!", file=sys.stderr) - -- # Uncomment the code below to pass the first stage the first stage +- # TODO: Uncomment the code below to pass the first stage - # - # command = sys.argv[1] - # if command == "init": diff --git a/solutions/ruby/01-gg4/diff/app/main.rb.diff b/solutions/ruby/01-gg4/diff/app/main.rb.diff index bc7ff36..a51c65d 100644 --- a/solutions/ruby/01-gg4/diff/app/main.rb.diff +++ b/solutions/ruby/01-gg4/diff/app/main.rb.diff @@ -2,7 +2,7 @@ -# You can use print statements as follows for debugging, they'll be visible when running tests. -$stderr.puts "Logs from your program will appear here!" - --# Uncomment the code below to pass the first stage the first stage +-# TODO: Uncomment the code below to pass the first stage -# -# command = ARGV[0] -# case command diff --git a/solutions/rust/01-gg4/diff/src/main.rs.diff b/solutions/rust/01-gg4/diff/src/main.rs.diff index ea279eb..4bc74c2 100644 --- a/solutions/rust/01-gg4/diff/src/main.rs.diff +++ b/solutions/rust/01-gg4/diff/src/main.rs.diff @@ -8,7 +8,7 @@ - // You can use print statements as follows for debugging, they'll be visible when running tests. - eprintln!("Logs from your program will appear here!"); - -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // let args: Vec = env::args().collect(); - // if args[1] == "init" { - // fs::create_dir(".git").unwrap(); diff --git a/solutions/typescript/01-gg4/code/app/main.ts b/solutions/typescript/01-gg4/code/app/main.ts index d3f1913..cfdd7bf 100644 --- a/solutions/typescript/01-gg4/code/app/main.ts +++ b/solutions/typescript/01-gg4/code/app/main.ts @@ -1,16 +1,16 @@ -import * as fs from 'fs'; +import * as fs from "fs"; const args = process.argv.slice(2); const command = args[0]; switch (command) { - case "init": - fs.mkdirSync(".git", { recursive: true }); - fs.mkdirSync(".git/objects", { recursive: true }); - fs.mkdirSync(".git/refs", { recursive: true }); - fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); - console.log("Initialized git directory"); - break; - default: - throw new Error(`Unknown command ${command}`); + case "init": + fs.mkdirSync(".git", { recursive: true }); + fs.mkdirSync(".git/objects", { recursive: true }); + fs.mkdirSync(".git/refs", { recursive: true }); + fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); + console.log("Initialized git directory"); + break; + default: + throw new Error(`Unknown command ${command}`); } diff --git a/solutions/typescript/01-gg4/diff/app/main.ts.diff b/solutions/typescript/01-gg4/diff/app/main.ts.diff index be83077..75db43d 100644 --- a/solutions/typescript/01-gg4/diff/app/main.ts.diff +++ b/solutions/typescript/01-gg4/diff/app/main.ts.diff @@ -1,26 +1,26 @@ @@ -1,20 +1,16 @@ - import * as fs from 'fs'; + import * as fs from "fs"; const args = process.argv.slice(2); const command = args[0]; switch (command) { - case "init": -- // You can use print statements as follows for debugging, they'll be visible when running tests. -- console.error("Logs from your program will appear here!"); + case "init": +- // You can use print statements as follows for debugging, they'll be visible when running tests. +- console.error("Logs from your program will appear here!"); - -- // Uncomment the code below to pass the first stage the first stage -- // fs.mkdirSync(".git", { recursive: true }); -- // fs.mkdirSync(".git/objects", { recursive: true }); -- // fs.mkdirSync(".git/refs", { recursive: true }); -- // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); -- // console.log("Initialized git directory"); -+ fs.mkdirSync(".git", { recursive: true }); -+ fs.mkdirSync(".git/objects", { recursive: true }); -+ fs.mkdirSync(".git/refs", { recursive: true }); -+ fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); -+ console.log("Initialized git directory"); - break; - default: - throw new Error(`Unknown command ${command}`); +- // TODO: Uncomment the code below to pass the first stage +- // fs.mkdirSync(".git", { recursive: true }); +- // fs.mkdirSync(".git/objects", { recursive: true }); +- // fs.mkdirSync(".git/refs", { recursive: true }); +- // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); +- // console.log("Initialized git directory"); ++ fs.mkdirSync(".git", { recursive: true }); ++ fs.mkdirSync(".git/objects", { recursive: true }); ++ fs.mkdirSync(".git/refs", { recursive: true }); ++ fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); ++ console.log("Initialized git directory"); + break; + default: + throw new Error(`Unknown command ${command}`); } diff --git a/solutions/zig/01-gg4/diff/src/main.zig.diff b/solutions/zig/01-gg4/diff/src/main.zig.diff index 8a1193b..20d36c8 100644 --- a/solutions/zig/01-gg4/diff/src/main.zig.diff +++ b/solutions/zig/01-gg4/diff/src/main.zig.diff @@ -21,7 +21,7 @@ - std.debug.print("Logs from your program will appear here!\n", .{}); - if (std.mem.eql(u8, command, "init")) { -- // Uncomment the code below to pass the first stage the first stage +- // TODO: Uncomment the code below to pass the first stage - // const cwd = std.fs.cwd(); - // _ = try cwd.makeDir("./.git"); - // _ = try cwd.makeDir("./.git/objects"); diff --git a/starter_templates/c/code/src/main.c b/starter_templates/c/code/src/main.c index 1084338..d149bbf 100644 --- a/starter_templates/c/code/src/main.c +++ b/starter_templates/c/code/src/main.c @@ -20,7 +20,7 @@ int main(int argc, char *argv[]) { // You can use print statements as follows for debugging, they'll be visible when running tests. fprintf(stderr, "Logs from your program will appear here!\n"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // if (mkdir(".git", 0755) == -1 || // mkdir(".git/objects", 0755) == -1 || diff --git a/starter_templates/cpp/code/src/main.cpp b/starter_templates/cpp/code/src/main.cpp index 5252171..4d3dd1a 100644 --- a/starter_templates/cpp/code/src/main.cpp +++ b/starter_templates/cpp/code/src/main.cpp @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) // You can use print statements as follows for debugging, they'll be visible when running tests. std::cerr << "Logs from your program will appear here!\n"; - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // if (argc < 2) { // std::cerr << "No command provided.\n"; diff --git a/starter_templates/csharp/code/src/Program.cs b/starter_templates/csharp/code/src/Program.cs index ff36d47..98bf334 100644 --- a/starter_templates/csharp/code/src/Program.cs +++ b/starter_templates/csharp/code/src/Program.cs @@ -14,7 +14,7 @@ if (command == "init") { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // Directory.CreateDirectory(".git"); // Directory.CreateDirectory(".git/objects"); diff --git a/starter_templates/go/code/app/main.go b/starter_templates/go/code/app/main.go index 8780390..25716fd 100644 --- a/starter_templates/go/code/app/main.go +++ b/starter_templates/go/code/app/main.go @@ -17,7 +17,7 @@ func main() { switch command := os.Args[1]; command { case "init": - // Uncomment the code below to pass the first stage the first stage! + // TODO: Uncomment the code below to pass the first stage! // // for _, dir := range []string{".git", ".git/objects", ".git/refs"} { // if err := os.MkdirAll(dir, 0755); err != nil { diff --git a/starter_templates/haskell/code/app/Main.hs b/starter_templates/haskell/code/app/Main.hs index 71b8ca1..5830723 100644 --- a/starter_templates/haskell/code/app/Main.hs +++ b/starter_templates/haskell/code/app/Main.hs @@ -17,7 +17,7 @@ main = do -- You can use print statements as follows for debugging, they'll be visible when running tests. hPutStrLn stderr "Logs from your program will appear here" - -- Uncomment the code below to pass the first stage first stage + -- TODO: Uncomment the code below to pass the first stage -- let createParents = True -- createDirectoryIfMissing createParents ".git" -- createDirectoryIfMissing createParents (".git" "objects") diff --git a/starter_templates/java/code/src/main/java/Main.java b/starter_templates/java/code/src/main/java/Main.java index 12c8fde..84bfc90 100644 --- a/starter_templates/java/code/src/main/java/Main.java +++ b/starter_templates/java/code/src/main/java/Main.java @@ -7,7 +7,7 @@ public static void main(String[] args){ // You can use print statements as follows for debugging, they'll be visible when running tests. System.err.println("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // final String command = args[0]; // diff --git a/starter_templates/javascript/code/app/main.js b/starter_templates/javascript/code/app/main.js index ab7f952..7be61ef 100644 --- a/starter_templates/javascript/code/app/main.js +++ b/starter_templates/javascript/code/app/main.js @@ -4,7 +4,7 @@ const path = require("path"); // You can use print statements as follows for debugging, they'll be visible when running tests. console.error("Logs from your program will appear here!"); -// Uncomment the code below to pass the first stage the first stage +// TODO: Uncomment the code below to pass the first stage // const command = process.argv[2]; // // switch (command) { diff --git a/starter_templates/kotlin/code/app/src/main/kotlin/App.kt b/starter_templates/kotlin/code/app/src/main/kotlin/App.kt index 014d5d3..c8170cd 100644 --- a/starter_templates/kotlin/code/app/src/main/kotlin/App.kt +++ b/starter_templates/kotlin/code/app/src/main/kotlin/App.kt @@ -11,7 +11,7 @@ fun main(args: Array) { } if (args[0] == "init") { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // // val gitDir = File(".git") // gitDir.mkdir() diff --git a/starter_templates/python/code/app/main.py b/starter_templates/python/code/app/main.py index 38a31b6..4b2cebf 100644 --- a/starter_templates/python/code/app/main.py +++ b/starter_templates/python/code/app/main.py @@ -6,7 +6,7 @@ def main(): # You can use print statements as follows for debugging, they'll be visible when running tests. print("Logs from your program will appear here!", file=sys.stderr) - # Uncomment the code below to pass the first stage the first stage + # TODO: Uncomment the code below to pass the first stage # # command = sys.argv[1] # if command == "init": diff --git a/starter_templates/ruby/code/app/main.rb b/starter_templates/ruby/code/app/main.rb index 30c4cd3..2f6280a 100644 --- a/starter_templates/ruby/code/app/main.rb +++ b/starter_templates/ruby/code/app/main.rb @@ -1,7 +1,7 @@ # You can use print statements as follows for debugging, they'll be visible when running tests. $stderr.puts "Logs from your program will appear here!" -# Uncomment the code below to pass the first stage the first stage +# TODO: Uncomment the code below to pass the first stage # # command = ARGV[0] # case command diff --git a/starter_templates/rust/code/src/main.rs b/starter_templates/rust/code/src/main.rs index 4fbd421..b63c9e4 100644 --- a/starter_templates/rust/code/src/main.rs +++ b/starter_templates/rust/code/src/main.rs @@ -7,7 +7,7 @@ fn main() { // You can use print statements as follows for debugging, they'll be visible when running tests. eprintln!("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // let args: Vec = env::args().collect(); // if args[1] == "init" { // fs::create_dir(".git").unwrap(); diff --git a/starter_templates/typescript/code/app/main.ts b/starter_templates/typescript/code/app/main.ts index 6abd022..907d96b 100644 --- a/starter_templates/typescript/code/app/main.ts +++ b/starter_templates/typescript/code/app/main.ts @@ -1,20 +1,20 @@ -import * as fs from 'fs'; +import * as fs from "fs"; const args = process.argv.slice(2); const command = args[0]; switch (command) { - case "init": - // You can use print statements as follows for debugging, they'll be visible when running tests. - console.error("Logs from your program will appear here!"); + case "init": + // You can use print statements as follows for debugging, they'll be visible when running tests. + console.error("Logs from your program will appear here!"); - // Uncomment the code below to pass the first stage the first stage - // fs.mkdirSync(".git", { recursive: true }); - // fs.mkdirSync(".git/objects", { recursive: true }); - // fs.mkdirSync(".git/refs", { recursive: true }); - // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); - // console.log("Initialized git directory"); - break; - default: - throw new Error(`Unknown command ${command}`); + // TODO: Uncomment the code below to pass the first stage + // fs.mkdirSync(".git", { recursive: true }); + // fs.mkdirSync(".git/objects", { recursive: true }); + // fs.mkdirSync(".git/refs", { recursive: true }); + // fs.writeFileSync(".git/HEAD", "ref: refs/heads/main\n"); + // console.log("Initialized git directory"); + break; + default: + throw new Error(`Unknown command ${command}`); } diff --git a/starter_templates/zig/code/src/main.zig b/starter_templates/zig/code/src/main.zig index 78c9a67..eda179a 100644 --- a/starter_templates/zig/code/src/main.zig +++ b/starter_templates/zig/code/src/main.zig @@ -20,7 +20,7 @@ pub fn main() !void { std.debug.print("Logs from your program will appear here!\n", .{}); if (std.mem.eql(u8, command, "init")) { - // Uncomment the code below to pass the first stage the first stage + // TODO: Uncomment the code below to pass the first stage // const cwd = std.fs.cwd(); // _ = try cwd.makeDir("./.git"); // _ = try cwd.makeDir("./.git/objects");