Skip to content

Should .json files written by audit gather end with newline? #1427

@alexbozhenko

Description

@alexbozhenko

Proposed change

E.g. these files:
clusters/*/*/jetstream_info/*.json
are not ending in a newline.

Do I understand correctly that, according to standards, text files should always end in a newline?
https://www.baeldung.com/linux/files-end-with-newlines#newlines-at-the-end-of-the-file

Use case

I initially thought that it was breaking jq in some scenarios, but it looks like it is not the case.

Still, should probably do the right thing for the sake of consistency? (at least wc -l counts lines in such files incorrectly)

Contribution

I can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalEnhancement idea or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions