Skip to content

Commit d0c6eb7

Browse files
committed
fix error message when running 'doctor.sh run' and generating migration report
1 parent 205eb5f commit d0c6eb7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Models/Settings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.IO;
2+
using System.Text.Json.Serialization;
23

34
namespace CobolToQuarkusMigration.Models;
45

56
/// <summary>
67
/// Represents the target language for code conversion.
78
/// </summary>
9+
[JsonConverter(typeof(JsonStringEnumConverter))]
810
public enum TargetLanguage
911
{
1012
/// <summary>

doctor.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,9 @@ generate_migration_report() {
486486
sqlite3 "$db_path" <<SQL
487487
.mode markdown
488488
.headers off
489-
SELECT '- **Total COBOL Files:** ' || COUNT(DISTINCT source_file) FROM cobol_files WHERE run_id = $run_id;
490-
SELECT '- **Programs (.cbl):** ' || COUNT(DISTINCT source_file) FROM cobol_files WHERE run_id = $run_id AND source_file LIKE '%.cbl';
491-
SELECT '- **Copybooks (.cpy):** ' || COUNT(DISTINCT source_file) FROM cobol_files WHERE run_id = $run_id AND source_file LIKE '%.cpy';
489+
SELECT '- **Total COBOL Files:** ' || COUNT(DISTINCT file_name) FROM cobol_files WHERE run_id = $run_id;
490+
SELECT '- **Programs (.cbl):** ' || COUNT(DISTINCT file_name) FROM cobol_files WHERE run_id = $run_id AND file_name LIKE '%.cbl';
491+
SELECT '- **Copybooks (.cpy):** ' || COUNT(DISTINCT file_name) FROM cobol_files WHERE run_id = $run_id AND file_name LIKE '%.cpy';
492492
SQL
493493

494494
echo ""
@@ -517,7 +517,7 @@ SQL
517517
sqlite3 "$db_path" <<SQL
518518
.mode markdown
519519
.headers on
520-
SELECT file_name AS 'File Name', file_path AS 'Path', line_count AS 'Lines'
520+
SELECT file_name AS 'File Name', file_path AS 'Path', is_copybook AS 'Is Copybook'
521521
FROM cobol_files
522522
WHERE run_id = $run_id
523523
ORDER BY file_name;

0 commit comments

Comments
 (0)