Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend JSON output to include linked issue & other metadata #162

Open
preslavmihaylov opened this issue Aug 29, 2021 · 2 comments
Open

Extend JSON output to include linked issue & other metadata #162

preslavmihaylov opened this issue Aug 29, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@preslavmihaylov
Copy link
Owner

preslavmihaylov commented Aug 29, 2021

Currently, the json output includes only part of the info specified by todocheck's output for closed issues.

E.g. the output for // TODO 2: a closed issue is:

[
  {
    "type": "Issue is closed",
    "filename": "main.go",
    "line": 5,
    "message": ""
  }
]

in this case, the linked issue is not included in the output.

How to solve this?

Add a new field metadata which accepts any arbitrary string-string key-value pairs.

The reason for the new field is to enable future extensions to the messages without breaking backwards compatibility.

In this case, the whole output should look like:

[
  {
    "type": "Issue is closed",
    "filename": "main.go",
    "line": 5,
    "message": ""
    "metadata": {
        "issueID": "2"    
    }
  }
]
@abhishekchopra0907
Copy link

hey @preslavmihaylov I would like to handle this issue could you assign me this issue

@preslavmihaylov
Copy link
Owner Author

@abhishekchopra0907 it seems @bengsparks is already working on this. Perhaps you can check out #165

bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 6, 2021
bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 14, 2021
bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 14, 2021
bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 14, 2021
bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 14, 2021
bengsparks added a commit to bengsparks/todocheck that referenced this issue Sep 14, 2021
preslavmihaylov added a commit that referenced this issue Sep 18, 2021
)

* Extend JSON output to include linked issue & other metadata (#162)

* Change metadata to an untyped object and apply naming changes (#162)

* Add metadata field to scenario (#162)

* Extend testing framework to include metadata (#162)

* Implement comparison for TodoErrForJSON in scenarios (#162)

* Add tests for issueID entry in JSON output (#162)

* Add test case for malformed TODOs (#162)

* Applied recommended naming changes and other misc cleanups (#162)

Co-authored-by: Preslav Mihaylov <pmihaylov95@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants