Skip to content

Commit 8ac8704

Browse files
authored
fix: add trailing new line when saving a .json file (#129)
1 parent 3ae22b3 commit 8ac8704

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.9.7] 2025-11-14
11+
### Fixed
12+
- Add trailing new line when saving a .json file to comply with POSIX text file standards, fixes issue [#127](https://github.com/scanoss/scanoss.cc/issues/127)
13+
1014
## [0.9.6] 2025-11-11
1115
### Changed
1216
- Add `--no-wfp-output` flag to default scan options to disable WFP output

internal/utils/file_utils_default_impl.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ func JSONSerialize(in any) ([]byte, error) {
9090
return nil, err
9191
}
9292

93+
// Append newline to comply with POSIX text file standards
94+
out = append(out, '\n')
95+
9396
return out, nil
9497
}
9598

0 commit comments

Comments
 (0)