diff --git a/cover.out b/cover.out index 4cd1e8c..69ade37 100644 --- a/cover.out +++ b/cover.out @@ -1,471 +1,38 @@ mode: count -github.com/LMaxence/gookme/cmd/cli/main.go:12.13,15.41 2 0 -github.com/LMaxence/gookme/cmd/cli/main.go:15.41,18.3 2 0 -github.com/LMaxence/gookme/packages/cli/clean.go:19.9,23.16 3 0 -github.com/LMaxence/gookme/packages/cli/clean.go:23.16,25.3 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:27.2,32.16 5 0 -github.com/LMaxence/gookme/packages/cli/clean.go:32.16,34.3 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:36.2,36.12 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:36.12,42.17 5 0 -github.com/LMaxence/gookme/packages/cli/clean.go:42.17,44.4 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:47.3,49.24 3 0 -github.com/LMaxence/gookme/packages/cli/clean.go:50.8,52.3 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:54.2,56.49 2 0 -github.com/LMaxence/gookme/packages/cli/clean.go:56.49,59.17 3 0 -github.com/LMaxence/gookme/packages/cli/clean.go:59.17,61.4 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:62.8,65.17 2 0 -github.com/LMaxence/gookme/packages/cli/clean.go:65.17,67.4 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:70.2,71.12 2 0 -github.com/LMaxence/gookme/packages/cli/clean.go:74.20,78.51 2 0 -github.com/LMaxence/gookme/packages/cli/clean.go:78.51,81.17 3 0 -github.com/LMaxence/gookme/packages/cli/clean.go:81.17,83.4 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:84.3,84.57 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:87.2,87.12 1 0 -github.com/LMaxence/gookme/packages/cli/clean.go:94.44,96.3 1 0 -github.com/LMaxence/gookme/packages/cli/cli.go:12.24,17.40 1 0 -github.com/LMaxence/gookme/packages/cli/cli.go:17.40,21.18 3 0 -github.com/LMaxence/gookme/packages/cli/cli.go:21.18,24.5 2 0 -github.com/LMaxence/gookme/packages/cli/cli.go:25.4,26.14 2 0 -github.com/LMaxence/gookme/packages/cli/cli.go:35.2,35.12 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:22.86,28.18 4 0 -github.com/LMaxence/gookme/packages/cli/init.go:28.18,30.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:30.8,31.44 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:31.44,33.18 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:33.18,35.5 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:36.4,36.43 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:40.2,43.18 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:48.9,52.16 3 0 -github.com/LMaxence/gookme/packages/cli/init.go:52.16,54.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:56.2,61.16 5 0 -github.com/LMaxence/gookme/packages/cli/init.go:61.16,63.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:65.2,65.12 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:65.12,71.17 5 0 -github.com/LMaxence/gookme/packages/cli/init.go:71.17,73.4 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:75.3,77.24 3 0 -github.com/LMaxence/gookme/packages/cli/init.go:78.8,83.3 4 0 -github.com/LMaxence/gookme/packages/cli/init.go:85.2,93.16 4 0 -github.com/LMaxence/gookme/packages/cli/init.go:93.16,95.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:97.2,102.16 5 0 -github.com/LMaxence/gookme/packages/cli/init.go:102.16,104.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:106.2,107.12 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:110.29,112.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:112.16,114.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:116.2,125.16 8 0 -github.com/LMaxence/gookme/packages/cli/init.go:125.16,127.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:129.2,130.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:130.16,132.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:134.2,135.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:135.16,137.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:139.2,140.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:140.16,142.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:144.2,145.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:145.16,147.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:149.2,149.12 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:152.46,153.30 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:153.30,156.3 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:158.2,159.42 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:159.42,161.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:163.2,165.42 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:165.42,168.17 3 0 -github.com/LMaxence/gookme/packages/cli/init.go:168.17,170.4 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:171.3,171.61 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:174.2,175.16 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:175.16,177.3 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:179.2,179.12 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:198.44,200.17 2 0 -github.com/LMaxence/gookme/packages/cli/init.go:200.17,202.4 1 0 -github.com/LMaxence/gookme/packages/cli/init.go:203.3,203.23 1 0 -github.com/LMaxence/gookme/packages/cli/run.go:26.84,28.16 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:28.16,30.3 1 0 -github.com/LMaxence/gookme/packages/cli/run.go:32.2,38.18 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:41.42,43.16 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:43.16,46.3 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:48.2,50.16 3 0 -github.com/LMaxence/gookme/packages/cli/run.go:50.16,53.3 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:55.2,56.38 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:56.38,62.3 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:64.2,66.16 3 0 -github.com/LMaxence/gookme/packages/cli/run.go:66.16,69.3 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:71.2,75.34 4 0 -github.com/LMaxence/gookme/packages/cli/run.go:75.34,77.3 1 0 -github.com/LMaxence/gookme/packages/cli/run.go:79.2,85.34 4 0 -github.com/LMaxence/gookme/packages/cli/run.go:85.34,89.3 3 0 -github.com/LMaxence/gookme/packages/cli/run.go:91.2,92.33 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:92.33,94.13 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:94.13,97.4 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:100.2,101.12 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:126.44,129.17 2 0 -github.com/LMaxence/gookme/packages/cli/run.go:129.17,131.4 1 0 -github.com/LMaxence/gookme/packages/cli/run.go:132.3,132.20 1 0 -github.com/LMaxence/gookme/packages/cli/validation.go:10.69,11.39 1 0 -github.com/LMaxence/gookme/packages/cli/validation.go:12.239,13.44 1 0 -github.com/LMaxence/gookme/packages/cli/validation.go:14.10,15.132 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:12.45,17.16 3 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:17.16,19.3 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:21.2,21.32 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:24.43,29.16 3 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:29.16,31.3 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:33.2,33.32 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:36.43,41.16 3 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:41.16,43.3 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:45.2,45.32 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:49.13,51.22 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:51.22,52.41 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:56.2,58.20 3 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:59.16,60.39 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:61.15,62.37 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:63.15,64.37 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:65.10,66.46 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:69.2,69.16 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:69.16,70.13 1 0 -github.com/LMaxence/gookme/cmd/schemas/main.go:73.2,73.21 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:36.115,46.34 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:46.34,53.17 5 0 -github.com/LMaxence/gookme/packages/executor/executor.go:53.17,55.12 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:56.9,58.4 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:61.2,61.10 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:64.60,68.2 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:70.64,73.9 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:73.9,75.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:77.2,77.18 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:80.79,84.16 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:84.16,87.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:90.2,92.16 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:92.16,95.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:97.2,97.19 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:97.19,101.3 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:104.77,107.16 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:107.16,110.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:113.2,115.16 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:115.16,117.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:120.97,122.41 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:122.41,124.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:124.8,124.49 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:124.49,126.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:126.8,126.49 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:126.49,128.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:128.8,128.49 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:128.49,130.3 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:133.2,133.81 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:133.81,135.17 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:135.17,138.4 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:140.3,142.17 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:142.17,145.4 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:149.58,156.26 5 0 -github.com/LMaxence/gookme/packages/executor/executor.go:156.26,159.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:161.2,170.16 5 0 -github.com/LMaxence/gookme/packages/executor/executor.go:170.16,175.3 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:177.2,178.16 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:178.16,182.3 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:184.2,185.16 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:185.16,189.3 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:190.2,195.12 4 0 -github.com/LMaxence/gookme/packages/executor/executor.go:195.12,198.22 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:198.22,201.4 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:203.3,203.12 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:206.2,206.12 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:206.12,209.22 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:209.22,212.4 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:214.3,214.12 1 0 -github.com/LMaxence/gookme/packages/executor/executor.go:217.2,218.16 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:218.16,221.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:221.8,224.3 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:227.30,232.29 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:232.29,237.18 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:237.18,241.4 3 0 -github.com/LMaxence/gookme/packages/executor/executor.go:241.9,243.14 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:243.14,246.5 2 0 -github.com/LMaxence/gookme/packages/executor/executor.go:250.2,250.11 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 0 -github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:11.92,15.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:15.16,17.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:18.2,18.24 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:18.24,20.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:22.2,22.19 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:25.38,30.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:30.16,33.3 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:35.2,35.24 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:35.24,38.17 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:38.17,40.4 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:43.2,43.12 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:46.36,51.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:51.16,54.3 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:56.2,56.24 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:56.24,59.17 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:59.17,61.4 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:62.3,62.21 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:65.2,65.12 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:10.99,15.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:15.16,17.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:18.2,18.29 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:21.106,26.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:26.16,28.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:30.2,30.12 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:33.84,38.16 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:38.16,40.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/io.go:42.2,42.12 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:26.73,33.2 4 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:36.57,43.29 4 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:43.29,44.38 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:44.38,48.4 3 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:51.2,51.44 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:57.10,67.29 6 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:67.29,68.41 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:68.41,70.4 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:71.3,71.39 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:71.39,73.4 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:76.2,77.22 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:77.22,80.3 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:81.2,81.20 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:81.20,84.3 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:86.2,86.78 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:92.19,95.63 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:95.63,97.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:100.2,101.9 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:101.9,103.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:104.2,109.16 4 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:109.16,111.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:114.2,116.40 2 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:116.40,118.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:118.8,118.45 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:118.45,120.3 1 0 -github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:120.8,122.3 1 0 -github.com/LMaxence/gookme/packages/configuration/configuration.go:21.62,26.2 2 1 -github.com/LMaxence/gookme/packages/configuration/loader.go:23.84,27.16 3 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:27.16,29.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:31.2,31.23 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:31.23,34.3 2 1 -github.com/LMaxence/gookme/packages/configuration/loader.go:36.2,41.16 4 2 -github.com/LMaxence/gookme/packages/configuration/loader.go:41.16,44.3 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:46.2,48.16 3 2 -github.com/LMaxence/gookme/packages/configuration/loader.go:48.16,51.3 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:53.2,53.21 1 2 -github.com/LMaxence/gookme/packages/configuration/loader.go:56.78,62.16 5 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:62.16,64.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:66.2,68.32 2 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:68.32,74.17 5 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:74.17,77.4 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:79.3,81.17 3 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:81.17,84.4 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:86.3,86.22 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:89.2,89.20 1 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:92.82,97.16 4 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:97.16,99.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:101.2,103.16 3 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:103.16,105.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:107.2,109.23 2 4 -github.com/LMaxence/gookme/packages/configuration/loader.go:109.23,112.3 2 1 -github.com/LMaxence/gookme/packages/configuration/loader.go:114.2,114.32 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:114.32,119.17 4 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:119.17,122.4 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:124.3,126.17 3 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:126.17,129.4 2 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:131.3,138.35 6 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:138.35,139.24 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:139.24,142.12 3 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:142.12,144.6 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:145.5,154.7 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:155.10,166.5 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:170.3,173.5 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:176.2,176.19 1 3 -github.com/LMaxence/gookme/packages/configuration/loader.go:179.91,181.16 2 1 -github.com/LMaxence/gookme/packages/configuration/loader.go:181.16,183.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:185.2,186.16 2 1 -github.com/LMaxence/gookme/packages/configuration/loader.go:186.16,188.3 1 0 -github.com/LMaxence/gookme/packages/configuration/loader.go:190.2,193.8 1 1 -github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 2 -github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 2 -github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 21 -github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 2 -github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 21 -github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 21 -github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 1 -github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 17 -github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 3 -github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 2 -github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 2 -github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 4 -github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 2 -github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 4 -github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 4 -github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 4 -github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:16.12,18.36 2 13 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:18.36,19.38 1 18 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:19.38,21.4 1 10 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:24.2,24.17 1 13 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:30.21,33.39 2 8 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:33.39,35.3 1 8 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:37.2,37.36 1 8 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:37.36,40.17 2 12 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:40.17,42.4 1 0 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:44.3,44.12 1 12 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:44.12,46.4 1 6 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:49.2,49.22 1 8 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:55.24,62.29 2 3 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:62.29,64.28 2 5 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:64.28,66.4 1 3 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:66.9,68.4 1 2 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:72.2,72.17 1 3 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:78.24,84.29 2 5 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:84.29,88.35 3 5 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:88.35,91.21 2 5 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:91.21,93.13 2 1 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:96.4,97.18 2 4 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:97.18,98.13 1 0 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:101.4,101.40 1 4 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:101.40,103.5 1 2 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:103.10,105.5 1 2 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:108.3,108.21 1 5 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:108.21,113.4 1 3 -github.com/LMaxence/gookme/packages/scheduler/scheduler.go:117.2,117.17 1 5 -github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 1 -github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 1 -github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 1 -github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:15.40,17.24 2 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:17.24,19.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:20.2,20.21 1 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:23.49,29.16 3 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:29.16,31.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:33.2,37.13 4 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:37.13,41.19 3 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:41.19,43.4 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:45.3,46.17 2 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:46.17,48.4 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:50.3,51.14 2 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:51.14,53.4 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:56.2,56.18 1 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:59.36,61.16 2 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:61.16,63.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:66.2,70.16 4 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:70.16,72.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:74.2,74.18 1 2 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:77.59,80.16 2 1 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:80.16,82.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:84.2,86.16 3 1 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:86.16,88.3 1 0 -github.com/LMaxence/gookme/packages/test-helpers/helpers.go:89.2,92.12 3 1 -github.com/LMaxence/gookme/packages/git-client/command.go:7.86,9.17 2 19 -github.com/LMaxence/gookme/packages/git-client/command.go:9.17,11.3 1 19 -github.com/LMaxence/gookme/packages/git-client/command.go:13.2,17.16 3 19 -github.com/LMaxence/gookme/packages/git-client/command.go:17.16,19.3 1 2 -github.com/LMaxence/gookme/packages/git-client/command.go:21.2,21.19 1 17 -github.com/LMaxence/gookme/packages/git-client/command.go:21.19,23.3 1 9 -github.com/LMaxence/gookme/packages/git-client/command.go:25.2,25.25 1 8 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:10.49,13.18 1 8 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:13.18,15.17 2 1 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:15.17,17.4 1 0 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:19.3,19.16 1 1 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:23.2,25.16 2 8 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:25.16,27.3 1 2 -github.com/LMaxence/gookme/packages/git-client/repo_path.go:29.2,29.44 1 6 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:17.84,19.16 2 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:19.16,21.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:23.2,24.22 2 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:24.22,34.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:34.8,44.3 1 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:46.2,46.16 1 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:46.16,48.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:50.2,50.46 1 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:53.87,55.16 2 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:55.16,57.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:59.2,61.22 2 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:61.22,70.3 1 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:70.8,81.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:83.2,83.16 1 2 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:83.16,85.3 1 0 -github.com/LMaxence/gookme/packages/git-client/staged_files.go:87.2,87.46 1 2 -github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 2 -github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 2 -github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 19 -github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 2 -github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 19 -github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 19 -github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 -github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 19 -github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 -github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:12.12,14.36 2 8 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:14.36,15.38 1 20 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:15.38,17.4 1 4 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:20.2,20.17 1 8 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:26.21,29.39 2 7 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:29.39,31.3 1 7 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:33.2,33.36 1 7 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:33.36,36.17 2 12 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:36.17,38.4 1 0 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:40.3,40.12 1 12 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:40.12,42.4 1 5 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:45.2,45.22 1 7 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:8.24,15.29 2 2 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:15.29,18.26 2 2 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:18.26,20.4 1 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:20.9,22.4 1 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:26.2,26.17 1 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:8.24,14.29 2 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:14.29,18.35 3 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:18.35,21.21 2 4 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:21.21,23.13 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:26.4,27.18 2 3 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:27.18,28.13 1 0 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:30.4,32.27 2 3 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:32.27,34.5 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:34.10,36.5 1 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:39.3,39.21 1 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:39.21,44.4 1 2 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:48.2,48.17 1 2 +github.com/LMaxence/gookme/packages/filters/strategies.go:15.95,19.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:21.70,23.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:33.119,39.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:41.70,43.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:51.97,55.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:57.71,59.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:69.126,74.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:76.82,78.2 1 0 diff --git a/coverage.txt b/coverage.txt new file mode 100644 index 0000000..f57d2dd --- /dev/null +++ b/coverage.txt @@ -0,0 +1,505 @@ +mode: set +github.com/LMaxence/gookme/cmd/cli/main.go:12.13,15.41 2 0 +github.com/LMaxence/gookme/cmd/cli/main.go:15.41,18.3 2 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:12.45,17.16 3 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:17.16,19.3 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:21.2,21.32 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:24.43,29.16 3 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:29.16,31.3 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:33.2,33.32 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:36.43,41.16 3 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:41.16,43.3 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:45.2,45.32 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:49.13,51.22 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:51.22,52.41 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:56.2,58.20 3 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:59.16,60.39 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:61.15,62.37 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:63.15,64.37 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:65.10,66.46 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:69.2,69.16 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:69.16,70.13 1 0 +github.com/LMaxence/gookme/cmd/schemas/main.go:73.2,73.21 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:19.9,23.16 3 0 +github.com/LMaxence/gookme/packages/cli/clean.go:23.16,25.3 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:27.2,32.16 5 0 +github.com/LMaxence/gookme/packages/cli/clean.go:32.16,34.3 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:36.2,36.12 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:36.12,42.17 5 0 +github.com/LMaxence/gookme/packages/cli/clean.go:42.17,44.4 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:47.3,49.24 3 0 +github.com/LMaxence/gookme/packages/cli/clean.go:50.8,53.3 2 0 +github.com/LMaxence/gookme/packages/cli/clean.go:55.2,57.49 2 0 +github.com/LMaxence/gookme/packages/cli/clean.go:57.49,60.17 3 0 +github.com/LMaxence/gookme/packages/cli/clean.go:60.17,62.4 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:63.8,66.17 2 0 +github.com/LMaxence/gookme/packages/cli/clean.go:66.17,68.4 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:71.2,72.12 2 0 +github.com/LMaxence/gookme/packages/cli/clean.go:75.20,76.51 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:76.51,78.17 2 0 +github.com/LMaxence/gookme/packages/cli/clean.go:78.17,80.4 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:81.3,81.57 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:84.2,84.12 1 0 +github.com/LMaxence/gookme/packages/cli/clean.go:91.44,93.3 1 0 +github.com/LMaxence/gookme/packages/cli/cli.go:12.24,17.40 1 0 +github.com/LMaxence/gookme/packages/cli/cli.go:17.40,21.18 3 0 +github.com/LMaxence/gookme/packages/cli/cli.go:21.18,24.5 2 0 +github.com/LMaxence/gookme/packages/cli/cli.go:25.4,26.14 2 0 +github.com/LMaxence/gookme/packages/cli/cli.go:35.2,35.12 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:22.86,28.18 4 0 +github.com/LMaxence/gookme/packages/cli/init.go:28.18,30.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:30.8,31.44 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:31.44,33.18 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:33.18,35.5 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:36.4,36.43 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:40.2,43.18 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:48.9,52.16 3 0 +github.com/LMaxence/gookme/packages/cli/init.go:52.16,54.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:56.2,61.16 5 0 +github.com/LMaxence/gookme/packages/cli/init.go:61.16,63.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:65.2,65.12 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:65.12,71.17 5 0 +github.com/LMaxence/gookme/packages/cli/init.go:71.17,73.4 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:75.3,77.24 3 0 +github.com/LMaxence/gookme/packages/cli/init.go:78.8,83.3 4 0 +github.com/LMaxence/gookme/packages/cli/init.go:85.2,93.16 4 0 +github.com/LMaxence/gookme/packages/cli/init.go:93.16,95.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:97.2,102.16 5 0 +github.com/LMaxence/gookme/packages/cli/init.go:102.16,104.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:106.2,107.12 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:110.29,112.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:112.16,114.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:116.2,125.16 8 0 +github.com/LMaxence/gookme/packages/cli/init.go:125.16,127.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:129.2,130.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:130.16,132.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:134.2,135.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:135.16,137.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:139.2,140.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:140.16,142.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:144.2,145.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:145.16,147.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:149.2,149.12 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:152.46,153.30 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:153.30,156.3 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:158.2,159.42 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:159.42,161.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:163.2,165.42 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:165.42,168.17 3 0 +github.com/LMaxence/gookme/packages/cli/init.go:168.17,170.4 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:171.3,171.61 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:174.2,175.16 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:175.16,177.3 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:179.2,179.12 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:198.44,200.17 2 0 +github.com/LMaxence/gookme/packages/cli/init.go:200.17,202.4 1 0 +github.com/LMaxence/gookme/packages/cli/init.go:203.3,203.23 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:26.104,29.38 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:29.38,32.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:32.8,32.59 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:32.59,35.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:35.8,35.62 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:35.62,38.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:38.8,41.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:43.2,43.35 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:46.84,48.16 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:48.16,50.3 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:52.2,58.18 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:61.42,63.16 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:63.16,66.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:68.2,70.16 3 0 +github.com/LMaxence/gookme/packages/cli/run.go:70.16,73.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:75.2,77.16 3 0 +github.com/LMaxence/gookme/packages/cli/run.go:77.16,80.3 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:82.2,86.34 4 0 +github.com/LMaxence/gookme/packages/cli/run.go:86.34,88.3 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:90.2,96.34 4 0 +github.com/LMaxence/gookme/packages/cli/run.go:96.34,100.3 3 0 +github.com/LMaxence/gookme/packages/cli/run.go:102.2,103.33 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:103.33,105.13 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:105.13,108.4 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:111.2,112.12 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:137.44,140.17 2 0 +github.com/LMaxence/gookme/packages/cli/run.go:140.17,142.4 1 0 +github.com/LMaxence/gookme/packages/cli/run.go:143.3,143.20 1 0 +github.com/LMaxence/gookme/packages/cli/validation.go:10.69,11.39 1 0 +github.com/LMaxence/gookme/packages/cli/validation.go:12.311,13.44 1 0 +github.com/LMaxence/gookme/packages/cli/validation.go:14.10,15.132 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:36.115,46.34 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:46.34,53.17 5 0 +github.com/LMaxence/gookme/packages/executor/executor.go:53.17,55.12 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:56.9,58.4 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:61.2,61.10 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:64.60,68.2 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:70.64,73.9 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:73.9,75.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:77.2,77.18 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:80.79,84.16 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:84.16,87.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:90.2,92.16 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:92.16,95.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:97.2,97.19 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:97.19,101.3 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:104.77,107.16 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:107.16,110.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:113.2,115.16 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:115.16,117.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:120.97,122.41 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:122.41,124.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:124.8,124.49 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:124.49,126.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:126.8,126.49 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:126.49,128.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:128.8,128.49 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:128.49,130.3 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:133.2,133.81 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:133.81,135.17 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:135.17,138.4 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:140.3,142.17 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:142.17,145.4 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:149.58,159.26 7 0 +github.com/LMaxence/gookme/packages/executor/executor.go:159.26,162.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:164.2,173.16 5 0 +github.com/LMaxence/gookme/packages/executor/executor.go:173.16,178.3 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:180.2,181.16 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:181.16,185.3 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:187.2,188.16 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:188.16,192.3 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:193.2,198.12 4 0 +github.com/LMaxence/gookme/packages/executor/executor.go:198.12,201.22 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:201.22,204.4 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:206.3,206.12 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:209.2,209.12 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:209.12,212.22 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:212.22,215.4 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:217.3,217.12 1 0 +github.com/LMaxence/gookme/packages/executor/executor.go:220.2,221.16 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:221.16,224.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:224.8,227.3 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:230.30,235.29 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:235.29,240.18 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:240.18,244.4 3 0 +github.com/LMaxence/gookme/packages/executor/executor.go:244.9,246.14 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:246.14,249.5 2 0 +github.com/LMaxence/gookme/packages/executor/executor.go:253.2,253.11 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:11.92,15.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:15.16,17.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:18.2,18.24 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:18.24,20.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:22.2,22.19 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:25.38,30.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:30.16,33.3 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:35.2,35.24 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:35.24,38.17 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:38.17,40.4 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:43.2,43.12 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:46.36,51.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:51.16,54.3 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:56.2,56.24 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:56.24,59.17 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:59.17,61.4 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:62.3,62.21 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/checks.go:65.2,65.12 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:10.99,15.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:15.16,17.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:18.2,18.29 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:21.106,26.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:26.16,28.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:30.2,30.12 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:33.84,38.16 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:38.16,40.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/io.go:42.2,42.12 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:23.73,30.2 4 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:33.57,40.29 4 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:40.29,41.38 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:41.38,45.4 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:48.2,48.44 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:54.10,64.29 6 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:64.29,65.41 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:65.41,67.4 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:68.3,68.39 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:68.39,70.4 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:73.2,74.22 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:74.22,77.3 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:78.2,78.20 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:78.20,81.3 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:83.2,83.78 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:89.19,92.63 2 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:92.63,94.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:96.2,106.40 3 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:106.40,108.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:108.8,108.45 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:108.45,110.3 1 0 +github.com/LMaxence/gookme/packages/hooks-scripts/scripts.go:110.8,112.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 0 +github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:12.12,14.36 2 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:14.36,15.38 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:15.38,17.4 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:20.2,20.17 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:26.21,29.39 2 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:29.39,31.3 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:33.2,33.36 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:33.36,36.17 2 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:36.17,38.4 1 0 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:40.3,40.12 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:40.12,42.4 1 1 +github.com/LMaxence/gookme/packages/filters/changeset_filters.go:45.2,45.22 1 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:8.24,15.29 2 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:15.29,18.26 2 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:18.26,20.4 1 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:20.9,22.4 1 1 +github.com/LMaxence/gookme/packages/filters/hooks_filter.go:26.2,26.17 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:8.24,14.29 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:14.29,18.35 3 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:18.35,21.21 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:21.21,23.13 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:26.4,27.18 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:27.18,28.13 1 0 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:30.4,32.27 2 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:32.27,34.5 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:34.10,36.5 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:39.3,39.21 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:39.21,44.4 1 1 +github.com/LMaxence/gookme/packages/filters/steps_filter.go:48.2,48.17 1 1 +github.com/LMaxence/gookme/packages/filters/strategies.go:15.95,19.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:21.70,23.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:33.119,39.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:41.70,43.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:51.97,55.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:57.71,59.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:69.126,74.2 1 0 +github.com/LMaxence/gookme/packages/filters/strategies.go:76.82,78.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 1 +github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 +github.com/LMaxence/gookme/packages/configuration/configuration.go:21.62,26.2 2 1 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:16.39,24.2 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:26.44,33.2 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:35.36,42.2 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:44.63,47.2 2 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:49.64,52.2 2 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:60.47,66.2 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:68.44,70.32 2 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:70.32,72.3 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:74.2,78.3 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:81.38,88.32 2 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:88.32,95.3 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:97.2,97.13 1 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:100.64,103.2 2 0 +github.com/LMaxence/gookme/packages/configuration/fixtures.go:105.68,108.2 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:23.84,27.16 3 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:27.16,29.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:31.2,31.23 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:31.23,34.3 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:36.2,41.16 4 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:41.16,44.3 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:46.2,48.16 3 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:48.16,51.3 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:53.2,53.21 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:56.78,62.16 5 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:62.16,64.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:66.2,68.32 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:68.32,74.17 5 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:74.17,77.4 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:79.3,81.17 3 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:81.17,84.4 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:86.3,86.22 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:89.2,89.20 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:92.82,97.16 4 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:97.16,99.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:101.2,103.16 3 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:103.16,105.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:107.2,109.23 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:109.23,112.3 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:114.2,114.32 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:114.32,119.17 4 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:119.17,122.4 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:124.3,126.17 3 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:126.17,129.4 2 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:131.3,138.35 6 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:138.35,139.24 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:139.24,142.12 3 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:142.12,144.6 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:145.5,154.7 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:155.10,167.5 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:171.3,175.5 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:178.2,178.19 1 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:181.91,183.16 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:183.16,185.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:187.2,188.16 2 1 +github.com/LMaxence/gookme/packages/configuration/loader.go:188.16,190.3 1 0 +github.com/LMaxence/gookme/packages/configuration/loader.go:192.2,195.8 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 1 +github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 1 +github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:15.40,17.24 2 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:17.24,19.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:20.2,20.21 1 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:23.49,29.16 3 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:29.16,31.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:33.2,37.13 4 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:37.13,41.19 3 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:41.19,43.4 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:45.3,46.17 2 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:46.17,48.4 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:50.3,51.14 2 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:51.14,53.4 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:56.2,56.18 1 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:59.36,61.16 2 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:61.16,63.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:66.2,70.16 4 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:70.16,72.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:74.2,74.18 1 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:77.59,80.16 2 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:80.16,82.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:84.2,86.16 3 1 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:86.16,88.3 1 0 +github.com/LMaxence/gookme/packages/test-helpers/helpers.go:89.2,92.12 3 1 +github.com/LMaxence/gookme/packages/git-client/command.go:7.86,9.17 2 1 +github.com/LMaxence/gookme/packages/git-client/command.go:9.17,11.3 1 1 +github.com/LMaxence/gookme/packages/git-client/command.go:13.2,17.16 3 1 +github.com/LMaxence/gookme/packages/git-client/command.go:17.16,19.3 1 1 +github.com/LMaxence/gookme/packages/git-client/command.go:21.2,21.19 1 1 +github.com/LMaxence/gookme/packages/git-client/command.go:21.19,23.3 1 1 +github.com/LMaxence/gookme/packages/git-client/command.go:25.2,25.25 1 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:10.49,13.18 1 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:13.18,15.17 2 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:15.17,17.4 1 0 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:19.3,19.16 1 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:23.2,25.16 2 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:25.16,27.3 1 1 +github.com/LMaxence/gookme/packages/git-client/repo_path.go:29.2,29.44 1 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:21.21,23.16 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:23.16,25.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:27.2,37.16 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:37.16,39.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:41.2,41.46 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:44.62,52.16 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:52.16,54.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:56.2,56.46 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:59.60,61.16 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:61.16,63.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:65.2,65.23 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:65.23,68.3 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:70.2,72.56 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:75.56,77.16 2 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:77.16,79.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:81.2,91.16 2 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:91.16,93.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:95.2,95.46 1 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:98.59,100.16 2 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:100.16,102.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:104.2,113.16 2 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:113.16,115.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:117.2,117.46 1 1 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:120.78,130.16 2 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:130.16,132.3 1 0 +github.com/LMaxence/gookme/packages/git-client/staged_files.go:134.2,134.46 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:10.35,13.16 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:13.16,15.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:17.2,17.14 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:20.34,23.2 2 1 +github.com/LMaxence/gookme/packages/logging/logger.go:29.37,44.2 4 1 +github.com/LMaxence/gookme/packages/logging/logger.go:46.46,47.29 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:47.29,49.3 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:50.2,50.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:53.63,56.35 2 0 +github.com/LMaxence/gookme/packages/logging/logger.go:56.35,58.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.2,60.33 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:60.33,62.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:64.2,66.3 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:69.45,71.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:73.61,75.2 1 1 +github.com/LMaxence/gookme/packages/logging/logger.go:77.45,79.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:81.61,83.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:85.44,87.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:89.60,91.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:93.44,95.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:97.60,99.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:101.45,103.2 1 0 +github.com/LMaxence/gookme/packages/logging/logger.go:105.61,107.2 1 0 diff --git a/docs/getting-started.md b/docs/getting-started.md index 08ccd19..8a5c429 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -105,6 +105,14 @@ With `Gookme`, your hooks are stored in JSON files called `{hook-type}.json` whe 3. Other selections (`onlyOn` for instance) are applied on each step of each package, based on the list of paths attached to the package and it's steps. +!!! tip + Depending on the hook type being executed, or the arguments passed to the command, the list of paths can be different. + + - The hook type `pre-push` will consider the list of files to be pushed to the remote server + - The hook type `post-commit` will consider the list of files included in the last commit + - If the `run` command argument --from and --to are used, the list of paths will be the list of files changed between the two commits + - All other hook types will use the list of files changed in the current commit, and staged + ### Example of hook file Your hooks are defined in simple json files. diff --git a/docs/reference.md b/docs/reference.md index 3762e3f..a6fbfd5 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -76,10 +76,14 @@ A set of arguments is provided by Mookme, that can be directly used in the hooks ````json title="hooks/commit-msg.json" { - "command": "run-something $1" // Will be replaced with the value of `args` + "command": "run-something $1" // (1)! + "command": "run-something $MATCHED_FILES" // (2)! + "command": "run-something $PACKAGE_FILES" // (3)! } ```` -- `$1` +1. The argument being passed by git to the hook file. See [the Git documentation on the hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for more details about what it contains depending on the hook type being executed. -The argument being passed by git to the hook file. See [the Git documentation on the hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for more details about what it contains depending on the hook type being executed. +2. The list of changed files matched by the onlyOn option of this step, separated by a space. If the onlyOn option is not set, it will be replaced with an empty string. + +3. The list of changed files in the package folder, separated by a space. diff --git a/mkdocs.yml b/mkdocs.yml index 60d6504..f761c2e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ theme: features: - content.tabs.link + - content.code.annotate palette: - media: "(prefers-color-scheme)" diff --git a/packages/cli/run.go b/packages/cli/run.go index 18e14f2..791ec21 100644 --- a/packages/cli/run.go +++ b/packages/cli/run.go @@ -7,8 +7,8 @@ import ( "github.com/LMaxence/gookme/packages/configuration" "github.com/LMaxence/gookme/packages/executor" + "github.com/LMaxence/gookme/packages/filters" gitclient "github.com/LMaxence/gookme/packages/git-client" - "github.com/LMaxence/gookme/packages/scheduler" "github.com/urfave/cli/v2" ) @@ -23,6 +23,26 @@ type RunCommandArguments struct { To string } +func selectResolvingStrategy(dir string, args *RunCommandArguments) filters.ChangesetResolvingStrategy { + var changesetResolvingStrategy filters.ChangesetResolvingStrategy + + if args.From != "" && args.To != "" { + logger.Debugf("Using FromToChangesResolvingStrategy") + changesetResolvingStrategy = filters.NewFromToChangesResolvingStrategy(dir, args.From, args.To) + } else if args.HookType == configuration.PrePushHookType { + logger.Debugf("Using PrePushChangesResolvingStrategy") + changesetResolvingStrategy = filters.NewStagedChangesResolvingStrategy(dir) + } else if args.HookType == configuration.PostCommitHookType { + logger.Debugf("Using StagedChangesResolvingStrategy") + changesetResolvingStrategy = filters.NewStagedChangesResolvingStrategy(dir) + } else { + logger.Debugf("Using StagedChangesResolvingStrategy") + changesetResolvingStrategy = filters.NewStagedChangesResolvingStrategy(dir) + } + + return changesetResolvingStrategy +} + func parseRunCommandArguments(cContext *cli.Context) (*RunCommandArguments, error) { hookType, err := validateHookType(cContext.String("type")) if err != nil { @@ -52,24 +72,15 @@ func run(args RunCommandArguments) error { return err } - var delimiter *gitclient.GitRefDelimiter - if args.From != "" && args.To != "" { - logger.Debugf("Setting Git ref delimiter from %s to %s", args.From, args.To) - delimiter = &gitclient.GitRefDelimiter{ - From: args.From, - To: args.To, - } - } - - changedPaths, err := gitclient.GetStagedFiles(&dir, delimiter) - logger.Tracef("Staged files: %v", changedPaths) + changedPaths, err := selectResolvingStrategy(dir, &args).Resolve() + logger.Tracef("Resolved changeset: %v", changedPaths) if err != nil { logger.Errorf("Error while getting staged files: %s", err) return err } - conf.Hooks = scheduler.FilterHooksWithChangeset(changedPaths, conf.Hooks) - conf.Hooks = scheduler.FilterStepsWithOnlyOn(changedPaths, conf.Hooks) + conf.Hooks = filters.FilterHooksWithChangeset(changedPaths, conf.Hooks) + conf.Hooks = filters.FilterStepsWithOnlyOn(changedPaths, conf.Hooks) nSteps := 0 for _, hook := range conf.Hooks { diff --git a/packages/cli/validation.go b/packages/cli/validation.go index b4b2729..9739b76 100644 --- a/packages/cli/validation.go +++ b/packages/cli/validation.go @@ -9,7 +9,7 @@ import ( func validateHookType(value string) (configuration.HookType, error) { switch configuration.HookType(value) { - case configuration.PreCommit, configuration.CommitMsg, configuration.PostCheckout, configuration.PostMerge, configuration.PostRewrite, configuration.PrePush, configuration.PreRebase, configuration.PostCommit, configuration.PrepareCommit: + case configuration.PreCommitHookType, configuration.CommitMsgHookType, configuration.PostCheckoutHookType, configuration.PostMergeHookType, configuration.PostRewriteHookType, configuration.PrePushHookType, configuration.PreRebaseHookType, configuration.PostCommitHookType, configuration.PrepareCommitHookType: return configuration.HookType(value), nil default: return "", fmt.Errorf("invalid HookType: %s. Accepted values are: %s", value, strings.Join(configuration.ALL_HOOKS_STRING, ", ")) diff --git a/packages/configuration/fixtures.go b/packages/configuration/fixtures.go new file mode 100644 index 0000000..5b144a4 --- /dev/null +++ b/packages/configuration/fixtures.go @@ -0,0 +1,108 @@ +package configuration + +import ( + "fmt" + + "github.com/google/uuid" +) + +type StepFixture struct { + id string + name string + onlyOn *string + files []string +} + +func (sf *StepFixture) ToStep() *Step { + return &Step{ + Name: sf.name, + OnlyOn: sf.onlyOn, + Command: "echo Hello world", + ID: sf.id, + Files: sf.files, + } +} + +func (sf *StepFixture) Copy() *StepFixture { + return &StepFixture{ + id: uuid.NewString(), + name: sf.name, + onlyOn: sf.onlyOn, + files: append([]string{}, sf.files...), + } +} + +func NewStepFixture() *StepFixture { + return &StepFixture{ + id: uuid.NewString(), + name: uuid.NewString(), + onlyOn: nil, + files: make([]string, 0), + } +} + +func (sf *StepFixture) WithOnlyOn(onlyOn string) *StepFixture { + sf.onlyOn = &onlyOn + return sf +} + +func (sf *StepFixture) WithFiles(files ...string) *StepFixture { + sf.files = files + return sf +} + +type HookFixture struct { + path string + files []string + steps []*StepFixture +} + +func NewHookFixture(path string) *HookFixture { + return &HookFixture{ + path: path, + steps: make([]*StepFixture, 0), + files: make([]string, 0), + } +} + +func (hf *HookFixture) Copy() *HookFixture { + steps := make([]*StepFixture, 0) + for _, step := range hf.steps { + steps = append(steps, step.Copy()) + } + + return &HookFixture{ + path: hf.path, + steps: steps, + files: append([]string{}, hf.files...), + } +} + +func (hf *HookFixture) ToHook() Hook { + hook := Hook{ + Path: hf.path, + Steps: []Step{}, + Files: hf.files, + } + + for i, step := range hf.steps { + hook.Steps = append(hook.Steps, Step{ + OnlyOn: step.onlyOn, + Command: "echo Hello world", + ID: fmt.Sprintf("step%d", i), + Files: step.files, + }) + } + + return hook +} + +func (hf *HookFixture) WithFiles(files ...string) *HookFixture { + hf.files = append(hf.files, files...) + return hf +} + +func (hf *HookFixture) WithStep(step ...*StepFixture) *HookFixture { + hf.steps = append(hf.steps, step...) + return hf +} diff --git a/packages/configuration/hook.go b/packages/configuration/hook.go index f80eb74..0571057 100644 --- a/packages/configuration/hook.go +++ b/packages/configuration/hook.go @@ -12,42 +12,43 @@ type HookConfiguration struct { type HookType string const ( - PreCommit HookType = "pre-commit" - PrepareCommit HookType = "prepare-commit-msg" - CommitMsg HookType = "commit-msg" - PostCommit HookType = "post-commit" - PostMerge HookType = "post-merge" - PostRewrite HookType = "post-rewrite" - PreRebase HookType = "pre-rebase" - PostCheckout HookType = "post-checkout" - PrePush HookType = "pre-push" + PreCommitHookType HookType = "pre-commit" + PrepareCommitHookType HookType = "prepare-commit-msg" + CommitMsgHookType HookType = "commit-msg" + PostCommitHookType HookType = "post-commit" + PostMergeHookType HookType = "post-merge" + PostRewriteHookType HookType = "post-rewrite" + PreRebaseHookType HookType = "pre-rebase" + PostCheckoutHookType HookType = "post-checkout" + PrePushHookType HookType = "pre-push" ) var ALL_HOOKS = []HookType{ - PreCommit, - PrepareCommit, - CommitMsg, - PostCommit, - PostMerge, - PostRewrite, - PreRebase, - PostCheckout, - PrePush, + PreCommitHookType, + PrepareCommitHookType, + CommitMsgHookType, + PostCommitHookType, + PostMergeHookType, + PostRewriteHookType, + PreRebaseHookType, + PostCheckoutHookType, + PrePushHookType, } var ALL_HOOKS_STRING = []string{ - string(PreCommit), - string(PrepareCommit), - string(CommitMsg), - string(PostCommit), - string(PostMerge), - string(PostRewrite), - string(PreRebase), - string(PostCheckout), - string(PrePush), + string(PreCommitHookType), + string(PrepareCommitHookType), + string(CommitMsgHookType), + string(PostCommitHookType), + string(PostMergeHookType), + string(PostRewriteHookType), + string(PreRebaseHookType), + string(PostCheckoutHookType), + string(PrePushHookType), } type Hook struct { Path string + Files []string Steps []Step } diff --git a/packages/configuration/loader.go b/packages/configuration/loader.go index 53d021b..90921f4 100644 --- a/packages/configuration/loader.go +++ b/packages/configuration/loader.go @@ -162,6 +162,7 @@ func LoadHooksConfiguration(directory string, hookType HookType) ([]Hook, error) OnlyOn: step.OnlyOn, From: step.From, ID: uuid.NewString(), + Files: make([]string, 0), }) } @@ -169,6 +170,7 @@ func LoadHooksConfiguration(directory string, hookType HookType) ([]Hook, error) hooks = append(hooks, Hook{ Path: filepath.Dir(filepath.Dir(path)), + Files: make([]string, 0), Steps: steps, }) } diff --git a/packages/configuration/loader_test.go b/packages/configuration/loader_test.go index 014f21a..954640c 100644 --- a/packages/configuration/loader_test.go +++ b/packages/configuration/loader_test.go @@ -43,7 +43,7 @@ func TestLoadHooksConfiguration(t *testing.T) { assert.NoError(t, err) // Call the function - hooks, err := LoadHooksConfiguration(directory, PreCommit) + hooks, err := LoadHooksConfiguration(directory, PreCommitHookType) assert.NoError(t, err) assert.Len(t, hooks, 1) @@ -62,7 +62,7 @@ func TestLoadNestedHooksConfiguration(t *testing.T) { assert.NoError(t, err) // Call the function - hooks, err := LoadHooksConfiguration(directory, PreCommit) + hooks, err := LoadHooksConfiguration(directory, PreCommitHookType) assert.NoError(t, err) assert.Len(t, hooks, 1) @@ -76,7 +76,7 @@ func TestLoadHooksConfigurationFromEmptyDirectory(t *testing.T) { directory, err := helpers.SetupTmpGit() assert.NoError(t, err) - hooks, err := LoadHooksConfiguration(directory, PreCommit) + hooks, err := LoadHooksConfiguration(directory, PreCommitHookType) assert.NoError(t, err) assert.Equal(t, []Hook{}, hooks) } @@ -92,7 +92,7 @@ func TestLoadConfiguration(t *testing.T) { err = helpers.WriteFile(filepath.Join(directory, "hooks"), "pre-commit.json", `{"steps": [{"name": "step1", "command": "echo 'Hello World'"}]}`) assert.NoError(t, err) - config, err := LoadConfiguration(directory, PreCommit) + config, err := LoadConfiguration(directory, PreCommitHookType) assert.NoError(t, err) assert.NotNil(t, config) diff --git a/packages/configuration/step.go b/packages/configuration/step.go index b20c95f..c6856b3 100644 --- a/packages/configuration/step.go +++ b/packages/configuration/step.go @@ -29,4 +29,5 @@ type Step struct { Serial bool From *string PackageRelativePath string + Files []string } diff --git a/packages/executor/executor.go b/packages/executor/executor.go index 3c9f201..a8d2d2f 100644 --- a/packages/executor/executor.go +++ b/packages/executor/executor.go @@ -150,6 +150,9 @@ func (h *HookExecutor) RunStep(step *configuration.Step) { h.onStepStatusChange(step, StepExecutionStatusRunning) cmd := strings.ReplaceAll(step.Command, "$1", strings.Join(h.gitCommandArguments, " ")) + cmd = strings.ReplaceAll(cmd, "$MATCHED_FILES", strings.Join(step.Files, " ")) + cmd = strings.ReplaceAll(cmd, "$PACKAGE_FILES", strings.Join(h.hook.Files, "")) + command := exec.Command("sh", "-c", cmd) command.Dir = h.hook.Path diff --git a/packages/filters/changeset_filters.go b/packages/filters/changeset_filters.go new file mode 100644 index 0000000..825b79e --- /dev/null +++ b/packages/filters/changeset_filters.go @@ -0,0 +1,46 @@ +package filters + +import ( + "strings" + + "github.com/bmatcuk/doublestar/v4" +) + +func filterChangesetWithPrefix( + changedPaths []string, + prefix string, +) []string { + filtered := make([]string, 0) + for _, path := range changedPaths { + if strings.HasPrefix(path, prefix) { + filtered = append(filtered, path) + } + } + + return filtered +} + +func filterChangesetWithPattern( + changedPaths []string, + pattern string, +) ([]string, error) { + filtered := make([]string, 0) + + if !strings.HasPrefix(pattern, "**") { + pattern = "**/" + pattern + } + + for _, path := range changedPaths { + + match, err := doublestar.Match(pattern, path) + if err != nil { + return nil, err + } + + if match { + filtered = append(filtered, path) + } + } + + return filtered, nil +} diff --git a/packages/filters/changeset_filters_test.go b/packages/filters/changeset_filters_test.go new file mode 100644 index 0000000..61b67da --- /dev/null +++ b/packages/filters/changeset_filters_test.go @@ -0,0 +1,99 @@ +package filters + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +var filterChangesetWithPrefixTestCases = []struct { + ID string + prefix string + changeset []string + expected []string +}{ + { + ID: "Match prefix", + prefix: "foo/bar", + changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + expected: []string{"foo/bar/item.json"}, + }, + { + ID: "No match", + prefix: "bar", + changeset: []string{"foo/bar/item.json", "foo/item.go", "foo/main.go"}, + expected: []string{}, + }, + { + ID: "No match - other prefix", + prefix: "fizz/buzz", + changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + expected: []string{}, + }, + { + ID: "Empty changeset", + prefix: "foo/bar", + changeset: []string{}, + expected: []string{}, + }, +} + +func TestFilterChangesetWithPrefix(t *testing.T) { + for _, tc := range filterChangesetWithPrefixTestCases { + t.Run(tc.ID, func(t *testing.T) { + res := filterChangesetWithPrefix(tc.changeset, tc.prefix) + assert.Equal(t, tc.expected, res) + }) + } +} + +var filterChangesetWithPatternTestCases = []struct { + ID string + pattern string + changeset []string + expected []string + error bool +}{ + { + ID: "Match pattern", + pattern: "foo/**", + changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + expected: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + error: false, + }, + { + ID: "Match pattern - no prefix", + pattern: "*.json", + changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + expected: []string{"foo/bar/item.json"}, + error: false, + }, + { + ID: "No match", + pattern: "*.js", + changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + expected: []string{}, + error: false, + }, + { + ID: "Empty changeset", + pattern: "*.go", + changeset: []string{}, + expected: []string{}, + error: false, + }, +} + +func TestFilterChangesetWithPattern(t *testing.T) { + for _, tc := range filterChangesetWithPatternTestCases { + t.Run(tc.ID, func(t *testing.T) { + res, err := filterChangesetWithPattern(tc.changeset, tc.pattern) + if tc.error { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + assert.Equal(t, tc.expected, res) + }) + } +} diff --git a/packages/filters/hooks_filter.go b/packages/filters/hooks_filter.go new file mode 100644 index 0000000..35f4f27 --- /dev/null +++ b/packages/filters/hooks_filter.go @@ -0,0 +1,27 @@ +package filters + +import "github.com/LMaxence/gookme/packages/configuration" + +func FilterHooksWithChangeset( + changedPaths []string, + hooks []configuration.Hook, +) []configuration.Hook { + filtered := make([]configuration.Hook, 0) + + // For each hook, check if the hook directory is contained by one of the changeset's elements. + // If it is the case, add the hook to the list of hooks to execute + // If the hook is not in the changeset, skip it + + for _, hook := range hooks { + hook.Files = append(hook.Files, filterChangesetWithPrefix(changedPaths, hook.Path)...) + + if len(hook.Files) > 0 { + filtered = append(filtered, hook) + } else { + logger.Debugf("Hook %s did not match any file, dropping", hook.Path) + } + } + + // Return the list of hooks to execute + return filtered +} diff --git a/packages/filters/hooks_filter_test.go b/packages/filters/hooks_filter_test.go new file mode 100644 index 0000000..b0cd485 --- /dev/null +++ b/packages/filters/hooks_filter_test.go @@ -0,0 +1,57 @@ +package filters + +import ( + "testing" + + "github.com/LMaxence/gookme/packages/configuration" + "github.com/stretchr/testify/assert" +) + +type HookFilterTestCase struct { + ID string + Changeset []string + Hooks []configuration.Hook + Expected []configuration.Hook +} + +func getHookFiltersTestCases() []HookFilterTestCase { + cases := []HookFilterTestCase{} + + // Case 1: Hook is in the changeset + + hook := configuration.NewHookFixture("foo/bar") + expectedHook := configuration.NewHookFixture("foo/bar").WithFiles("foo/bar/item.json") + + cases = append(cases, HookFilterTestCase{ + ID: "Hook is in the changeset", + Changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + Hooks: []configuration.Hook{hook.ToHook()}, + Expected: []configuration.Hook{expectedHook.ToHook()}, + }) + + // Case 2: Hook is not in the changeset + + hook = configuration.NewHookFixture("foo/bar").WithFiles() + + cases = append(cases, HookFilterTestCase{ + ID: "Hook is not in the changeset", + Changeset: []string{"bar/foo/item.go", "foo/main.go"}, + Hooks: []configuration.Hook{hook.ToHook()}, + Expected: []configuration.Hook{}, + }) + + return cases +} + +func TestFilterHooksWithChangeset(t *testing.T) { + for _, tc := range getHookFiltersTestCases() { + t.Run(tc.ID, func(t *testing.T) { + res := FilterHooksWithChangeset(tc.Changeset, tc.Hooks) + + for i, hook := range res { + assert.Equal(t, tc.Expected[i].Path, hook.Path) + assert.Equal(t, tc.Expected[i].Files, hook.Files) + } + }) + } +} diff --git a/packages/filters/main.go b/packages/filters/main.go new file mode 100644 index 0000000..e88b7e1 --- /dev/null +++ b/packages/filters/main.go @@ -0,0 +1,7 @@ +package filters + +import ( + "github.com/LMaxence/gookme/packages/logging" +) + +var logger = logging.NewLogger("filters") diff --git a/packages/filters/steps_filter.go b/packages/filters/steps_filter.go new file mode 100644 index 0000000..343692b --- /dev/null +++ b/packages/filters/steps_filter.go @@ -0,0 +1,49 @@ +package filters + +import "github.com/LMaxence/gookme/packages/configuration" + +func FilterStepsWithOnlyOn( + changedPaths []string, + hooks []configuration.Hook, +) []configuration.Hook { + filtered := make([]configuration.Hook, 0) + + // For each hook, check if the hook directory is contained by one of the changeset's elements. + // If it is the case, add the hook to the list of hooks to execute + + for _, hook := range hooks { + steps := make([]configuration.Step, 0) + changedPaths := filterChangesetWithPrefix(changedPaths, hook.Path) + + for _, step := range hook.Steps { + onlyOn := step.OnlyOn + + if onlyOn == nil { + steps = append(steps, step) + continue + } + + changedPathsWithPattern, err := filterChangesetWithPattern(changedPaths, *onlyOn) + if err != nil { + continue + } + step.Files = append(step.Files, changedPathsWithPattern...) + + if len(step.Files) > 0 { + steps = append(steps, step) + } else { + logger.Debugf("Step %s:%s did not match any file using pattern %s, dropping", step.PackageRelativePath, step.Name, *onlyOn) + } + } + + if len(steps) > 0 { + filtered = append(filtered, configuration.Hook{ + Path: hook.Path, + Steps: steps, + }) + } + } + + // Return the list of hooks to execute + return filtered +} diff --git a/packages/filters/steps_filter_test.go b/packages/filters/steps_filter_test.go new file mode 100644 index 0000000..2312a9e --- /dev/null +++ b/packages/filters/steps_filter_test.go @@ -0,0 +1,69 @@ +package filters + +import ( + "testing" + + "github.com/LMaxence/gookme/packages/configuration" + "github.com/stretchr/testify/assert" +) + +type StepFilterTestCase struct { + ID string + Changeset []string + Hooks []configuration.Hook + Expected []configuration.Hook +} + +func getStepFiltersTestCases() []StepFilterTestCase { + cases := []StepFilterTestCase{} + + // Case 1: One of the step has a onlyOn pattern that matches the changeset + + stepJson := configuration.NewStepFixture().WithOnlyOn("*.json") + stepGo := configuration.NewStepFixture().WithOnlyOn("*.go") + + hook := configuration.NewHookFixture("foo/bar").WithFiles().WithStep(stepJson, stepGo) + expectedHook := configuration.NewHookFixture("foo/bar").WithFiles("foo/bar/item.json").WithStep(stepJson.Copy().WithFiles("foo/bar/item.json")) + + cases = append(cases, StepFilterTestCase{ + ID: "One of the step has a onlyOn pattern that matches the changeset", + Changeset: []string{"foo/bar/item.json", "bar/foo/item.go", "foo/main.go"}, + Hooks: []configuration.Hook{hook.ToHook()}, + Expected: []configuration.Hook{expectedHook.ToHook()}, + }) + + // Case 2: None of the steps have a onlyOn pattern that matches the changeset + + stepJson = configuration.NewStepFixture().WithOnlyOn("*.json") + stepAll := configuration.NewStepFixture() + + hook = configuration.NewHookFixture("foo/bar").WithFiles().WithStep(stepJson, stepAll) + expectedHook = configuration.NewHookFixture("foo/bar").WithFiles("foo/bar/item.go").WithStep(stepAll.Copy()) + + cases = append(cases, StepFilterTestCase{ + ID: "Match all files", + Changeset: []string{"foo/bar/item.go", "bar/foo/item.go", "foo/main.go"}, + Hooks: []configuration.Hook{hook.ToHook()}, + Expected: []configuration.Hook{expectedHook.ToHook()}, + }) + + return cases +} + +func TestFilterStepsWithOnlyOn(t *testing.T) { + for _, tc := range getStepFiltersTestCases() { + t.Run(tc.ID, func(t *testing.T) { + res := FilterStepsWithOnlyOn(tc.Changeset, tc.Hooks) + + for i, hook := range res { + assert.Equal(t, tc.Expected[i].Path, hook.Path) + assert.Equal(t, len(tc.Expected[i].Steps), len(hook.Steps)) + + for j, step := range hook.Steps { + assert.Equal(t, tc.Expected[i].Steps[j].Name, step.Name) + assert.Equal(t, tc.Expected[i].Steps[j].Files, step.Files) + } + } + }) + } +} diff --git a/packages/filters/strategies.go b/packages/filters/strategies.go new file mode 100644 index 0000000..10d03e9 --- /dev/null +++ b/packages/filters/strategies.go @@ -0,0 +1,78 @@ +package filters + +import gitclient "github.com/LMaxence/gookme/packages/git-client" + +type ChangesetResolvingStrategy interface { + Resolve() ([]string, error) +} + +// StagedChangesResolvingStrategy is a changeset resolving strategy that +// resolves the changeset by looking at the staged files in the repository. +type StagedChangesResolvingStrategy struct { + repositoryPath string +} + +func NewStagedChangesResolvingStrategy(repositoryPath string) *StagedChangesResolvingStrategy { + return &StagedChangesResolvingStrategy{ + repositoryPath: repositoryPath, + } +} + +func (s *StagedChangesResolvingStrategy) Resolve() ([]string, error) { + return gitclient.GetStagedFiles(&s.repositoryPath) +} + +// FromToChangesResolvingStrategy is a changeset resolving strategy that +// resolves the changeset by looking at the changes between two refs. +type FromToChangesResolvingStrategy struct { + repositoryPath string + from string + to string +} + +func NewFromToChangesResolvingStrategy(repositoryPath string, from string, to string) *FromToChangesResolvingStrategy { + return &FromToChangesResolvingStrategy{ + repositoryPath: repositoryPath, + from: from, + to: to, + } +} + +func (s *FromToChangesResolvingStrategy) Resolve() ([]string, error) { + return gitclient.GetChangedFilesBetweenRefs(&s.repositoryPath, s.from, s.to) +} + +// PrePushChangesResolvingStrategy is a changeset resolving strategy that +// resolves the changeset by looking at the files about to be pushed in the repository. +type PrePushChangesResolvingStrategy struct { + repositoryPath string +} + +func NewPrePushChangesResolvingStrategy(repositoryPath string) *PrePushChangesResolvingStrategy { + return &PrePushChangesResolvingStrategy{ + repositoryPath: repositoryPath, + } +} + +func (s *PrePushChangesResolvingStrategy) Resolve() ([]string, error) { + return gitclient.GetFilesToBePushed(&s.repositoryPath) +} + +// NCommitsBeforeHeadChangesResolvingStrategy is a changeset resolving strategy that +// resolves the changeset by looking at the n commits before HEAD. + +type NCommitsBeforeHeadChangesResolvingStrategy struct { + repositoryPath string + n int +} + +func NewNCommitsBeforeHeadChangesResolvingStrategy(repositoryPath string, n int) *NCommitsBeforeHeadChangesResolvingStrategy { + return &NCommitsBeforeHeadChangesResolvingStrategy{ + repositoryPath: repositoryPath, + n: n, + } +} + +func (s *NCommitsBeforeHeadChangesResolvingStrategy) Resolve() ([]string, error) { + return gitclient.GetFilesChangedNCommitsBefore(&s.repositoryPath, s.n) +} diff --git a/packages/git-client/staged_files.go b/packages/git-client/staged_files.go index 2af4920..20dedd2 100644 --- a/packages/git-client/staged_files.go +++ b/packages/git-client/staged_files.go @@ -14,35 +14,80 @@ type GitRefDelimiter struct { To string } -func GetStagedFiles(dirPath *string, delimiter *GitRefDelimiter) ([]string, error) { +func GetChangedFilesBetweenRefs( + dirPath *string, + from string, + to string, +) ([]string, error) { root, err := GetRepoPath(dirPath) if err != nil { return nil, err } - var out string - if delimiter != nil { - out, err = execCommandAtPath( - dirPath, - "git", - "diff", - "--name-only", - "--diff-filter=d", - fmt.Sprintf("--line-prefix=%s", root+"/"), - fmt.Sprintf("%s...%s", delimiter.From, delimiter.To), - ) - } else { - out, err = execCommandAtPath( - dirPath, - "git", - "diff", - "--cached", - "--name-only", - "--diff-filter=d", - fmt.Sprintf("--line-prefix=%s", root+"/"), - ) + out, err := execCommandAtPath( + dirPath, + "git", + "diff", + "--name-only", + "--diff-filter=d", + fmt.Sprintf("--line-prefix=%s", root+"/"), + fmt.Sprintf("%s...%s", from, to), + ) + + if err != nil { + return nil, err + } + + return strings.Split(string(out), "\n"), nil +} + +func getCommitsToBePushed(dirPath *string) ([]string, error) { + out, err := execCommandAtPath( + dirPath, + "git", + "rev-list", + "@{push}^..", + ) + + if err != nil { + return nil, err + } + + return strings.Split(string(out), "\n"), nil +} + +func GetFilesToBePushed(dirPath *string) ([]string, error) { + commits, err := getCommitsToBePushed(dirPath) + if err != nil { + return nil, err } + if len(commits) == 0 { + logger.Warn("Commits to push list is empty") + return []string{}, nil + } + + start, end := commits[0], commits[len(commits)-1] + + return GetChangedFilesBetweenRefs(dirPath, start, end) +} + +func GetStagedFiles(dirPath *string) ([]string, error) { + root, err := GetRepoPath(dirPath) + if err != nil { + return nil, err + } + + out, err := execCommandAtPath( + dirPath, + "git", + "diff", + "--cached", + "--name-only", + "--diff-filter=d", + fmt.Sprintf("--line-prefix=%s", root+"/"), + ) + if err != nil { return nil, err } @@ -50,36 +95,38 @@ func GetStagedFiles(dirPath *string, delimiter *GitRefDelimiter) ([]string, erro return strings.Split(string(out), "\n"), nil } -func GetNotStagedFiles(dirPath *string, delimiter *GitRefDelimiter) ([]string, error) { +func GetNotStagedFiles(dirPath *string) ([]string, error) { root, err := GetRepoPath(dirPath) if err != nil { return nil, err } - var out string - - if delimiter == nil { - out, err = execCommandAtPath( - dirPath, - "git", - "diff", - "--name-only", - "--diff-filter=d", - fmt.Sprintf("--line-prefix=%s", root+"/"), - ) - } else { - out, err = execCommandAtPath( - dirPath, - "git", - "diff", - "--name-only", - "--diff-filter=d", - fmt.Sprintf("--line-prefix=%s", root+"/"), - delimiter.From, - delimiter.To, - ) + out, err := execCommandAtPath( + dirPath, + "git", + "diff", + "--name-only", + "--diff-filter=d", + fmt.Sprintf("--line-prefix=%s", root+"/"), + ) + + if err != nil { + return nil, err } + return strings.Split(string(out), "\n"), nil +} + +func GetFilesChangedNCommitsBefore(dirPath *string, n int) ([]string, error) { + out, err := execCommandAtPath( + dirPath, + "git", + "diff-tree", + "--no-commit-id", + "--name-only", "-r", + fmt.Sprintf("HEAD~%d", n), + ) + if err != nil { return nil, err } diff --git a/packages/git-client/staged_files_test.go b/packages/git-client/staged_files_test.go index d05e363..ed8bf5b 100644 --- a/packages/git-client/staged_files_test.go +++ b/packages/git-client/staged_files_test.go @@ -25,7 +25,7 @@ func TestGetStagedFiles(t *testing.T) { assert.NoError(t, err) // Call the function - files, err := GetStagedFiles(&tmpDir, nil) + files, err := GetStagedFiles(&tmpDir) // Assert the results assert.NoError(t, err) @@ -43,7 +43,7 @@ func TestGetStagedFilesWithNoStagedFiles(t *testing.T) { assert.NoError(t, err) // Call the function - files, err := GetStagedFiles(&tmpDir, nil) + files, err := GetStagedFiles(&tmpDir) // Assert the results assert.NoError(t, err) @@ -72,7 +72,7 @@ func TestGetNotStagedFiles(t *testing.T) { assert.NoError(t, err) // Call the function - files, err := GetNotStagedFiles(&tmpDir, nil) + files, err := GetNotStagedFiles(&tmpDir) // Assert the results assert.NoError(t, err) @@ -93,7 +93,7 @@ func TestGetNotStagedFilesWithNoNotStagedFiles(t *testing.T) { assert.NoError(t, err) // Call the function - files, err := GetNotStagedFiles(&tmpDir, nil) + files, err := GetNotStagedFiles(&tmpDir) // Assert the results assert.NoError(t, err) diff --git a/packages/meta/version.go b/packages/meta/version.go index 40a9905..d878a80 100644 --- a/packages/meta/version.go +++ b/packages/meta/version.go @@ -1,3 +1,3 @@ package meta -const GOOKME_CLI_VERSION = "0.4.0" +const GOOKME_CLI_VERSION = "0.5.0" diff --git a/packages/scheduler/scheduler.go b/packages/scheduler/scheduler.go deleted file mode 100644 index 10e967c..0000000 --- a/packages/scheduler/scheduler.go +++ /dev/null @@ -1,118 +0,0 @@ -package scheduler - -import ( - "strings" - - "github.com/LMaxence/gookme/packages/configuration" - "github.com/LMaxence/gookme/packages/logging" - "github.com/bmatcuk/doublestar/v4" -) - -var logger = logging.NewLogger("scheduler") - -func filterChangesetWithPrefix( - changedPaths []string, - prefix string, -) []string { - filtered := make([]string, 0) - for _, path := range changedPaths { - if strings.HasPrefix(path, prefix) { - filtered = append(filtered, path) - } - } - - return filtered -} - -func filterChangesetWithPattern( - changedPaths []string, - pattern string, -) ([]string, error) { - filtered := make([]string, 0) - - if !strings.HasPrefix(pattern, "**") { - pattern = "**/" + pattern - } - - for _, path := range changedPaths { - - match, err := doublestar.Match(pattern, path) - if err != nil { - return nil, err - } - - if match { - filtered = append(filtered, path) - } - } - - return filtered, nil -} - -func FilterHooksWithChangeset( - changedPaths []string, - hooks []configuration.Hook, -) []configuration.Hook { - filtered := make([]configuration.Hook, 0) - - // For each hook, check if the hook directory is contained by one of the changeset's elements. - // If it is the case, add the hook to the list of hooks to execute - // If the hook is not in the changeset, skip it - - for _, hook := range hooks { - matchedPaths := filterChangesetWithPrefix(changedPaths, hook.Path) - if len(matchedPaths) > 0 { - filtered = append(filtered, hook) - } else { - logger.Debugf("Hook %s did not match any file, dropping", hook.Path) - } - } - - // Return the list of hooks to execute - return filtered -} - -func FilterStepsWithOnlyOn( - changedPaths []string, - hooks []configuration.Hook, -) []configuration.Hook { - filtered := make([]configuration.Hook, 0) - - // For each hook, check if the hook directory is contained by one of the changeset's elements. - // If it is the case, add the hook to the list of hooks to execute - - for _, hook := range hooks { - steps := make([]configuration.Step, 0) - changedPaths := filterChangesetWithPrefix(changedPaths, hook.Path) - - for _, step := range hook.Steps { - onlyOn := step.OnlyOn - - if onlyOn == nil { - steps = append(steps, step) - continue - } - - changedPathsWithPattern, err := filterChangesetWithPattern(changedPaths, *onlyOn) - if err != nil { - continue - } - - if len(changedPathsWithPattern) > 0 { - steps = append(steps, step) - } else { - logger.Debugf("Step %s:%s did not match any file using pattern %s, dropping", step.PackageRelativePath, step.Name, *onlyOn) - } - } - - if len(steps) > 0 { - filtered = append(filtered, configuration.Hook{ - Path: hook.Path, - Steps: steps, - }) - } - } - - // Return the list of hooks to execute - return filtered -} diff --git a/packages/scheduler/scheduler_test.go b/packages/scheduler/scheduler_test.go deleted file mode 100644 index a43b059..0000000 --- a/packages/scheduler/scheduler_test.go +++ /dev/null @@ -1,214 +0,0 @@ -package scheduler - -import ( - "fmt" - "testing" - - "github.com/LMaxence/gookme/packages/configuration" - "github.com/stretchr/testify/assert" -) - -var defaultSteps = []configuration.Step{ - { - Command: "echo 'Hello World'", - ID: "step1", - }, -} - -func TestFilterScheduledHooksWithChangeset(t *testing.T) { - changedPaths := []string{"/packages/path1/somefile.go"} - hooks := []configuration.Hook{ - { - Path: "/packages/path1", - Steps: defaultSteps, - }, - { - Path: "/packages/path2", - Steps: defaultSteps, - }, - } - - filteredHooks := FilterHooksWithChangeset(changedPaths, hooks) - assert.Equal(t, 1, len(filteredHooks)) - assert.Equal(t, hooks[0], filteredHooks[0]) -} - -func TestFilterScheduledHooksWithLargerChangeset(t *testing.T) { - changedPaths := []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"} - hooks := []configuration.Hook{ - { - Path: "/packages/path1", - Steps: defaultSteps, - }, - { - Path: "/packages/path2", - Steps: defaultSteps, - }, - } - - filteredHooks := FilterHooksWithChangeset(changedPaths, hooks) - assert.Equal(t, 2, len(filteredHooks)) - assert.Equal(t, hooks[0], filteredHooks[0]) - assert.Equal(t, hooks[1], filteredHooks[1]) -} - -func TestFilterScheduledHooksWithChangesetWithNoMatchingHooks(t *testing.T) { - changedPaths := []string{"/packages/path1/somefile.go"} - hooks := []configuration.Hook{ - { - Path: "/packages/path2", - Steps: defaultSteps, - }, - } - - filteredHooks := FilterHooksWithChangeset(changedPaths, hooks) - assert.Equal(t, 0, len(filteredHooks)) -} - -var filterChangesetWithPrefixTestCases = []struct { - changedPaths []string - prefix string - expected []string -}{ - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path1", - expected: []string{"/packages/path1/somefile.go"}, - }, - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path2", - expected: []string{"/packages/path2/somefile.go"}, - }, - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path2/somefile.go"}, - prefix: "/packages/path3", - expected: []string{}, - }, -} - -func TestFilterChangesetWithPrefix(t *testing.T) { - for _, testCase := range filterChangesetWithPrefixTestCases { - filteredPaths := filterChangesetWithPrefix(testCase.changedPaths, testCase.prefix) - assert.Equal(t, testCase.expected, filteredPaths) - } -} - -var filterChangesetWithPatternTestCases = []struct { - changedPaths []string - pattern string - expected []string -}{ - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "*.json", - expected: []string{"/packages/path1/somefile.json"}, - }, - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "test/*.json", - expected: []string{}, - }, - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "packages/path1/*.json", - expected: []string{"/packages/path1/somefile.json"}, - }, - { - changedPaths: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - pattern: "*.{go,json}", - expected: []string{"/packages/path1/somefile.go", "/packages/path1/somefile.json"}, - }, -} - -func TestFilterChangesetWithPatter(t *testing.T) { - for _, testCase := range filterChangesetWithPatternTestCases { - filteredPaths, err := filterChangesetWithPattern(testCase.changedPaths, testCase.pattern) - assert.Nil(t, err) - assert.Equal(t, testCase.expected, filteredPaths) - } -} - -func fixtureHookConfiguration( - path string, - onlyOn []*string, -) configuration.Hook { - hook := configuration.Hook{ - Path: path, - Steps: []configuration.Step{}, - } - - for i, pattern := range onlyOn { - hook.Steps = append(hook.Steps, configuration.Step{ - OnlyOn: pattern, - Command: "echo Hello world", - ID: fmt.Sprintf("step%d", i), - }) - } - - return hook -} - -var goStarPattern = "*.go" -var somefileStarPattern = "somefile.*" -var filterStepsWithOnlyOnTestCases = []struct { - changedPaths []string - hooks []configuration.Hook - expected []configuration.Hook -}{ - { - changedPaths: []string{"/packages/path1/somefile.go"}, - hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{nil}), - }, - expected: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{nil}), - }, - }, - { - changedPaths: []string{"/packages/path1/somefile.go"}, - hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), - }, - expected: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), - }, - }, - { - changedPaths: []string{"/packages/path1/somefile.json"}, - hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&goStarPattern}), - }, - expected: []configuration.Hook{}, - }, - { - changedPaths: []string{"/packages/path1/somefile.json"}, - hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), - }, - expected: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), - }, - }, - { - changedPaths: []string{"/packages/path1/some-other-file.json"}, - hooks: []configuration.Hook{ - fixtureHookConfiguration("/packages/path1", []*string{&somefileStarPattern}), - }, - expected: []configuration.Hook{}, - }, -} - -func TestFilterStepsWithOnlyOn(t *testing.T) { - for _, testCase := range filterStepsWithOnlyOnTestCases { - filteredHooks := FilterStepsWithOnlyOn(testCase.changedPaths, testCase.hooks) - - assert.Equal(t, len(testCase.expected), len(filteredHooks)) - for i, expectedHook := range testCase.expected { - filteredHook := filteredHooks[i] - - assert.Equal(t, expectedHook.Path, filteredHook.Path) - assert.Equal(t, len(expectedHook.Steps), len(filteredHook.Steps)) - } - } -}